Added toggles to the flake, to select Desktop environment easily.

This commit is contained in:
2025-08-27 14:07:49 +02:00
parent a79e6e2098
commit 5ef38501e4
3 changed files with 13 additions and 8 deletions

View File

@ -25,6 +25,9 @@
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
hyprlandEnabled = false;
plasmaEnabled = true;
trayscale-flake = pkgs.buildGoModule {
pname = "trayscale-flake";
version = "0.18.3";
@ -61,16 +64,14 @@
nixos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs username version;
inherit inputs username version hyprlandEnabled;
trayscale-flake = trayscale-flake;
};
modules = [
./configuration.nix
./firefox.nix
./zsh.nix
./plasma/kde-plasma.nix
#./neovim.nix
./hyprland/hyprland.nix
./packages.nix
grub2-themes.nixosModules.default
home-manager.nixosModules.home-manager
@ -79,8 +80,11 @@
home-manager.useUserPackages = true;
home-manager.users.${username} = ./home.nix;
home-manager.backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
home-manager.extraSpecialArgs = { inherit inputs username version; system = "x86_64-linux"; };
home-manager.extraSpecialArgs = { inherit inputs username version hyprlandEnabled; system = "x86_64-linux"; };
}
#Conditional Modules!
] ++ (if hyprlandEnabled then [ ./hyprland/hyprland.nix ] else [ ]) ++ [
] ++ (if plasmaEnabled then [ ./plasma/kde-plasma.nix ] else [ ]) ++ [
];
};
};

View File

@ -1,4 +1,4 @@
{ inputs, config, pkgs, username, version, ... }:
{ lib, inputs, config, pkgs, username, version, hyprlandEnabled, ... }:
{
# Home Manager needs a bit of information about you and the
@ -10,8 +10,9 @@
inputs.zen-browser.homeModules.beta
# or inputs.zen-browser.homeModules.twilight
# or inputs.zen-browser.homeModules.twilight-official
./hyprland/hyprland-home.nix
];
#./hyprland/hyprland-home.nix
]
++ lib.optional hyprlandEnabled ./hyprland/hyprland-home.nix;
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage

View File

@ -37,7 +37,7 @@ in
source /etc/nixos/other/colors.sh
source /etc/nixos/other/pfp.sh
source /etc/nixos/other/theme-reminder.sh
source /etc/nixos/plasma/theme-reminder.sh
'';
#services.displayManager.sddm = {