diff --git a/flake.nix b/flake.nix index 2db5942..21f99d4 100644 --- a/flake.nix +++ b/flake.nix @@ -132,7 +132,7 @@ in { "durincore" = mkNixosConfig { - # T470 Thinkpad + # T470 Thinkpad Intel i7-6600U # Nix dev laptop hostname = "durincore"; system = "x86_64-linux"; @@ -148,8 +148,8 @@ }; "legiondary" = mkNixosConfig { - # Legion 15arh05h AMD/Nvidia - # Nix gaming laptop + # Legion 15arh05h AMD/Nvidia Ryzen 7 4800H + # Nix dev/gaming laptop hostname = "legiondary"; system = "x86_64-linux"; hardwareModules = [ @@ -179,6 +179,20 @@ { home-manager.users.jahanson = ./nixos/home/jahanson/server.nix; } ]; }; + + "telperion" = mkNixosConfig { + # HP-S01 Intel G5900 + # Network services server + hostname = "telperion"; + system = "x86_64-linux"; + hardwareModules = [ + ./nixos/profiles/hw-hp-s01.nix + ]; + profileModules = [ + ./nixos/profiles/role-server.nix + { home-manager.users.jahanson = ./nixos/home/jahanson/server.nix; } + ]; + }; }; # Convenience output that aggregates the outputs for home, nixos. diff --git a/nixos/hosts/telperion/default.nix b/nixos/hosts/telperion/default.nix new file mode 100644 index 0000000..60a6e81 --- /dev/null +++ b/nixos/hosts/telperion/default.nix @@ -0,0 +1,51 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, modulesPath, ... }: + +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + # generate a zfs hostid for me + networking.hostId = "ce196a02"; + networking.hostName = "telperion"; + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems."/" = { + device = "zroot/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "zroot/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = { + device = "zroot/var"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "zroot/home"; + fsType = "zfs"; + }; + + swapDevices = [ ]; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # System settings and services. + mySystem = { + purpose = "Production"; + system.motd.networkInterfaces = [ "enp2s0" "wlp3s0" ]; + }; +} diff --git a/nixos/profiles/hw-hp-s01.nix b/nixos/profiles/hw-hp-s01.nix new file mode 100644 index 0000000..a911ba1 --- /dev/null +++ b/nixos/profiles/hw-hp-s01.nix @@ -0,0 +1,26 @@ +{ lib, pkgs, ... }: +{ + # Support windows partition + mySystem = { + security.wheelNeedsSudoPassword = false; + }; + + boot = { + loader = { + grub = { + enable = true; + zfsSupport = true; + device = "nodev"; + mirroredBoots = [ + { devices = [ "nodev" ]; path = "/boot"; } + ]; + }; + }; + }; + + networking = { + useDHCP = lib.mkDefault true; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/nixos/profiles/hw-legion-15arh05h.nix b/nixos/profiles/hw-legion-15arh05h.nix index e0214c2..e7fc7f9 100644 --- a/nixos/profiles/hw-legion-15arh05h.nix +++ b/nixos/profiles/hw-legion-15arh05h.nix @@ -8,7 +8,6 @@ ]; }; - boot = { # for managing/mounting ntfs supportedFilesystems = [ "ntfs" ]; @@ -31,8 +30,6 @@ networking = { useDHCP = lib.mkDefault true; }; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }