diff --git a/common/fragments/graphical/bspwm.nix b/common/fragments/graphical/bspwm.nix index bc073ec..a518687 100644 --- a/common/fragments/graphical/bspwm.nix +++ b/common/fragments/graphical/bspwm.nix @@ -7,12 +7,25 @@ "xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Scrolling Pixel Distance' 10" "setxkbmap" ]; - extraConfig = lib.strings.concatStringsSep "\n" - [ "nitrogen --set-zoom-fill ${../../../external/6.png}" ]; + extraConfig = let + startOnce = procs: map (v: "! pgrep ${v} && ${v} &") procs; + startup = startOnce [ + "firefox" + "element-desktop" + "telegram-desktop" + "spotify" + "geary" + ]; + in lib.strings.concatStringsSep "\n" ([ + "nitrogen --set-zoom-fill ${ + config.environment.graphical.colorschemes."${config.environment.graphical.theme.name}".image + }" + ] ++ startup); monitors = { eDP-1 = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" ]; }; settings = let color = n: - config.environment.graphical.colors.purple."${builtins.toString n}"; + config.environment.graphical.colors."${config.environment.graphical.theme.name}"."${builtins.toString + n}"; in { border_width = 3; window_gap = 15; @@ -43,8 +56,6 @@ "Yubico Authenticator".state = "floating"; "firefox:Places".state = "floating"; }; - startupPrograms = - [ "firefox" "element-desktop" "telegram-desktop" "spotify" "geary" ]; }; services.sxhkd = { diff --git a/common/fragments/graphical/default.nix b/common/fragments/graphical/default.nix index d5a184e..1a6ce4d 100644 --- a/common/fragments/graphical/default.nix +++ b/common/fragments/graphical/default.nix @@ -21,7 +21,9 @@ clipmenu colmena element-desktop + ffmpeg flameshot + gimp glib gnome.eog gnome.file-roller @@ -129,20 +131,39 @@ source = pkgs.fetchgit { url = "https://github.com/ZorinOS/zorin-desktop-themes.git"; rev = "6708d5148545c6d9a99712f63b5efe5a5c0eb2d9"; - sha256 = "sha256-4wLkBIAPX1UfYxfKeNx9DhCNDwbZ25ezp/d+GGQTECc="; - sparseCheckout = [ "ZorinPurple-Dark" ]; + sha256 = "sha256-3KEPP39dCr0ZjyqbAb/isoGdeiySDTvHL9k4oxcw19M="; + sparseCheckout = [ "ZorinPurple-Dark" "ZorinPurple-Light" ]; }; }; + gtk = { + enable = true; + theme.name = if config.environment.graphical.theme.light then + "ZorinPurple-Light" + else + "ZorinPurple-Dark"; + }; + programs.direnv.enable = true; home.sessionVariables = { "DIRENV_LOG_FORMAT" = ""; }; }; - environment.graphical.colorschemes.purple = { - image = ../../../external/6.png; - params = [ "--lighten" "0.05" "--bold-delta" "0.1" ]; + environment.graphical.colorschemes = { + purple = { + image = ../../../external/the_reliquary.png; + params = [ "--lighten" "0.05" "--bold-delta" "0.1" ]; + }; + purple-light = { + image = ../../../external/the_reliquary.png; + params = [ "--light" "--bold-delta" "0.2" "--saturate" "0.1" ]; + }; + blue = { image = ../../../external/blue.jpg; }; + dark = { image = ../../../external/the_falls_by_night.jpg; }; + }; + environment.graphical.theme.name = "dark"; + services.gvfs.enable = true; security.polkit.enable = true; programs.dconf.enable = true; @@ -176,6 +197,7 @@ (nerdfonts.override { fonts = [ "DaddyTimeMono" "NerdFontsSymbolsOnly" ]; }) cantarell-fonts cm_unicode + corefonts crimson dejavu_fonts fira-code diff --git a/common/fragments/graphical/dunst.nix b/common/fragments/graphical/dunst.nix index d266713..c1f1534 100644 --- a/common/fragments/graphical/dunst.nix +++ b/common/fragments/graphical/dunst.nix @@ -1,7 +1,8 @@ { lib, pkgs, config, ... }: let color = n: - config.environment.graphical.colors.purple."${builtins.toString n}"; + config.environment.graphical.colors."${config.environment.graphical.theme.name}"."${builtins.toString + n}"; in { home-manager.users.agatha = { services.dunst = { diff --git a/common/fragments/graphical/kitty.nix b/common/fragments/graphical/kitty.nix index d95c41b..df3e355 100644 --- a/common/fragments/graphical/kitty.nix +++ b/common/fragments/graphical/kitty.nix @@ -1,7 +1,8 @@ { pkgs, config, ... }: let color = n: - config.environment.graphical.colors.purple."${builtins.toString n}"; + config.environment.graphical.colors."${config.environment.graphical.theme.name}"."${builtins.toString + n}"; in { home-manager.users.agatha = { programs.kitty = { @@ -40,7 +41,7 @@ in { foreground = color 15; background = color 0; - cursor = color 16; + cursor = color 15; color0 = color 0; color8 = color 8; diff --git a/common/fragments/graphical/polybar.nix b/common/fragments/graphical/polybar.nix index 93f96c2..e80f9e2 100644 --- a/common/fragments/graphical/polybar.nix +++ b/common/fragments/graphical/polybar.nix @@ -27,7 +27,8 @@ settings = let color = n: - config.environment.graphical.colors.purple."${builtins.toString n}"; + config.environment.graphical.colors."${config.environment.graphical.theme.name}"."${builtins.toString + n}"; in { "colors" = { background = color 0; diff --git a/common/fragments/graphical/rofi.nix b/common/fragments/graphical/rofi.nix index 5589a17..a9ecced 100644 --- a/common/fragments/graphical/rofi.nix +++ b/common/fragments/graphical/rofi.nix @@ -1,7 +1,8 @@ { lib, pkgs, config, ... }: let color = n: - config.environment.graphical.colors.purple."${builtins.toString n}"; + config.environment.graphical.colors."${config.environment.graphical.theme.name}"."${builtins.toString + n}"; in { home-manager.users.agatha = { programs.rofi = { diff --git a/common/home_manager/helix.nix b/common/home_manager/helix.nix index 910c7ce..c7de2db 100644 --- a/common/home_manager/helix.nix +++ b/common/home_manager/helix.nix @@ -15,7 +15,10 @@ }]; }; settings = { - theme = "paramount-dark"; + theme = if config.environment.graphical.theme.light then + "paramount-light" + else + "paramount-dark"; editor = { middle-click-paste = false; scroll-lines = 4; diff --git a/common/options.nix b/common/options.nix new file mode 100644 index 0000000..6c2eb51 --- /dev/null +++ b/common/options.nix @@ -0,0 +1,19 @@ +{ lib, config, ... }: { + options = { + environment.graphical.theme = with lib; { + name = mkOption { type = types.str; }; + light = mkOption { + default = false; + type = types.bool; + }; + }; + }; + + config = let + theme = + config.environment.graphical.colorschemes."${config.environment.graphical.theme.name}"; + in { + environment.graphical.theme.light = builtins.elem "--light" theme.params + || builtins.elem "-l" theme.params; + }; +} diff --git a/external/blue.jpg b/external/blue.jpg new file mode 100644 index 0000000..7b8b23d Binary files /dev/null and b/external/blue.jpg differ diff --git a/external/credits.txt b/external/credits.txt new file mode 100644 index 0000000..fc8cfb5 --- /dev/null +++ b/external/credits.txt @@ -0,0 +1,3 @@ +the_reliquary.png: The Reliquary by Pete Amachree +blue.jpg: ??? +the_falls_by_night.jpg: Jungle Waterfall by Mark J. Ferrari \ No newline at end of file diff --git a/external/the_falls_by_night.jpg b/external/the_falls_by_night.jpg new file mode 100644 index 0000000..cca8cf1 Binary files /dev/null and b/external/the_falls_by_night.jpg differ diff --git a/external/6.png b/external/the_reliquary.png similarity index 100% rename from external/6.png rename to external/the_reliquary.png diff --git a/flake.lock b/flake.lock index a5b6678..cb24245 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1682020898, - "narHash": "sha256-XYSSFmqIjsvmgusWaOSD/WeaTyH8o83i+qma1BQgARU=", + "lastModified": 1686221213, + "narHash": "sha256-9Uc1jBc5a3EaOH80P6YPILL+GXlul7lEJIKAZ/BXELw=", "owner": "AgathaSorceress", "repo": "colorpickle", - "rev": "2574b83cb0454a146a0346bf0d6a134d62241e60", + "rev": "d1c210c494c0eaf69426ec411c2cf74c79b0129d", "type": "github" }, "original": { @@ -265,11 +265,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -306,11 +306,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1685487437, - "narHash": "sha256-hxcl/seMmFtFhr2Nv/bBEEVgcFSyrvE2MLMtQJtG9nM=", + "lastModified": 1686498407, + "narHash": "sha256-M4l3FheaCkxyp2W01K0gM2B32gpvlyW6+3B53v0H98o=", "owner": "helix-editor", "repo": "helix", - "rev": "d511122279b3b479362830305f4812f096273b6a", + "rev": "18e07addfd464844fc18833cfb1d1cd38c683c11", "type": "github" }, "original": { @@ -552,11 +552,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1685561376, - "narHash": "sha256-uIcJdaovXr55FJdmvR6yIN6IWoOL4amBj56e/T2KhgM=", + "lastModified": 1686398752, + "narHash": "sha256-nGWNQVhSw4VSL+S0D0cbrNR9vs9Bq7rlYR+1K5f5j6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bc3ec5eaa759d58e9fb1bdc9cfe94f74d0331b31", + "rev": "a30520bf8eabf8a5c37889d661e67a2dbcaa59e6", "type": "github" }, "original": { @@ -720,11 +720,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1685533922, - "narHash": "sha256-y4FCQpYafMQ42l1V+NUrMel9RtFtZo59PzdzflKR/lo=", + "lastModified": 1686331006, + "narHash": "sha256-hElRDWUNG655aqF0awu+h5cmDN+I/dQcChRt2tGuGGU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3a70dd92993182f8e514700ccf5b1ae9fc8a3b8d", + "rev": "85bcb95aa83be667e562e781e9d186c57a07d757", "type": "github" }, "original": { @@ -735,11 +735,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1684385584, - "narHash": "sha256-O7y0gK8OLIDqz+LaHJJyeu09IGiXlZIS3+JgEzGmmJA=", + "lastModified": 1686020360, + "narHash": "sha256-Wee7lIlZ6DIZHHLiNxU5KdYZQl0iprENXa/czzI6Cj4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a", + "rev": "4729ffac6fd12e26e5a8de002781ffc49b0e94b7", "type": "github" }, "original": { @@ -832,11 +832,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1684872357, - "narHash": "sha256-10NR2inbTZnD2XfAtZ55+T8nOZo5e0TWUg3667APHco=", + "lastModified": 1686173678, + "narHash": "sha256-aYzl34xb3u9I57sqkvSldQKltCnxhjvvLABjgFRxOVE=", "owner": "the-argus", "repo": "spicetify-nix", - "rev": "16022e436ab3fe28ff8b5272a36fcadc0845b060", + "rev": "f024752b691ac2dcb2ad378d72a2e3084ce83b79", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1b15eb1..4911ebe 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,7 @@ imports = [ ./common ./hosts/ritual/configuration.nix + ./common/options.nix (import "${home-manager}/nixos") url-eater.nixosModule colorpickle.nixosModules.default