diff --git a/common/fragments/graphical/default.nix b/common/fragments/graphical/default.nix index f55e1b7..4344b45 100644 --- a/common/fragments/graphical/default.nix +++ b/common/fragments/graphical/default.nix @@ -1,16 +1,19 @@ { pkgs, config, lib, ... }: { imports = [ - ./bspwm.nix - ./picom.nix + ../restic.nix ./audio.nix - ./polybar.nix + ./bspwm.nix ./dunst.nix - ./rofi.nix + ./element.nix ./iosevka.nix ./kitty.nix - ./element.nix - ./url-eater.nix + ./lockscreen.nix + ./picom.nix + ./polybar.nix + ./rofi.nix ./spotify.nix + ./theme.nix + ./url-eater.nix ]; nixpkgs.overlays = [ @@ -132,62 +135,6 @@ : "/html " ''; - # Cursor theme - home.pointerCursor = { - name = "Adwaita"; - package = pkgs.gnome.adwaita-icon-theme; - size = 24; - x11 = { - enable = true; - defaultCursor = "Adwaita"; - }; - }; - - # Lockscreen - services.betterlockscreen = { - enable = true; - arguments = [ "dimblur" ]; - }; - - # Update lockscreen wallpaper after locking - xdg.configFile."betterlockscreen/custom-post.sh".text = - "betterlockscreen -u ${ - config.environment.graphical.colorschemes."${config.environment.graphical.theme.name}".image - }"; - - # Send a notification 10 seconds before locking - services.screen-locker.xautolock.extraOptions = [ - "-notify 10" - "-notifier '${pkgs.dunst}/bin/dunstify -t 10000 -u 2 \"Screen will lock in 10 seconds\"'" - ]; - - # GTK theme - home.file.".themes" = { - recursive = true; - source = pkgs.fetchgit { - url = "https://github.com/ZorinOS/zorin-desktop-themes.git"; - rev = "6708d5148545c6d9a99712f63b5efe5a5c0eb2d9"; - sha256 = "sha256-3KEPP39dCr0ZjyqbAb/isoGdeiySDTvHL9k4oxcw19M="; - sparseCheckout = [ "ZorinPurple-Dark" "ZorinPurple-Light" ]; - }; - }; - - gtk = { - enable = true; - font.name = "Cantarell"; - font.size = 12; - theme.name = if config.environment.graphical.theme.light then - "ZorinPurple-Light" - else - "ZorinPurple-Dark"; - }; - - programs.helix.settings.theme = - if config.environment.graphical.theme.light then - "paramount-light" - else - "paramount-dark"; - programs.direnv.enable = true; home.sessionVariables = { "DIRENV_LOG_FORMAT" = ""; }; @@ -233,21 +180,6 @@ }; }; - 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; diff --git a/common/fragments/graphical/lockscreen.nix b/common/fragments/graphical/lockscreen.nix new file mode 100644 index 0000000..f3ff7b6 --- /dev/null +++ b/common/fragments/graphical/lockscreen.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: { + home-manager.users.agatha = { + # Lockscreen + services.betterlockscreen = { + enable = true; + arguments = [ "dimblur" ]; + }; + + # Update lockscreen wallpaper after locking + xdg.configFile."betterlockscreen/custom-post.sh".text = + "betterlockscreen -u ${ + config.environment.graphical.colorschemes."${config.environment.graphical.theme.name}".image + }"; + + # Send a notification 10 seconds before locking + services.screen-locker.xautolock.extraOptions = [ + "-notify 10" + "-notifier '${pkgs.xscreensaver}/bin/xscreensaver-command --activate'" + ]; + services.xscreensaver = { + enable = true; + settings = { + dpmsEnabled = "False"; + mode = "off"; + }; + }; + }; +} diff --git a/common/fragments/graphical/theme.nix b/common/fragments/graphical/theme.nix new file mode 100644 index 0000000..8042342 --- /dev/null +++ b/common/fragments/graphical/theme.nix @@ -0,0 +1,61 @@ +{ config, pkgs, ... }: { + 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; + params = [ "--backend" "color-thief" ]; + }; + bridge = { + image = ../../../external/the_bridge.png; + params = [ "--saturate" "0.05" ]; + }; + }; + + home-manager.users.agatha = { + # Cursor theme + home.pointerCursor = { + name = "Adwaita"; + package = pkgs.gnome.adwaita-icon-theme; + size = 24; + x11 = { + enable = true; + defaultCursor = "Adwaita"; + }; + }; + + # GTK theme + home.file.".themes" = { + recursive = true; + source = pkgs.fetchgit { + url = "https://github.com/ZorinOS/zorin-desktop-themes.git"; + rev = "6708d5148545c6d9a99712f63b5efe5a5c0eb2d9"; + sha256 = "sha256-3KEPP39dCr0ZjyqbAb/isoGdeiySDTvHL9k4oxcw19M="; + sparseCheckout = [ "ZorinPurple-Dark" "ZorinPurple-Light" ]; + }; + }; + + gtk = { + enable = true; + font.name = "Cantarell"; + font.size = 12; + theme.name = if config.environment.graphical.theme.light then + "ZorinPurple-Light" + else + "ZorinPurple-Dark"; + }; + + programs.helix.settings.theme = + if config.environment.graphical.theme.light then + "paramount-light" + else + "paramount-dark"; + }; +} diff --git a/external/credits.txt b/external/credits.txt index fc8cfb5..1e4396e 100644 --- a/external/credits.txt +++ b/external/credits.txt @@ -1,3 +1,4 @@ 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 +the_falls_by_night.jpg: Jungle Waterfall by Mark J. Ferrari +the_bridge.png: The Bridge by ReFiend diff --git a/external/the_bridge.png b/external/the_bridge.png new file mode 100644 index 0000000..ce1fe5e Binary files /dev/null and b/external/the_bridge.png differ diff --git a/hosts/ritual/configuration.nix b/hosts/ritual/configuration.nix index 163d87e..c0d470d 100644 --- a/hosts/ritual/configuration.nix +++ b/hosts/ritual/configuration.nix @@ -64,6 +64,8 @@ }; }; + environment.graphical.theme.name = "dark"; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/tears/configuration.nix b/hosts/tears/configuration.nix index 37b0741..93745fc 100644 --- a/hosts/tears/configuration.nix +++ b/hosts/tears/configuration.nix @@ -73,6 +73,7 @@ }; }; + environment.graphical.theme.name = "bridge"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave