Add per-host themes; Update lockscreen config; Refactor module structure

This commit is contained in:
Agatha Lovelace 2023-10-04 14:56:46 +02:00
parent 0d320cd733
commit 156ab1c904
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
7 changed files with 103 additions and 78 deletions

View File

@ -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 @@
<Multi_key> <m><s> : "/html <span data-mx-spoiler=\"\"></span>"
'';
# 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;

View File

@ -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";
};
};
};
}

View File

@ -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";
};
}

View File

@ -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
the_falls_by_night.jpg: Jungle Waterfall by Mark J. Ferrari
the_bridge.png: The Bridge by ReFiend

BIN
external/the_bridge.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View File

@ -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. Its perfectly fine and recommended to leave

View File

@ -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. Its perfectly fine and recommended to leave