diff --git a/flake.nix b/flake.nix index 6207a51..2f2bda4 100644 --- a/flake.nix +++ b/flake.nix @@ -19,10 +19,10 @@ }; outputs = inputs@{ - nixpkgs, - home-manager, - agenix, - ... + nixpkgs, + home-manager, + agenix, + ... }: let systems = [ @@ -37,15 +37,14 @@ ${s.name} = nixpkgs.lib.nixosSystem { inherit (s) system; modules = [ - ./lib ./hosts/${s.name} home-manager.nixosModules.home-manager agenix.nixosModules.default ]; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = inputs; + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.extraSpecialArgs = inputs; }; }) {} systems; }; diff --git a/hosts/nixos-test/default.nix b/hosts/nixos-test/default.nix index e25ea98..84ed6f2 100644 --- a/hosts/nixos-test/default.nix +++ b/hosts/nixos-test/default.nix @@ -42,6 +42,23 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; }; + modules = { + # users.florian = { + + # }; + + system = { + bluetooth.enable = true; + gamingKernel.enable = true; + # keymaps.layout = "fr"; + nvidia.enable = true; + pipewire.enable = true; + plymouth.enable = true; + printing.enable = true; + waydroid.enable = true; + }; + }; + # Configure for testing in vm virtualisation.vmVariant = { # following configuration is added only when building VM with build-vm diff --git a/lib/default.nix b/lib/default.nix deleted file mode 100644 index cf7d3b3..0000000 --- a/lib/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, ... }: - -let - applyHomeManagerConfig = { home-manager, ... }: let - applyConfig = user: { - home-manager.users.${user.name} = user.config; - }; - in - { - home-manager.users = lib.foldl' (acc: user: acc // applyConfig user) {} (lib.attrValues home-manager.users); - }; -in -{ - applyHomeManagerConfig = applyHomeManagerConfig; -} \ No newline at end of file diff --git a/modules/default.nix b/modules/default.nix index c1e82bb..855575f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,9 +2,9 @@ { imports = [ - ./cli - ./desktop - ./server + # ./cli + # ./desktop + # ./server ./system ]; } \ No newline at end of file diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index a2d21b4..ff5a81f 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -2,14 +2,8 @@ { imports = [ - ./chromium - ./flatpak - ./gamingKernel ./gnome ./hyprland - ./jetbrainsToolbox - ./kitty ./plasma - ./vscode ]; } \ No newline at end of file diff --git a/modules/desktop/plasma/default.nix b/modules/desktop/plasma/default.nix index 2a090df..4f48b4c 100644 --- a/modules/desktop/plasma/default.nix +++ b/modules/desktop/plasma/default.nix @@ -2,12 +2,12 @@ with lib; let - cfg = config.modules.system.plymouth; + cfg = config.modules.system.plasma; in { - options.modules.system.plymouth = { + options.modules.system.plasma = { enable = mkEnableOption '' - Enable plymouth with my custom configurations + Enable plasma with my custom configurations ''; }; config = mkIf cfg.enable { diff --git a/modules/desktop/chromium/default.nix b/modules/home/chromium/default.nix similarity index 100% rename from modules/desktop/chromium/default.nix rename to modules/home/chromium/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..ff42f42 --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./chromium + ./flatpak + ./jetbrainsToolbox + ./kitty + ./vscode + ]; +} \ No newline at end of file diff --git a/modules/desktop/flatpak/default.nix b/modules/home/flatpak/default.nix similarity index 100% rename from modules/desktop/flatpak/default.nix rename to modules/home/flatpak/default.nix diff --git a/modules/desktop/jetbrainsToolbox/default.nix b/modules/home/jetbrainsToolbox/default.nix similarity index 100% rename from modules/desktop/jetbrainsToolbox/default.nix rename to modules/home/jetbrainsToolbox/default.nix diff --git a/modules/desktop/kitty/default.nix b/modules/home/kitty/default.nix similarity index 100% rename from modules/desktop/kitty/default.nix rename to modules/home/kitty/default.nix diff --git a/modules/desktop/vscode/default.nix b/modules/home/vscode/default.nix similarity index 91% rename from modules/desktop/vscode/default.nix rename to modules/home/vscode/default.nix index 8f97373..25ca4e6 100644 --- a/modules/desktop/vscode/default.nix +++ b/modules/home/vscode/default.nix @@ -2,10 +2,10 @@ with lib; let - cfg = config.modules.desktop.vscode; + cfg = config.modules.home.vscode; in { - options.modules.desktop.vscode = { + options.modules.home.vscode = { enable = mkEnableOption '' Enable vscode with my custom configurations ''; diff --git a/modules/system/bluetooth/default.nix b/modules/system/bluetooth/default.nix index e32b824..3a8ba7e 100644 --- a/modules/system/bluetooth/default.nix +++ b/modules/system/bluetooth/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/system/default.nix b/modules/system/default.nix index 7c069ec..9a96ef3 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,13 +1,15 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ ./bluetooth - ./keymaps + ./gamingKernel + # ./keymaps ./nvidia ./pipewire ./plymouth ./printing + ./waydroid # Common configuration ./system.nix diff --git a/modules/desktop/gamingKernel/default.nix b/modules/system/gamingKernel/default.nix similarity index 57% rename from modules/desktop/gamingKernel/default.nix rename to modules/system/gamingKernel/default.nix index 202c935..51a7e1b 100644 --- a/modules/desktop/gamingKernel/default.nix +++ b/modules/system/gamingKernel/default.nix @@ -2,15 +2,15 @@ with lib; let - cfg = config.modules.desktop.gamingKernel; + cfg = config.modules.system.gamingKernel; in { - options.modules.desktop.gamingKernel = { + options.modules.system.gamingKernel = { enable = mkEnableOption '' Enable gaming kernel with my custom configurations ''; }; config = mkIf cfg.enable { - virtualisation.waydroid.enable = true; + boot.kernelPackages = pkgs.linuxPackages_zen; }; } \ No newline at end of file diff --git a/modules/system/keymaps/default.nix b/modules/system/keymaps/default.nix index 626c1aa..03be9c4 100644 --- a/modules/system/keymaps/default.nix +++ b/modules/system/keymaps/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let @@ -15,9 +15,5 @@ in type = types.string; }; }; - config = { - imports = [ - ./${cfg.layout} - ]; - }; + config = (import ./${cfg.layout}.nix {}); } \ No newline at end of file diff --git a/modules/system/keymaps/fr.nix b/modules/system/keymaps/fr.nix index 6bd3bd9..e3e2f1f 100644 --- a/modules/system/keymaps/fr.nix +++ b/modules/system/keymaps/fr.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { # Configure keymap in X11 services.xserver = { diff --git a/modules/system/keymaps/us.nix b/modules/system/keymaps/us.nix index ac53ffe..3093c19 100644 --- a/modules/system/keymaps/us.nix +++ b/modules/system/keymaps/us.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { # Configure keymap in X11 services.xserver = { diff --git a/modules/system/nvidia/default.nix b/modules/system/nvidia/default.nix index acd0414..539c267 100644 --- a/modules/system/nvidia/default.nix +++ b/modules/system/nvidia/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/system/pipewire/default.nix b/modules/system/pipewire/default.nix index aeeb3f7..f823798 100644 --- a/modules/system/pipewire/default.nix +++ b/modules/system/pipewire/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/system/plymouth/default.nix b/modules/system/plymouth/default.nix index 80f1acb..420d615 100644 --- a/modules/system/plymouth/default.nix +++ b/modules/system/plymouth/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/system/printing/default.nix b/modules/system/printing/default.nix index 451f589..e967439 100644 --- a/modules/system/printing/default.nix +++ b/modules/system/printing/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/system/system.nix b/modules/system/system.nix index 5540a7d..7f96ec6 100644 --- a/modules/system/system.nix +++ b/modules/system/system.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { # Set your time zone. diff --git a/modules/desktop/waydroid/default.nix b/modules/system/waydroid/default.nix similarity index 57% rename from modules/desktop/waydroid/default.nix rename to modules/system/waydroid/default.nix index 8960503..cdf5f48 100644 --- a/modules/desktop/waydroid/default.nix +++ b/modules/system/waydroid/default.nix @@ -2,15 +2,15 @@ with lib; let - cfg = config.modules.desktop.waydroid; + cfg = config.modules.system.waydroid; in { - options.modules.desktop.waydroid = { + options.modules.system.waydroid = { enable = mkEnableOption '' Enable waydroid with my custom configurations ''; }; config = mkIf cfg.enable { - boot.kernelPackages = pkgs.linuxPackages_zen; + virtualisation.waydroid.enable = true; }; } \ No newline at end of file