Move imports section out of configuration modules dir.

This commit is contained in:
Wroclaw 2024-01-20 18:12:32 +01:00
parent 58ce7ac394
commit 7de1bbc964
5 changed files with 40 additions and 21 deletions

22
nix-os-configs/main.nix Normal file
View file

@ -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
];
}

16
nix-os-configs/vm.nix Normal file
View file

@ -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
];
}

View file

@ -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;

View file

@ -1 +1 @@
NIXOS_CONFIG="$(pwd)/nix-os/core.nix" nixos-rebuild $@
NIXOS_CONFIG="$(pwd)/nix-os-configs/main.nix" nixos-rebuild $@

2
vm.sh
View file

@ -1 +1 @@
nix-build '<nixpkgs/nixos>' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./nix-os/core.nix && $(ls ./result/bin/run-*) && rm *.qcow2
nix-build '<nixpkgs/nixos>' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./nix-os-configs/vm.nix && $(ls ./result/bin/run-*) && rm *.qcow2