From 0249d17ac1c53eae78eef965f4e595d4114f1f2d Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sun, 19 May 2024 17:57:35 +0200 Subject: [PATCH] restructure desktop/wm and remove nur --- flake.lock | 136 ++++++------------ flake.nix | 13 +- hosts/configuration_desktop.nix | 5 - hosts/configuration_server.nix | 5 - hosts/default.nix | 44 ++---- hosts/desktop/default.nix | 6 +- hosts/desktop/home.nix | 4 +- hosts/dmz/default.nix | 4 +- hosts/jupiter/default.nix | 2 +- hosts/kabtop/default.nix | 4 +- hosts/laptop/default.nix | 8 +- hosts/laptop/home.nix | 4 +- hosts/nas/default.nix | 2 +- hosts/nasbackup/default.nix | 2 +- hosts/server/default.nix | 2 +- hosts/steamdeck/default.nix | 8 +- hosts/steamdeck/home.nix | 4 +- modules/programs/default.nix | 2 +- modules/wm/default.nix | 16 +++ modules/{desktop => wm}/gnome/default.nix | 0 modules/{desktop => wm}/gnome/home.nix | 0 modules/{desktop => wm}/hyprland/default.nix | 0 modules/{desktop => wm}/hyprland/home.nix | 0 modules/{desktop => wm}/kde/default.nix | 0 modules/{desktop => wm}/kde/home.nix | 0 modules/{desktop => wm}/scripts/2in1screen | Bin modules/{desktop => wm}/steam/default.nix | 0 modules/{desktop => wm}/steam/home.nix | 0 modules/{desktop => wm}/sway/default.nix | 5 +- modules/{desktop => wm}/sway/home.nix | 0 .../virtualisation/default.nix | 0 .../{desktop => wm}/virtualisation/docker.nix | 0 .../virtualisation/kvm-amd.nix | 0 .../virtualisation/kvm-intel.nix | 0 .../{desktop => wm}/virtualisation/qemu.nix | 0 modules/{programs => wm}/waybar.nix | 8 -- 36 files changed, 98 insertions(+), 186 deletions(-) create mode 100644 modules/wm/default.nix rename modules/{desktop => wm}/gnome/default.nix (100%) rename modules/{desktop => wm}/gnome/home.nix (100%) rename modules/{desktop => wm}/hyprland/default.nix (100%) rename modules/{desktop => wm}/hyprland/home.nix (100%) rename modules/{desktop => wm}/kde/default.nix (100%) rename modules/{desktop => wm}/kde/home.nix (100%) rename modules/{desktop => wm}/scripts/2in1screen (100%) rename modules/{desktop => wm}/steam/default.nix (100%) rename modules/{desktop => wm}/steam/home.nix (100%) rename modules/{desktop => wm}/sway/default.nix (95%) rename modules/{desktop => wm}/sway/home.nix (100%) rename modules/{desktop => wm}/virtualisation/default.nix (100%) rename modules/{desktop => wm}/virtualisation/docker.nix (100%) rename modules/{desktop => wm}/virtualisation/kvm-amd.nix (100%) rename modules/{desktop => wm}/virtualisation/kvm-intel.nix (100%) rename modules/{desktop => wm}/virtualisation/qemu.nix (100%) rename modules/{programs => wm}/waybar.nix (96%) diff --git a/flake.lock b/flake.lock index 4eb8269..5fa0dd4 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1715101957, - "narHash": "sha256-fs5uVQFTfgb4L9pnhldeyTHNcYwn1U4nKYoCBJ6W3W4=", + "lastModified": 1715290355, + "narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=", "owner": "ryantm", "repo": "agenix", - "rev": "07479c2e7396acaaaac5925483498154034ea80a", + "rev": "8d37c5bdeade12b6479c85acd133063ab53187a0", "type": "github" }, "original": { @@ -163,11 +163,11 @@ ] }, "locked": { - "lastModified": 1714641030, - "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "type": "github" }, "original": { @@ -245,24 +245,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -335,11 +317,11 @@ ] }, "locked": { - "lastModified": 1715077503, - "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", + "lastModified": 1715930644, + "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e277d9566de9976f47228dd8c580b97488734d4", + "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", "type": "github" }, "original": { @@ -355,11 +337,11 @@ ] }, "locked": { - "lastModified": 1714043624, - "narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=", + "lastModified": 1715381426, + "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", "owner": "nix-community", "repo": "home-manager", - "rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411", + "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", "type": "github" }, "original": { @@ -377,11 +359,11 @@ ] }, "locked": { - "lastModified": 1715077503, - "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", + "lastModified": 1715930644, + "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e277d9566de9976f47228dd8c580b97488734d4", + "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", "type": "github" }, "original": { @@ -413,11 +395,11 @@ ] }, "locked": { - "lastModified": 1715173236, - "narHash": "sha256-Ulq7fV0V1TqbYTXcDcRYrnMBwAvXJGfv4fnpaXXpsY0=", + "lastModified": 1716107076, + "narHash": "sha256-aB15oIMUv6N/UFsLHzgcGRUvU4YfOjE3gEirIP/k82s=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "c8af9ea43d928f1e1f2c0ac100e75519ea76565d", + "rev": "e8de93b7b4c384650977a20c1f192e23c6e7a12f", "type": "github" }, "original": { @@ -462,11 +444,11 @@ "spectrum": "spectrum" }, "locked": { - "lastModified": 1714764302, - "narHash": "sha256-MmIZR67wOP3Nr9b3XpsvHSZSTDcTmd9cQn2Z8pW1/Hw=", + "lastModified": 1715787097, + "narHash": "sha256-TPp2j0ttvBvkk4oXidvo8Y071zEab0BtcNsC3ZEkluI=", "owner": "astro", "repo": "microvm.nix", - "rev": "e9977efbe34b554c3e393dc9a18509905a4080e5", + "rev": "fa673bf8656fe6f28253b83971a36999bc9995d2", "type": "github" }, "original": { @@ -483,11 +465,11 @@ ] }, "locked": { - "lastModified": 1713946171, - "narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=", + "lastModified": 1715901937, + "narHash": "sha256-eMyvWP56ZOdraC2IOvZo0/RTDcrrsqJ0oJWDC76JTak=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7", + "rev": "ffc01182f90118119930bdfc528c1ee9a39ecef8", "type": "github" }, "original": { @@ -520,11 +502,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1715148395, - "narHash": "sha256-lRxjTxY3103LGMjWdVqntKZHhlmMX12QUjeFrQMmGaE=", + "lastModified": 1716034089, + "narHash": "sha256-QBfab6V4TeQ6Y4NiXVrEATdQuhCNFNaXt/L1K/Zw+zc=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a", + "rev": "b55712de78725c8fcde422ee0a0fe682046e73c3", "type": "github" }, "original": { @@ -536,11 +518,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1715106579, - "narHash": "sha256-gZMgKEGiK6YrwGBiccZ1gemiUwjsZ1Zv49KYOgmX2fY=", + "lastModified": 1716061101, + "narHash": "sha256-H0eCta7ahEgloGIwE/ihkyGstOGu+kQwAiHvwVoXaA0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8be0d8a1ed4f96d99b09aa616e2afd47acc3da89", + "rev": "e7cc61784ddf51c81487637b3031a6dd2d6673a2", "type": "github" }, "original": { @@ -568,11 +550,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1715087517, - "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", + "lastModified": 1715961556, + "narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", + "rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64", "type": "github" }, "original": { @@ -597,11 +579,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1715115147, - "narHash": "sha256-oREqXPEtuYbOdBKbsDQzr2V01EzK4kD8MTdwO9ljTnU=", + "lastModified": 1716125991, + "narHash": "sha256-PmB9vmp383foiVi64RawbnkC+6SiYiWUjdzw2xgl3eM=", "owner": "nix-community", "repo": "nixvim", - "rev": "f7f255afe22fcca0c07177c3707fd61fa0c85835", + "rev": "88ade1dfaa017499326103a078c66dd5d4d0606e", "type": "github" }, "original": { @@ -610,25 +592,9 @@ "type": "github" } }, - "nur": { - "locked": { - "lastModified": 1715272890, - "narHash": "sha256-Dpm+2/Kdv1PsYAiLEE1fbft0+bQ3Ou7wwYZg+ZaUNes=", - "owner": "nix-community", - "repo": "NUR", - "rev": "3e3d54d319c9384f2ad1d4b85f8851b14f4edcc9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", "nixpkgs": [ "nixvim", @@ -640,11 +606,11 @@ ] }, "locked": { - "lastModified": 1714478972, - "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", + "lastModified": 1715870890, + "narHash": "sha256-nacSOeXtUEM77Gn0G4bTdEOeFIrkCBXiyyFZtdGwuH0=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "2849da033884f54822af194400f8dff435ada242", + "rev": "fa606cccd7b0ccebe2880051208e4a0f61bfc8c1", "type": "github" }, "original": { @@ -696,8 +662,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", - "nixvim": "nixvim", - "nur": "nur" + "nixvim": "nixvim" } }, "rust-overlay": { @@ -801,21 +766,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -824,11 +774,11 @@ ] }, "locked": { - "lastModified": 1714058656, - "narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=", + "lastModified": 1715940852, + "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f", + "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1cfcfa9..85bab21 100644 --- a/flake.nix +++ b/flake.nix @@ -9,11 +9,6 @@ { description = "Kabbone's peronal NixOS Flake config"; - # nixConfig = { - # extra-substituters = [ "https://app.cachix.org/cache/0uptime" ]; - # extra-trusted-public-keys = [ "0uptime.cachix.org-1:ctw8yknBLg9cZBdqss+5krAem0sHYdISkw/IFdRbYdE=" ]; - # }; - inputs = # All flake references used to build my NixOS setup. These are dependencies. { nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Nix Packages @@ -37,10 +32,6 @@ inputs.nixpkgs.follows = "nixpkgs-unstable"; }; - nur = { - url = "github:nix-community/NUR"; # NUR Packages - }; - agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -62,7 +53,7 @@ }; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, nur, agenix, jovian-nixos, microvm, impermanence, lanzaboote, nixvim, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. + outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, nixvim, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. let # Variables that can be used in the config files user = "kabbone"; userdmz = "diablo"; @@ -73,7 +64,7 @@ nixosConfigurations = ( # NixOS configurations import ./hosts { # Imports ./hosts/default.nix inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable nur user userdmz userserver location agenix jovian-nixos microvm impermanence lanzaboote nixvim; # Also inherit home-manager so it does not need to be defined here. + inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable user userdmz userserver location agenix jovian-nixos microvm impermanence lanzaboote nixvim; # Also inherit home-manager so it does not need to be defined here. nix.allowedUsers = [ "@wheel" ]; security.sudo.execWheelOnly = true; } diff --git a/hosts/configuration_desktop.nix b/hosts/configuration_desktop.nix index 4d6b7bf..f69f3c1 100644 --- a/hosts/configuration_desktop.nix +++ b/hosts/configuration_desktop.nix @@ -182,11 +182,6 @@ ''; }; nixpkgs.config.allowUnfree = true; # Allow proprietary software. - nixpkgs.config.packageOverrides = pkgs: { - nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { - inherit pkgs; - }; - }; system = { # NixOS settings autoUpgrade = { # Allow auto update diff --git a/hosts/configuration_server.nix b/hosts/configuration_server.nix index acad7d7..ebc7258 100644 --- a/hosts/configuration_server.nix +++ b/hosts/configuration_server.nix @@ -132,11 +132,6 @@ ''; }; nixpkgs.config.allowUnfree = true; # Allow proprietary software. - nixpkgs.config.packageOverrides = pkgs: { - nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { - inherit pkgs; - }; - }; system = { # NixOS settings autoUpgrade = { # Allow auto update diff --git a/hosts/default.nix b/hosts/default.nix index 449a150..62623cd 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,7 +11,7 @@ # └─ ./home.nix # -{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, nur, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, impermanence, lanzaboote, nixvim, ... }: +{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, impermanence, lanzaboote, nixvim, ... }: let system = "x86_64-linux"; # System architecture @@ -28,10 +28,9 @@ in { desktop = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix microvm nixpkgs lanzaboote nixvim; }; + specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote nixvim; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur microvm.nixosModules.host lanzaboote.nixosModules.lanzaboote #nixvim.nixosModules.nixvim @@ -44,9 +43,6 @@ in home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -59,10 +55,9 @@ in laptop = lib.nixosSystem { # Laptop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; + specialArgs = { inherit inputs user location nixos-hardware agenix; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur ./laptop ./configuration_desktop.nix ../modules/hardware/remoteClient.nix @@ -71,9 +66,6 @@ in nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -86,10 +78,9 @@ in steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix jovian-nixos lanzaboote; }; + specialArgs = { inherit inputs user location nixos-hardware agenix jovian-nixos lanzaboote; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur jovian-nixos.nixosModules.default lanzaboote.nixosModules.lanzaboote ./steamdeck @@ -100,9 +91,6 @@ in nixos-hardware.nixosModules.common-pc-ssd home-manager-unstable.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -115,20 +103,16 @@ in server = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs impermanence; }; + specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; }; modules = [ agenix.nixosModules.default microvm.nixosModules.host - nur.nixosModules.nur ./server ./configuration_server.nix nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -163,10 +147,9 @@ in nasbak = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; + specialArgs = { inherit inputs user location nixos-hardware agenix; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur ./nasbackup ./configuration_desktop.nix ../modules/hardware/remoteClient.nix @@ -174,9 +157,6 @@ in nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -189,10 +169,9 @@ in jupiter = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix; }; + specialArgs = { inherit inputs user location nixos-hardware agenix; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur ./jupiter ./configuration_desktop.nix ../modules/hardware/remoteClient.nix @@ -200,9 +179,6 @@ in nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; @@ -215,19 +191,15 @@ in dmz = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs impermanence; }; + specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; }; modules = [ agenix.nixosModules.default - nur.nixosModules.nur microvm.nixosModules.host ./dmz ./configuration_server.nix nixos-hardware.nixosModules.common-pc-ssd home-manager.nixosModules.home-manager { - nixpkgs.overlays = [ - nur.overlay - ]; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit user; }; diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 10eecad..a48657f 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -22,9 +22,9 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/desktop/sway/default.nix)] ++ # Window Manager - (import ../../modules/desktop/virtualisation) ++ # libvirt + Docker - [(import ../../modules/desktop/virtualisation/kvm-amd.nix)] ++ # kvm module options + [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager + (import ../../modules/wm/virtualisation) ++ # libvirt + Docker + [(import ../../modules/wm/virtualisation/kvm-amd.nix)] ++ # kvm module options (import ../../modules/hardware); # Hardware devices boot = { # Boot options diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 4ebfdb2..7165135 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -16,8 +16,8 @@ { imports = [ - #../../modules/desktop/hyprland/home.nix # Window Manager - ../../modules/desktop/sway/home.nix # Window Manager + #../../modules/wm/hyprland/home.nix # Window Manager + ../../modules/wm/sway/home.nix # Window Manager ../../modules/home.nix # Window Manager ]; diff --git a/hosts/dmz/default.nix b/hosts/dmz/default.nix index 59a51a2..05b7039 100644 --- a/hosts/dmz/default.nix +++ b/hosts/dmz/default.nix @@ -22,8 +22,8 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker - [(import ../../modules/desktop/virtualisation/kvm-intel.nix)] ++ # Docker + [(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker + [(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++ # Docker (import ../../modules/services/dmz) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/jupiter/default.nix b/hosts/jupiter/default.nix index a82bc42..0a4cdc8 100644 --- a/hosts/jupiter/default.nix +++ b/hosts/jupiter/default.nix @@ -22,7 +22,7 @@ { imports = # For now, if applying to other ssystem, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - #(import ../../modules/desktop/virtualisation) ++ # Docker + #(import ../../modules/wm/virtualisation) ++ # Docker (import ../../modules/services/nas) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/kabtop/default.nix b/hosts/kabtop/default.nix index e61a0e0..e405831 100644 --- a/hosts/kabtop/default.nix +++ b/hosts/kabtop/default.nix @@ -22,8 +22,8 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker - [(import ../../modules/desktop/virtualisation/kvm-amd.nix)] ++ # kvm module options + [(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker + [(import ../../modules/wm/virtualisation/kvm-amd.nix)] ++ # kvm module options (import ../../modules/services/server) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 06ac488..4df69f8 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -22,10 +22,10 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - #[(import ../../modules/desktop/hyprland/default.nix)] ++ # Window Manager - [(import ../../modules/desktop/sway/default.nix)] ++ # Window Manager - [(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker - [(import ../../modules/desktop/virtualisation/kvm-intel.nix)] ++ # kvm module options + #[(import ../../modules/wm/hyprland/default.nix)] ++ # Window Manager + [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager + [(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker + [(import ../../modules/wm/virtualisation/kvm-intel.nix)] ++ # kvm module options (import ../../modules/hardware); # Hardware devices boot = { # Boot options diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index ad7f755..d75f667 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -16,8 +16,8 @@ { imports = [ - #../../modules/desktop/hyprland/home.nix # Window Manager - ../../modules/desktop/sway/home.nix # Window Manager + #../../modules/wm/hyprland/home.nix # Window Manager + ../../modules/wm/sway/home.nix # Window Manager ../../modules/home.nix # Window Manager ]; diff --git a/hosts/nas/default.nix b/hosts/nas/default.nix index 1812420..f74cc34 100644 --- a/hosts/nas/default.nix +++ b/hosts/nas/default.nix @@ -22,7 +22,7 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - (import ../../modules/desktop/virtualisation) ++ # Docker + (import ../../modules/wm/virtualisation) ++ # Docker (import ../../modules/services/nas) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/nasbackup/default.nix b/hosts/nasbackup/default.nix index 9705814..117ac24 100644 --- a/hosts/nasbackup/default.nix +++ b/hosts/nasbackup/default.nix @@ -22,7 +22,7 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - #[(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker + #[(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker (import ../../modules/services/nasbackup) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/server/default.nix b/hosts/server/default.nix index d4b4187..75eb746 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -22,7 +22,7 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker + [(import ../../modules/wm/virtualisation/docker.nix)] ++ # Docker (import ../../modules/services/server) ++ # Server Services (import ../../modules/hardware); # Hardware devices diff --git a/hosts/steamdeck/default.nix b/hosts/steamdeck/default.nix index e3d1d4d..21b3fbe 100644 --- a/hosts/steamdeck/default.nix +++ b/hosts/steamdeck/default.nix @@ -22,10 +22,10 @@ { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/desktop/steam/default.nix)] ++ # jovian steam - [(import ../../modules/desktop/kde/default.nix)] ++ # Window Manager - (import ../../modules/desktop/virtualisation) ++ # libvirt + Docker - [(import ../../modules/desktop/virtualisation/kvm-amd.nix)] ++ # kvm module options + [(import ../../modules/wm/steam/default.nix)] ++ # jovian steam + [(import ../../modules/wm/kde/default.nix)] ++ # Window Manager + (import ../../modules/wm/virtualisation) ++ # libvirt + Docker + [(import ../../modules/wm/virtualisation/kvm-amd.nix)] ++ # kvm module options (import ../../modules/hardware); # Hardware devices boot = { # Boot options diff --git a/hosts/steamdeck/home.nix b/hosts/steamdeck/home.nix index b0cac2a..aa7b635 100644 --- a/hosts/steamdeck/home.nix +++ b/hosts/steamdeck/home.nix @@ -16,8 +16,8 @@ { imports = [ - ../../modules/desktop/steam/home.nix # Window Manager - ../../modules/desktop/kde/home.nix # Window Manager + ../../modules/wm/steam/home.nix # Window Manager + ../../modules/wm/kde/home.nix # Window Manager ../../modules/home.nix # Window Manager ]; diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 3e8c020..df309ed 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -17,5 +17,5 @@ #./waybar.nix #./games.nix ] -# Waybar.nix is pulled from modules/desktop/.. +# Waybar.nix is pulled from modules/wm/.. # Games.nix is pulled from desktop/default.nix diff --git a/modules/wm/default.nix b/modules/wm/default.nix new file mode 100644 index 0000000..70eaa78 --- /dev/null +++ b/modules/wm/default.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, config, ... }: + +{ + options = { + desktop = { + wm = lib.mkOption { type = types.str; default = "sway"; }; + taskbar = lib.mkOption { type = types.str; default = "waybar"; }; + launcher = lib.mkOption { type = types.str; default = "bemenu"; }; + }; + }; + + config = { + imports = + (import ./ + (desktop.wm)) ++ + }; +} diff --git a/modules/desktop/gnome/default.nix b/modules/wm/gnome/default.nix similarity index 100% rename from modules/desktop/gnome/default.nix rename to modules/wm/gnome/default.nix diff --git a/modules/desktop/gnome/home.nix b/modules/wm/gnome/home.nix similarity index 100% rename from modules/desktop/gnome/home.nix rename to modules/wm/gnome/home.nix diff --git a/modules/desktop/hyprland/default.nix b/modules/wm/hyprland/default.nix similarity index 100% rename from modules/desktop/hyprland/default.nix rename to modules/wm/hyprland/default.nix diff --git a/modules/desktop/hyprland/home.nix b/modules/wm/hyprland/home.nix similarity index 100% rename from modules/desktop/hyprland/home.nix rename to modules/wm/hyprland/home.nix diff --git a/modules/desktop/kde/default.nix b/modules/wm/kde/default.nix similarity index 100% rename from modules/desktop/kde/default.nix rename to modules/wm/kde/default.nix diff --git a/modules/desktop/kde/home.nix b/modules/wm/kde/home.nix similarity index 100% rename from modules/desktop/kde/home.nix rename to modules/wm/kde/home.nix diff --git a/modules/desktop/scripts/2in1screen b/modules/wm/scripts/2in1screen similarity index 100% rename from modules/desktop/scripts/2in1screen rename to modules/wm/scripts/2in1screen diff --git a/modules/desktop/steam/default.nix b/modules/wm/steam/default.nix similarity index 100% rename from modules/desktop/steam/default.nix rename to modules/wm/steam/default.nix diff --git a/modules/desktop/steam/home.nix b/modules/wm/steam/home.nix similarity index 100% rename from modules/desktop/steam/home.nix rename to modules/wm/steam/home.nix diff --git a/modules/desktop/sway/default.nix b/modules/wm/sway/default.nix similarity index 95% rename from modules/desktop/sway/default.nix rename to modules/wm/sway/default.nix index a8711a2..569e90c 100644 --- a/modules/desktop/sway/default.nix +++ b/modules/wm/sway/default.nix @@ -11,10 +11,10 @@ # └─ hyprland.nix * # -{ config, lib, user, pkgs, ... }: +{ config, lib, user, pkgs, desktop, ... }: { - imports = [ ../../programs/waybar.nix ]; + imports = [ ../waybar.nix ]; hardware.opengl = { enable = true; @@ -40,6 +40,7 @@ rocmPackages.clr.icd rocmPackages.clr clinfo + waybar ]; }; diff --git a/modules/desktop/sway/home.nix b/modules/wm/sway/home.nix similarity index 100% rename from modules/desktop/sway/home.nix rename to modules/wm/sway/home.nix diff --git a/modules/desktop/virtualisation/default.nix b/modules/wm/virtualisation/default.nix similarity index 100% rename from modules/desktop/virtualisation/default.nix rename to modules/wm/virtualisation/default.nix diff --git a/modules/desktop/virtualisation/docker.nix b/modules/wm/virtualisation/docker.nix similarity index 100% rename from modules/desktop/virtualisation/docker.nix rename to modules/wm/virtualisation/docker.nix diff --git a/modules/desktop/virtualisation/kvm-amd.nix b/modules/wm/virtualisation/kvm-amd.nix similarity index 100% rename from modules/desktop/virtualisation/kvm-amd.nix rename to modules/wm/virtualisation/kvm-amd.nix diff --git a/modules/desktop/virtualisation/kvm-intel.nix b/modules/wm/virtualisation/kvm-intel.nix similarity index 100% rename from modules/desktop/virtualisation/kvm-intel.nix rename to modules/wm/virtualisation/kvm-intel.nix diff --git a/modules/desktop/virtualisation/qemu.nix b/modules/wm/virtualisation/qemu.nix similarity index 100% rename from modules/desktop/virtualisation/qemu.nix rename to modules/wm/virtualisation/qemu.nix diff --git a/modules/programs/waybar.nix b/modules/wm/waybar.nix similarity index 96% rename from modules/programs/waybar.nix rename to modules/wm/waybar.nix index 825f8b9..1105e88 100644 --- a/modules/programs/waybar.nix +++ b/modules/wm/waybar.nix @@ -9,14 +9,6 @@ waybar ]; -# nixpkgs.overlays = [ # Waybar needs to be compiled with the experimental flag for wlr/workspaces to work -# (self: super: { -# waybar = super.waybar.overrideAttrs (oldAttrs: { -# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; -# }); -# }) -# ]; - home-manager.users.${user} = { # Home-manager waybar config programs.waybar = { enable = true;