diff --git a/flake.nix b/flake.nix index 61d0501..cd42021 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ common_modules = [ ./system/configuration.nix ./system/secrets.nix + ./system/specialisation.nix # nur.nixosModules.nur inputs.agenix.nixosModule inputs.hyprland.nixosModules.default diff --git a/system/specialisation.nix b/system/specialisation.nix new file mode 100644 index 0000000..c0e1498 --- /dev/null +++ b/system/specialisation.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: { + specialisation.dark-theme.configuration = { + nixpkgs.overlays = [ + (final: prev: { + uservars = prev.uservars; + }) + ]; + }; + specialisation.light-theme.configuration = { + nixpkgs.overlays = [ + (final: prev: { + uservars = prev.uservars // rec { + theme = prev.uservars.themes.light; + color = theme.color; + }; + }) + ]; + }; + environment.systemPackages = [ + (pkgs.writeShellScriptBin "theme" '' + sudo "/nix/var/nix/profiles/system/specialisation/$1-theme/bin/switch-to-configuration" test + '') + ]; +}