diff --git a/flake.nix b/flake.nix index 8e17499..efe0d7a 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,7 @@ { nixpkgs.pkgs = pkgs; } ./system/configuration.nix ./system/secrets.nix + ./system/specialisation.nix ./system/greetd.nix { login-manager.greetd.enable = desktop == "sway"; } diff --git a/system/specialisation.nix b/system/specialisation.nix new file mode 100644 index 0000000..23b410f --- /dev/null +++ b/system/specialisation.nix @@ -0,0 +1,21 @@ +{ 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 + '') + ]; +} diff --git a/user/vscode/default.nix b/user/vscode/default.nix index a477666..35d972b 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -3,7 +3,7 @@ programs.vscode = { enable = true; - package = pkgs.vscodium-fhs; + package = pkgs.vscodium; extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide github.github-vscode-theme