diff --git a/flake.nix b/flake.nix index 82bbf80..5579aa7 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,7 @@ nodeNixpkgs = { kilgharrah = import nixpkgs { system = "x86_64-linux"; }; tohru = import nixpkgs { system = "x86_64-linux"; }; + elucredassa = import nixpkgs-small { system = "x86_64-linux"; }; yevaud = import nixpkgs-small { system = "x86_64-linux"; }; orm = import nixpkgs-small { system = "x86_64-linux"; }; kalessin = import nixpkgs-small { system = "aarch64-linux"; }; @@ -130,6 +131,7 @@ kilgharrah.imports = [ ./hosts/kilgharrah ]; tohru.imports = [ ./hosts/tohru ]; + elucredassa.imports = [ ./hosts/elucredassa ]; yevaud.imports = [ ./hosts/yevaud ]; orm.imports = [ ./hosts/orm ]; kalessin.imports = [ ./hosts/kalessin ]; diff --git a/hosts/elucredassa/default.nix b/hosts/elucredassa/default.nix new file mode 100644 index 0000000..38da22d --- /dev/null +++ b/hosts/elucredassa/default.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkForce; +in +{ + imports = [ + ./filesystems.nix + ./hardware.nix + ./networking.nix + ]; + + nixpkgs.hostPlatform = "x86_64-linux"; + networking.hostName = "elucredassa"; + networking.hostId = "a8ec6755"; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-intel" ]; + + qenya.base-server.enable = true; + + time.timeZone = "Europe/London"; # Etc/UTC? + i18n.defaultLocale = "en_GB.UTF-8"; + console.keyMap = "uk"; + services.xserver.xkb.layout = "gb"; + + fountain.users.qenya.enable = true; + users.users.qenya.extraGroups = [ "wheel" ]; + + system.stateVersion = "24.11"; +} diff --git a/hosts/elucredassa/filesystems.nix b/hosts/elucredassa/filesystems.nix new file mode 100644 index 0000000..12512ba --- /dev/null +++ b/hosts/elucredassa/filesystems.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +{ + boot.initrd.luks.devices = { + "luks-rpool-elucredassa".device = "/dev/disk/by-uuid/5ece5b58-c57a-41ae-b086-03707c39c9a7"; + }; + + fileSystems = { + "/" = { + device = "rpool_elucredassa/root"; + fsType = "zfs"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/2519-E2D6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + }; + + swapDevices = [ ]; # TODO: add + + boot.supportedFilesystems = [ "ntfs" ]; # for USB drives +} diff --git a/hosts/elucredassa/hardware.nix b/hosts/elucredassa/hardware.nix new file mode 100644 index 0000000..715ed4f --- /dev/null +++ b/hosts/elucredassa/hardware.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + hardware.enableAllFirmware = true; + hardware.cpu.intel.updateMicrocode = true; + services.fwupd.enable = true; +} + diff --git a/hosts/elucredassa/networking.nix b/hosts/elucredassa/networking.nix new file mode 100644 index 0000000..ec88532 --- /dev/null +++ b/hosts/elucredassa/networking.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + systemd.network.enable = true; + networking.useDHCP = false; + + systemd.network.networks."10-wan" = { + matchConfig.Name = "enp1s0f1"; + networkConfig = { + DHCP = "ipv4"; + IPv6AcceptRA = true; + }; + linkConfig.RequiredForOnline = "routable"; + }; +}