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

@ -24,6 +24,9 @@
version = "25.05"; version = "25.05";
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
hyprlandEnabled = false;
plasmaEnabled = true;
trayscale-flake = pkgs.buildGoModule { trayscale-flake = pkgs.buildGoModule {
pname = "trayscale-flake"; pname = "trayscale-flake";
@ -61,16 +64,14 @@
nixos = nixpkgs.lib.nixosSystem { nixos = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit inputs username version; inherit inputs username version hyprlandEnabled;
trayscale-flake = trayscale-flake; trayscale-flake = trayscale-flake;
}; };
modules = [ modules = [
./configuration.nix ./configuration.nix
./firefox.nix ./firefox.nix
./zsh.nix ./zsh.nix
./plasma/kde-plasma.nix
#./neovim.nix #./neovim.nix
./hyprland/hyprland.nix
./packages.nix ./packages.nix
grub2-themes.nixosModules.default grub2-themes.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
@ -79,8 +80,11 @@
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.${username} = ./home.nix; home-manager.users.${username} = ./home.nix;
home-manager.backupFileExtension = "backup"; # Automatically backs up conflicting files during activation 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 # Home Manager needs a bit of information about you and the
@ -10,8 +10,9 @@
inputs.zen-browser.homeModules.beta inputs.zen-browser.homeModules.beta
# or inputs.zen-browser.homeModules.twilight # or inputs.zen-browser.homeModules.twilight
# or inputs.zen-browser.homeModules.twilight-official # 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 # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # 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/colors.sh
source /etc/nixos/other/pfp.sh source /etc/nixos/other/pfp.sh
source /etc/nixos/other/theme-reminder.sh source /etc/nixos/plasma/theme-reminder.sh
''; '';
#services.displayManager.sddm = { #services.displayManager.sddm = {