From 4ac9af3ca8ba0e70b3173090b1d0432c468c59c9 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Fri, 22 Nov 2024 11:14:55 +1100 Subject: [PATCH] ookst480s: update host modules --- hosts/ookst480s/default.nix | 27 +++-------- hosts/ookst480s/file-system.nix | 80 +++++++++++---------------------- hosts/ookst480s/hardware.nix | 23 ++++++++++ hosts/ookst480s/host.nix | 0 hosts/ookst480s/workstation.nix | 12 ----- 5 files changed, 54 insertions(+), 88 deletions(-) create mode 100644 hosts/ookst480s/hardware.nix delete mode 100644 hosts/ookst480s/host.nix delete mode 100644 hosts/ookst480s/workstation.nix diff --git a/hosts/ookst480s/default.nix b/hosts/ookst480s/default.nix index cba1b03..1d1b5af 100644 --- a/hosts/ookst480s/default.nix +++ b/hosts/ookst480s/default.nix @@ -3,7 +3,11 @@ lib, ... }: { - imports = [./file-system.nix]; + imports = [ + ./file-system.nix + ./hardware.nix + ]; + ooknet = { host = { admin = { @@ -20,27 +24,6 @@ console = { profile = "standard"; }; - hardware = { - cpu.type = "intel"; - gpu.type = "intel"; - features = [ - "bluetooth" - "backlight" - "battery" - "ssd" - "audio" - "video" - ]; - monitors = [ - { - primary = true; - name = "eDP-1"; - width = 1920; - height = 1080; - workspace = "1"; - } - ]; - }; }; boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen; system.stateVersion = lib.mkDefault "23.11"; diff --git a/hosts/ookst480s/file-system.nix b/hosts/ookst480s/file-system.nix index 8516afa..30dbf89 100644 --- a/hosts/ookst480s/file-system.nix +++ b/hosts/ookst480s/file-system.nix @@ -1,63 +1,35 @@ -# 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") - ]; - - boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=root"]; - }; - boot.initrd.luks.devices."cryptnix".device = "/dev/disk/by-uuid/014d725c-bf13-40a2-a9ab-0dd6185a95f6"; - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=nix"]; - }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=root"]; + }; - fileSystems."/persist" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=persist"]; - }; + "/nix" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=nix"]; + }; - fileSystems."/swap" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=swap"]; - }; + "/persist" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=persist"]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/F356-6F9C"; - fsType = "vfat"; - }; + "/swap" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=swap"]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/F356-6F9C"; + fsType = "vfat"; + }; + }; swapDevices = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp61s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wwan0.useDHCP = lib.mkDefault true; - - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/ookst480s/hardware.nix b/hosts/ookst480s/hardware.nix new file mode 100644 index 0000000..d67061d --- /dev/null +++ b/hosts/ookst480s/hardware.nix @@ -0,0 +1,23 @@ +{ + ooknet.hardware = { + cpu.type = "intel"; + gpu.type = "intel"; + features = [ + "bluetooth" + "backlight" + "battery" + "ssd" + "audio" + "video" + ]; + monitors = [ + { + primary = true; + name = "eDP-1"; + width = 1920; + height = 1080; + workspace = "1"; + } + ]; + }; +} diff --git a/hosts/ookst480s/host.nix b/hosts/ookst480s/host.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/ookst480s/workstation.nix b/hosts/ookst480s/workstation.nix deleted file mode 100644 index 39fce43..0000000 --- a/hosts/ookst480s/workstation.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config = { - ooknet.workstation = { - appearance = { - theme = "minimal"; - }; - desktop = { - environment = "hyprland"; - }; - }; - }; -}