diff --git a/modules/default.nix b/modules/default.nix index e56bc1b2..c7424141 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -10,5 +10,12 @@ ./starship.nix ./stylix.nix ./thunar.nix + ./user.nix ]; + + virtualisation.vmVariant = { + imports = [ + ./virtualization.nix + ]; + }; } diff --git a/modules/user.nix b/modules/user.nix new file mode 100644 index 00000000..ff429450 --- /dev/null +++ b/modules/user.nix @@ -0,0 +1,12 @@ +let VARIABLES = import ../src/variables.nix; in { + users = { + mutableUsers = false; + + users."${VARIABLES.username}" = { + isNormalUser = true; + uid = 1000; + password = "user"; + extraGroups = [ "wheel" "networkmanager" ]; + }; + }; +} diff --git a/modules/virtualization.nix b/modules/virtualization.nix new file mode 100644 index 00000000..e30a44e5 --- /dev/null +++ b/modules/virtualization.nix @@ -0,0 +1,17 @@ +{ + virtualisation = { + memorySize = 8192; + cores = 4; + }; + + virtualisation.qemu.options = [ + "-device virtio-vga-gl" + "-display sdl,gl=on,show-cursor=off" + "-full-screen" + "-audio pa,model=hda" + ]; + + environment.sessionVariables = { + WLR_NO_HARDWARE_CURSORS = "1"; + }; +} diff --git a/networks/default.nix b/networks/default.nix new file mode 100644 index 00000000..73c76099 --- /dev/null +++ b/networks/default.nix @@ -0,0 +1,16 @@ +{ + plasma = { + imports = [ + ../modules/virtualization.nix + ../modules/user.nix + ../modules/plasma.nix + ]; + }; + gnome = { + imports = [ + ../modules/virtualization.nix + ../modules/user.nix + ../modules/gnome.nix + ]; + }; +} diff --git a/src/main.nix b/src/main.nix index 462935aa..2e894029 100644 --- a/src/main.nix +++ b/src/main.nix @@ -194,16 +194,6 @@ let VARIABLES = import ./variables.nix; in { time.timeZone = "${VARIABLES.timezone}"; # Timezone # user - users = { - mutableUsers = false; - - users."${VARIABLES.username}" = { - isNormalUser = true; - uid = 1000; - password = "user"; - extraGroups = [ "wheel" "networkmanager" ]; - }; - }; home-manager.users.user = { home.username = VARIABLES.username; @@ -229,20 +219,6 @@ let VARIABLES = import ./variables.nix; in { systemd.services.NetworkManager-wait-online.enable = false; - # virtualization - virtualisation.vmVariant = { - virtualisation = { - memorySize = 8192; - cores = 4; - }; - - virtualisation.qemu.options = [ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" "-audio pa,model=hda" ]; - - environment.sessionVariables = { - WLR_NO_HARDWARE_CURSORS = "1"; - }; - }; - # mullvad-vpn services.mullvad-vpn = { enable = true;