diff --git a/modules/default.nix b/modules/default.nix index 5c9d21ad..c9a8cb10 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -120,6 +120,7 @@ options = { imports = [ ./options/monitors + ./options/theme ]; }; }; diff --git a/modules/home/programs/fish/default.nix b/modules/home/programs/fish/default.nix index 0c198a26..048c36fe 100644 --- a/modules/home/programs/fish/default.nix +++ b/modules/home/programs/fish/default.nix @@ -9,7 +9,6 @@ inherit (pkgs) eza bat; cfg = config.home.programs.fish; in { - # imports = [./tide.nix]; options = { home.programs.fish.enable = mkEnableOption "Enables fish home configuration"; }; @@ -24,8 +23,10 @@ in { ]; shellAbbrs = { extract = "extract.sh"; - homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; - hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; + homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix"; + hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix"; + homeoptions = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix"; + hopt = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix"; nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix"; nmod = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix"; nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot"; @@ -46,7 +47,8 @@ in { cat = "${getExe bat} --style=plain"; ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension"; ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension"; - la = "${getExe eza} -lah --tree"; + lat = "${getExe eza} -lah --tree --color=auto --group-directories-first -s extension"; + la = "${getExe eza} -lah --color=auto --group-directories-first -s extension"; # Clear screen and scrollback clear = "printf '\\033[2J\\033[3J\\033[1;1H'"; }; diff --git a/modules/home/programs/helix/default.nix b/modules/home/programs/helix/default.nix index 386b92c5..117e3641 100644 --- a/modules/home/programs/helix/default.nix +++ b/modules/home/programs/helix/default.nix @@ -9,8 +9,8 @@ cfg = config.home.programs.helix; in { imports = [ - ./lang.nix - ./theme.nix + ./languages.nix + ./gruvbox.nix ]; options = { diff --git a/modules/home/programs/helix/theme.nix b/modules/home/programs/helix/gruvbox.nix similarity index 100% rename from modules/home/programs/helix/theme.nix rename to modules/home/programs/helix/gruvbox.nix diff --git a/modules/home/programs/helix/lang.nix b/modules/home/programs/helix/languages.nix similarity index 100% rename from modules/home/programs/helix/lang.nix rename to modules/home/programs/helix/languages.nix diff --git a/modules/home/programs/hyprlock/default.nix b/modules/home/programs/hyprlock/default.nix index bd9e81ee..f8d7af23 100644 --- a/modules/home/programs/hyprlock/default.nix +++ b/modules/home/programs/hyprlock/default.nix @@ -30,7 +30,7 @@ in { background = [ { monitor = ""; - path = "~/media/images/l_ash09_big.jpg"; + path = config.theme.background.lockscreen; } ]; input-field = [ diff --git a/modules/home/programs/zsh/default.nix b/modules/home/programs/zsh/default.nix index fac3163e..61da7785 100644 --- a/modules/home/programs/zsh/default.nix +++ b/modules/home/programs/zsh/default.nix @@ -24,11 +24,14 @@ in { cat = "${getExe bat} --style=plain"; ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension"; ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension"; - la = "${getExe eza} -lah --tree"; + lat = "${getExe eza} -lah --tree"; + la = "${getExe eza} -lah"; tree = "${getExe eza} --tree --icons=always"; extract = "extract.sh"; - homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; - hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; + homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix"; + hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix"; + homeoptions = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix"; + hopt = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix"; nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix"; nmod = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix"; nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot"; diff --git a/modules/home/services/gtk/default.nix b/modules/home/services/gtk/default.nix index f16966b4..393b7ab6 100644 --- a/modules/home/services/gtk/default.nix +++ b/modules/home/services/gtk/default.nix @@ -20,7 +20,7 @@ in { name = "Adwaita"; size = 28; gtk.enable = true; - x11.enable = true; + x11.enable = false; }; }; gtk = { diff --git a/modules/home/services/hyprpaper/default.nix b/modules/home/services/hyprpaper/default.nix index fc8fced0..21f554ef 100644 --- a/modules/home/services/hyprpaper/default.nix +++ b/modules/home/services/hyprpaper/default.nix @@ -1,5 +1,6 @@ { config, + osConfig, lib, pkgs, inputs, @@ -24,9 +25,9 @@ in { splash_offset = 2.0; preload = [ - "~/media/images/l_ash08_big.jpg" - "~/media/images/l_ash09_big.jpg" - "~/media/images/l_int06_big.jpg" + "~/media/images/bg_1.jpg" + "~/media/images/bg_2.jpg" + "~/media/images/bg_3.jpg" "~/media/images/by_housevisit_2560.jpg" "~/media/images/nix.png" "~/media/images/stacks.png" @@ -42,12 +43,11 @@ in { wallpaper = [ # cnix - "DP-3,~/media/images/l_ash08_big.jpg" - # adampad - "eDP-1,~/media/images/l_ash08_big.jpg" + "DP-3,${config.theme.background.desktop}" + # cnixpad + "eDP-1,${config.theme.background.desktop}" # toothpc - "DVI-D-1,~/media/images/l_ash08_big.jpg" - # "DP-1,/share/wallpapers/cat_pacman.png" + "DVI-D-1,${config.theme.background.desktop}" ]; }; }; diff --git a/modules/home/services/xdg/default.nix b/modules/home/services/xdg/default.nix index 2c0202ba..085d5b02 100644 --- a/modules/home/services/xdg/default.nix +++ b/modules/home/services/xdg/default.nix @@ -6,7 +6,7 @@ }: let inherit (lib) mkIf mkEnableOption mkForce elem; browser = - if elem osConfig.networking.hostName ["cnix" "cnixpad" "toothpc"] + if elem osConfig.networking.hostName ["cnix" "cnixpad"] then "zen.desktop" else "firefox.desktop"; cfg = config.home.services.xdg; @@ -15,6 +15,31 @@ in { home.services.xdg.enable = mkEnableOption "Enables XDG settings"; }; config = mkIf cfg.enable { + xresources.properties = { + "Xcursor.size" = config.home.pointerCursor.size; + "Xcursor.theme" = config.home.pointerCursor.name; + + "XTerm*.foreground" = "#d5c4a1"; + "XTerm*.background" = "#282828"; + "XTerm*.cursorColor" = "#d5c4a1"; + "XTerm*.color0" = "#282828"; + "XTerm*.color1" = "#fb4934"; + "XTerm*.color2" = "#b8bb26"; + "XTerm*.color3" = "#fabd2f"; + "XTerm*.color4" = "#83a598"; + "XTerm*.color5" = "#d3869b"; + "XTerm*.color6" = "#8ec07c"; + "XTerm*.color7" = "#d5c4a1"; + "XTerm*.color8" = "#665c54"; + "XTerm*.color9" = "#fe8019"; + "XTerm*.color10" = "#3c3836"; + "XTerm*.color11" = "#504945"; + "XTerm*.color12" = "#bdae93"; + "XTerm*.color13" = "#ebdbb2"; + "XTerm*.color14" = "#d65d0e"; + "XTerm*.color15" = "#fbf1c7"; + }; + xdg = { userDirs = { enable = true; diff --git a/modules/options/theme/default.nix b/modules/options/theme/default.nix new file mode 100644 index 00000000..f9af5f45 --- /dev/null +++ b/modules/options/theme/default.nix @@ -0,0 +1,28 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkOption types; + bgs = { + wallpaper_1 = "~/media/images/bg_1.jpg"; + wallpaper_2 = "~/media/images/bg_2.jpg"; + wallpaper_3 = "~/media/images/bg_3.jpg"; + }; + bgList = builtins.attrNames bgs; +in { + options.theme = { + background = { + lockscreen = mkOption { + type = types.enum bgList; + apply = name: bgs.${name}; + example = "wallpaper_2"; + }; + desktop = mkOption { + type = types.enum bgList; + apply = name: bgs.${name}; + example = "wallpaper_1"; + }; + }; + }; +} diff --git a/nix/default.nix b/nix/default.nix index 6960a7f9..eb7b3918 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -31,6 +31,7 @@ auto-optimise-store = true; builders-use-substitutes = true; warn-dirty = false; + accept-flake-config = false; allow-import-from-derivation = false; experimental-features = ["nix-command" "flakes"]; flake-registry = "/etc/nix/registry.json"; diff --git a/users/cnst/default.nix b/users/cnst/default.nix index c8f6d0f0..c9a41abe 100644 --- a/users/cnst/default.nix +++ b/users/cnst/default.nix @@ -9,7 +9,7 @@ # in { imports = [ - ./modules.nix + ./modules ./git.nix ]; # ++ lib.optionals isCnixpad [./cpmodules.nix]; diff --git a/users/cnst/modules/default.nix b/users/cnst/modules/default.nix new file mode 100644 index 00000000..93ae831c --- /dev/null +++ b/users/cnst/modules/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./home.nix + ./options.nix + ]; +} diff --git a/users/cnst/modules.nix b/users/cnst/modules/home.nix similarity index 88% rename from users/cnst/modules.nix rename to users/cnst/modules/home.nix index 6576d135..d0951e3b 100644 --- a/users/cnst/modules.nix +++ b/users/cnst/modules/home.nix @@ -1,23 +1,4 @@ { - monitors = [ - { - name = "DP-3"; - width = 2560; - height = 1440; - refreshRate = 240; - bitDepth = 10; - workspace = "1"; - primary = true; - } - { - name = "eDP-1"; - width = 1920; - height = 1200; - refreshRate = 60; - workspace = "1"; - primary = false; - } - ]; home = { programs = { aerc = { diff --git a/users/cnst/modules/options.nix b/users/cnst/modules/options.nix new file mode 100644 index 00000000..4e253c81 --- /dev/null +++ b/users/cnst/modules/options.nix @@ -0,0 +1,27 @@ +{ + monitors = [ + { + name = "DP-3"; + width = 2560; + height = 1440; + refreshRate = 240; + bitDepth = 10; + workspace = "1"; + primary = true; + } + { + name = "eDP-1"; + width = 1920; + height = 1200; + refreshRate = 60; + workspace = "1"; + primary = false; + } + ]; + theme = { + background = { + lockscreen = "wallpaper_2"; + desktop = "wallpaper_1"; + }; + }; +} diff --git a/users/toothpick/default.nix b/users/toothpick/default.nix index aac1e1f5..3385b498 100644 --- a/users/toothpick/default.nix +++ b/users/toothpick/default.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { imports = [ - ./modules.nix + ./modules ./git.nix ]; home = { diff --git a/users/toothpick/modules/default.nix b/users/toothpick/modules/default.nix new file mode 100644 index 00000000..93ae831c --- /dev/null +++ b/users/toothpick/modules/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./home.nix + ./options.nix + ]; +} diff --git a/users/toothpick/modules.nix b/users/toothpick/modules/home.nix similarity index 92% rename from users/toothpick/modules.nix rename to users/toothpick/modules/home.nix index d127a68c..f1658701 100644 --- a/users/toothpick/modules.nix +++ b/users/toothpick/modules/home.nix @@ -1,14 +1,4 @@ { - monitors = [ - { - name = "DVI-D-1"; - width = 1920; - height = 1080; - refreshRate = 144; - workspace = "1"; - primary = true; - } - ]; home = { programs = { alacritty = { diff --git a/users/toothpick/modules/options.nix b/users/toothpick/modules/options.nix new file mode 100644 index 00000000..5d8834cb --- /dev/null +++ b/users/toothpick/modules/options.nix @@ -0,0 +1,18 @@ +{ + monitors = [ + { + name = "DVI-D-1"; + width = 1920; + height = 1080; + refreshRate = 144; + workspace = "1"; + primary = true; + } + ]; + theme = { + background = { + lockscreen = "wallpaper_2"; + desktop = "wallpaper_1"; + }; + }; +}