feat: init homer device
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-18 20:59:01 -04:00
parent 9554dd40f4
commit a592eb69dd
3 changed files with 114 additions and 0 deletions

57
devices/homie/default.nix Normal file
View file

@ -0,0 +1,57 @@
{
config,
self,
...
}: let
inherit (config.vars) mainUser hostName;
in {
# ------------------------------------------------
# Imports
# ------------------------------------------------
imports = [
./hardware-configuration.nix
self.nixosModules.kmscon
self.nixosModules.server
];
# State Version: DO NOT CHANGE
system.stateVersion = "24.11";
home-manager.users.${mainUser}.home.stateVersion = "24.11";
# ------------------------------------------------
# User Settings
# ------------------------------------------------
vars = {
mainUser = "matt";
hostName = "homie";
promptMainColor = "yellow";
};
users.users.${mainUser} = {
isNormalUser = true;
extraGroups = [
"wheel"
"adm"
];
};
networking = {
inherit hostName;
resolvconf.enable = true;
firewall.enable = false;
};
time.timeZone = "America/Montreal";
# ------------------------------------------------
# `Self` Modules configuration
# ------------------------------------------------
roles.server = {
user = mainUser;
tailscale.enable = true;
sshd.enable = true;
};
services.kmscon.enable = true;
}

View file

@ -0,0 +1,54 @@
{
config,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = {
loader = {
efi.canTouchEfiVariables = true;
timeout = 2;
systemd-boot = {
enable = true;
consoleMode = "max";
configurationLimit = 30;
};
};
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
}

View file

@ -85,6 +85,9 @@
secrets.nixosModules.servivi
];
# Home-assistant
homie = mkNixOS [./devices/homie];
# Cluster
thingone = mkNixOS [
(import ./devices/cluster "thingone")