From 82df5189d6433b5c9a91eb694ca5435c3e1e0f0a Mon Sep 17 00:00:00 2001 From: Jimbo Date: Fri, 28 Feb 2025 19:13:03 -0500 Subject: [PATCH] Make use of Nix profiles --- system/accounts/users/system/default.nix | 1 - .../users/system/liquidsoap/default.nix | 12 ----------- system/default.nix | 2 +- system/devices/boot/default.nix | 17 ++++++++++++++- system/devices/default.nix | 1 - system/devices/hardware/default.nix | 8 ------- system/settings/default.nix | 2 +- system/settings/minimal/default.nix | 21 ------------------- system/settings/modules/default.nix | 8 +++++++ 9 files changed, 26 insertions(+), 46 deletions(-) delete mode 100644 system/accounts/users/system/liquidsoap/default.nix delete mode 100644 system/devices/hardware/default.nix delete mode 100644 system/settings/minimal/default.nix create mode 100644 system/settings/modules/default.nix diff --git a/system/accounts/users/system/default.nix b/system/accounts/users/system/default.nix index ffbaa7a..3ecc8fe 100644 --- a/system/accounts/users/system/default.nix +++ b/system/accounts/users/system/default.nix @@ -2,7 +2,6 @@ { imports = [ ./jellyfin - ./liquidsoap ./nextcloud ./nginx ]; diff --git a/system/accounts/users/system/liquidsoap/default.nix b/system/accounts/users/system/liquidsoap/default.nix deleted file mode 100644 index f83e9cc..0000000 --- a/system/accounts/users/system/liquidsoap/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: -{ - users = { - users.liquidsoap = { - group = "liquidsoap"; - extraGroups = [ "nginx" ]; - isSystemUser = true; - uid = 155; - }; - groups.liquidsoap = {}; - }; -} diff --git a/system/default.nix b/system/default.nix index e995e23..eec726a 100644 --- a/system/default.nix +++ b/system/default.nix @@ -18,7 +18,7 @@ hostName = "rubble"; hostId = "e0b1fcef"; }; - system.stateVersion = "24.11"; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; }; } diff --git a/system/devices/boot/default.nix b/system/devices/boot/default.nix index abc2406..87246a6 100644 --- a/system/devices/boot/default.nix +++ b/system/devices/boot/default.nix @@ -5,5 +5,20 @@ ./root-reset ]; - boot.initrd.systemd.enable = true; + boot.initrd = { + systemd.enable = true; + kernelModules = [ + "ahci" + "dm-snapshot" + "mmc_core" + "pcie_rockchip_host" + "phy_rockchip_pcie" + "rockchip_dfi" + "rockchip_thermal" + "rtc_rk808" + "rockchip_saradc" + "uas" + "fusb302" + ]; + }; } diff --git a/system/devices/default.nix b/system/devices/default.nix index df4ca05..d4feeb6 100644 --- a/system/devices/default.nix +++ b/system/devices/default.nix @@ -3,7 +3,6 @@ imports = [ ./boot ./disks - ./hardware ./networking ]; } diff --git a/system/devices/hardware/default.nix b/system/devices/hardware/default.nix deleted file mode 100644 index baab64a..0000000 --- a/system/devices/hardware/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, modulesPath, ... }: -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.kernelModules = [ "ahci" "dm-snapshot" "mmc_core" "pcie_rockchip_host" "phy_rockchip_pcie" "rockchip_dfi" "rockchip_thermal" "rtc_rk808" "rockchip_saradc" "uas" "fusb302" ]; - - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; -} diff --git a/system/settings/default.nix b/system/settings/default.nix index 929060e..d95aa9e 100644 --- a/system/settings/default.nix +++ b/system/settings/default.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ - ./minimal + ./modules ./nix ./timezone ]; diff --git a/system/settings/minimal/default.nix b/system/settings/minimal/default.nix deleted file mode 100644 index ceb98ab..0000000 --- a/system/settings/minimal/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ ... }: -{ - environment = { - defaultPackages = [ ]; - stub-ld.enable = false; - }; - - documentation = { - doc.enable = false; - info.enable = false; - nixos.enable = false; - }; - - programs = { - nano.enable = false; - less.lessopen = null; - command-not-found.enable = false; - }; - - services.logrotate.enable = false; -} diff --git a/system/settings/modules/default.nix b/system/settings/modules/default.nix new file mode 100644 index 0000000..25dd4bf --- /dev/null +++ b/system/settings/modules/default.nix @@ -0,0 +1,8 @@ +{ modulesPath, ... }: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + (modulesPath + "/profiles/minimal.nix") + (modulesPath + "/profiles/headless.nix") + ]; +}