diff --git a/nix-os-configs/main.nix b/nix-os-configs/main.nix new file mode 100644 index 0000000..76ecc57 --- /dev/null +++ b/nix-os-configs/main.nix @@ -0,0 +1,22 @@ +{ ... }: + +{ + imports = [ + # Include the results of the hardware scan. + (if builtins.pathExists /etc/nixos/hardware-configuration.nix then /etc/nixos/hardware-configuration.nix else null) + # Include device-specific overrides + (if builtins.pathExists /etc/nixos/device-configuration.nix then /etc/nixos/device-configuration.nix else null) + ../nix-os/core.nix + ../nix-os/nvidia.nix + ../nix-os/docker.nix + ../nix-os/razer.nix + ../nix-os/desktop/gnome.nix + #../nix-os/desktop/kde-plasma.nix + ../nix-os/shell.nix + ../nix-os/virtualization.nix + ../nix-os/polkit/disable-shutdown.nix + ../nix-os/locale.nix + ../nix-os/adb.nix + ../nix-os/account.nix + ]; +} \ No newline at end of file diff --git a/nix-os-configs/vm.nix b/nix-os-configs/vm.nix new file mode 100644 index 0000000..adb9a08 --- /dev/null +++ b/nix-os-configs/vm.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + imports = [ + ../nix-os/core.nix + ../nix-os/docker.nix + ../nix-os/desktop/gnome.nix + #../nix-os/desktop/kde-plasma.nix + ../nix-os/shell.nix + ../nix-os/virtualization.nix + ../nix-os/polkit/disable-shutdown.nix + ../nix-os/locale.nix + ../nix-os/adb.nix + ../nix-os/account.nix + ]; +} \ No newline at end of file diff --git a/nix-os/core.nix b/nix-os/core.nix index c706846..ecde69b 100644 --- a/nix-os/core.nix +++ b/nix-os/core.nix @@ -5,25 +5,6 @@ { config, pkgs, ... }: { - imports = - [ - # Include the results of the hardware scan. - (if builtins.pathExists /etc/nixos/hardware-configuration.nix then /etc/nixos/hardware-configuration.nix else null) - # Include device-specific overrides - (if builtins.pathExists /etc/nixos/device-configuration.nix then /etc/nixos/device-configuration.nix else null) - ./nvidia.nix - ./docker.nix - ./razer.nix - ./desktop/gnome.nix - #./desktop/kde-plasma.nix - ./shell.nix - ./virtualization.nix - ./polkit/disable-shutdown.nix - ./locale.nix - ./adb.nix - ./account.nix - ]; - # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/nixos-rebuild.sh b/nixos-rebuild.sh index 68b09e1..0d1dda7 100755 --- a/nixos-rebuild.sh +++ b/nixos-rebuild.sh @@ -1 +1 @@ -NIXOS_CONFIG="$(pwd)/nix-os/core.nix" nixos-rebuild $@ +NIXOS_CONFIG="$(pwd)/nix-os-configs/main.nix" nixos-rebuild $@ diff --git a/vm.sh b/vm.sh index 891de47..de1a31f 100755 --- a/vm.sh +++ b/vm.sh @@ -1 +1 @@ -nix-build '' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./nix-os/core.nix && $(ls ./result/bin/run-*) && rm *.qcow2 +nix-build '' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./nix-os-configs/vm.nix && $(ls ./result/bin/run-*) && rm *.qcow2