diff --git a/flake.nix b/flake.nix index ff0760e..e52f654 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,9 @@ version = "25.05"; system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; + + hyprlandEnabled = false; + plasmaEnabled = true; trayscale-flake = pkgs.buildGoModule { pname = "trayscale-flake"; @@ -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 [ ]) ++ [ ]; }; }; diff --git a/home.nix b/home.nix index 50b548c..bb2f2db 100644 --- a/home.nix +++ b/home.nix @@ -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 diff --git a/plasma/kde-plasma.nix b/plasma/kde-plasma.nix index 1721432..f030e8e 100644 --- a/plasma/kde-plasma.nix +++ b/plasma/kde-plasma.nix @@ -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 = {