diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-12-20 07:49:56 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2025-12-20 07:53:22 -0600 |
| commit | 70f702c6fd33454aebc4a266789fc5bf7e77e960 (patch) | |
| tree | afd021e65acab4ed2cde532b3eb914bfc6cb9ff9 /modules | |
| parent | 26533470d5eebca67519c0a0ce797bedfb6a5e25 (diff) | |
age + other various changes
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/boot/nixos/default.nix | 3 | ||||
| -rw-r--r-- | modules/desktop/hjem/programs/research.nix | 73 | ||||
| -rw-r--r-- | modules/desktop/hjem/wm/fuzzel.nix | 4 | ||||
| -rw-r--r-- | modules/desktop/hjem/wm/niri.nix | 26 | ||||
| -rw-r--r-- | modules/nix/nixos/default.nix | 13 | ||||
| -rw-r--r-- | modules/services/options.nix | 1 | ||||
| -rw-r--r-- | modules/terminal/hjem/programs/cmus.nix | 74 | ||||
| -rw-r--r-- | modules/terminal/hjem/programs/tmux.nix | 16 | ||||
| -rw-r--r-- | modules/terminal/options.nix | 2 | ||||
| -rw-r--r-- | modules/user/nixos/default.nix | 4 | ||||
| -rw-r--r-- | modules/user/options.nix | 10 |
11 files changed, 116 insertions, 110 deletions
diff --git a/modules/boot/nixos/default.nix b/modules/boot/nixos/default.nix index 06e68c3..8e710c8 100644 --- a/modules/boot/nixos/default.nix +++ b/modules/boot/nixos/default.nix @@ -34,6 +34,9 @@ in { }; }); + system.etc.overlay.enable = true; + system.nixos-init.enable = true; + environment.systemPackages = ( if cfg.secureBoot.enable diff --git a/modules/desktop/hjem/programs/research.nix b/modules/desktop/hjem/programs/research.nix index 1d31479..1646e0c 100644 --- a/modules/desktop/hjem/programs/research.nix +++ b/modules/desktop/hjem/programs/research.nix @@ -24,50 +24,53 @@ in }; }; - ".config/zathura/zathurarc".text = lib.mkIf (config.collinux.theme == "adwaita") '' - set font "Iosevka Nerd Font 11.5" + ".config/zathura/zathurarc".text = + if (config.collinux.theme == "adwaita") + then '' + set font "Iosevka Nerd Font 11.5" - set recolor 'true' - set recolor-keephue 'false' - set recolor-reverse-video 'false' + set recolor 'true' + set recolor-keephue 'false' + set recolor-reverse-video 'false' - # flipped to make dark mode - set recolor-lightcolor rgba(0,0,0,0) - set recolor-darkcolor '#DEDDDA' + # flipped to make dark mode + set recolor-lightcolor rgba(0,0,0,0) + set recolor-darkcolor '#DEDDDA' - set completion-fg '#DEDDDA' - set completion-bg '#303030' - set completion-group-fg '#33B2A4' - set completion-group-bg '#303030' - set completion-highlight-fg '#303030' - set completion-highlight-bg '#DEDDDA' + set completion-fg '#DEDDDA' + set completion-bg '#303030' + set completion-group-fg '#33B2A4' + set completion-group-bg '#303030' + set completion-highlight-fg '#303030' + set completion-highlight-bg '#DEDDDA' - set default-fg '#DEDDDA' - set default-bg rgba(29,29,29,0.6) + set default-fg '#DEDDDA' + set default-bg rgba(29,29,29,0.6) - set inputbar-fg '#DEDDDA' - set inputbar-bg '#303030' + set inputbar-fg '#DEDDDA' + set inputbar-bg '#303030' - set notification-fg '#DEDDDA' - set notification-bg '#303030' - set notification-error-fg '#DEDDDA' - set notification-error-bg '#E01B24' - set notification-warning-fg '#DEDDDA' - set notification-warning-bg '#E01B24' + set notification-fg '#DEDDDA' + set notification-bg '#303030' + set notification-error-fg '#DEDDDA' + set notification-error-bg '#E01B24' + set notification-warning-fg '#DEDDDA' + set notification-warning-bg '#E01B24' - set statusbar-fg '#DEDDDA' - set statusbar-bg '#303030' + set statusbar-fg '#DEDDDA' + set statusbar-bg '#303030' - set highlight-color '#33B2A4' - set highlight-active-color '#33B2A4' + set highlight-color '#33B2A4' + set highlight-active-color '#33B2A4' - set render-loading-fg '#DEDDDA' - set render-loading-bg '#303030' + set render-loading-fg '#DEDDDA' + set render-loading-bg '#303030' - set index-fg '#DEDDDA' - set index-bg '#303030' - set index-active-fg '#303030' - set index-active-bg '#DEDDDA' - ''; + set index-fg '#DEDDDA' + set index-bg '#303030' + set index-active-fg '#303030' + set index-active-bg '#DEDDDA' + '' + else ""; }; } diff --git a/modules/desktop/hjem/wm/fuzzel.nix b/modules/desktop/hjem/wm/fuzzel.nix index ab11d6b..7d61255 100644 --- a/modules/desktop/hjem/wm/fuzzel.nix +++ b/modules/desktop/hjem/wm/fuzzel.nix @@ -30,8 +30,8 @@ input = base05; match = base13; placeholder = base03; - text = base04; - prompt = base04; + text = base01; + prompt = base01; selection = "${base01}5a"; selection-match = base13; diff --git a/modules/desktop/hjem/wm/niri.nix b/modules/desktop/hjem/wm/niri.nix index 4449f82..c6826af 100644 --- a/modules/desktop/hjem/wm/niri.nix +++ b/modules/desktop/hjem/wm/niri.nix @@ -23,6 +23,12 @@ in input { focus-follows-mouse + + keyboard { + xkb { + options "caps:none" + } + } } hotkey-overlay { @@ -31,13 +37,13 @@ in } binds { - Mod+Q { close-window; } - - Mod+Space { spawn "fuzzel"; } - Mod+Return { spawn "foot"; } - Mod+B { spawn "firefox"; } + Mod+Space repeat=false { spawn "fuzzel"; } + Mod+Return repeat=false { spawn "foot"; } + Mod+B repeat=false { spawn "firefox"; } - Mod+m { maximize-column; } + Mod+Q repeat=false { close-window; } + Mod+S repeat=false { screenshot; } + Mod+M repeat=false { maximize-column; } XF86MonBrightnessUp { spawn "~/.config/util.lua" "brightness" "5%+"; } XF86MonBrightnessDown { spawn "~/.config/util.lua" "brightness" "5%-"; } @@ -73,10 +79,10 @@ in } struts { - left 16 - right 16 - top 16 - bottom 16 + left 0 + right 0 + top 0 + bottom 0 } background-color "transparent" diff --git a/modules/nix/nixos/default.nix b/modules/nix/nixos/default.nix index 07e7f44..7116371 100644 --- a/modules/nix/nixos/default.nix +++ b/modules/nix/nixos/default.nix @@ -1,9 +1,12 @@ { + inputs, config, pkgs, ... }: { nix = { + # package = inputs.determinate.packages.${pkgs.system}.default; + gc.automatic = false; # use nh cleaner instead # Make builds run with low priority so my system stays responsive @@ -15,15 +18,13 @@ auto-optimise-store = true; use-xdg-base-directories = true; }; - }; - # Disable channels - nix.channel.enable = false; - - nixpkgs = { - config.allowUnfree = true; + # Disable channels + channel.enable = false; }; + nixpkgs.config.allowUnfree = true; + programs.nh = { enable = true; flake = "/home/collin/nixos"; diff --git a/modules/services/options.nix b/modules/services/options.nix index b887395..ee85982 100644 --- a/modules/services/options.nix +++ b/modules/services/options.nix @@ -12,6 +12,7 @@ in { iwd.enable = mkEnableOption "lightweight wifi daemon"; networkmanager.enable = mkEnableOption "heavier wifi daemon"; tailscale.enable = mkEnableOption "tailscale"; + sshd.enable = mkEnableOption "OpenSSH server"; }; audio = { enable = mkEnableOption "pipewire + wireplumber"; diff --git a/modules/terminal/hjem/programs/cmus.nix b/modules/terminal/hjem/programs/cmus.nix index 7a5ac81..5c65d26 100644 --- a/modules/terminal/hjem/programs/cmus.nix +++ b/modules/terminal/hjem/programs/cmus.nix @@ -6,27 +6,7 @@ }: let cfg = config.collinux.terminal.programs.cmus; - scriptsDir = "~/.config/cmus/scripts"; - - scripts.statusDisplay = '' - while [ $# -ge 2 ]; do - eval _$1='$2' - shift - shift - done - - [ -d ~/.local/share/cmus ] || mkdir ~/.local/share/cmus - - if [ -n "$_file" ]; then - ${pkgs.ffmpeg}/bin/ffmpeg -i "$_file" -y -an -c:v copy ~/.local/share/cmus/curr_cover.jpg || rm ~/.local/share/cmus/curr_cover.jpg - fi - - ${pkgs.dunst}/bin/dunstify -t 2000 -u low -h string:x-canonical-private-synchronous:music -i ~/.local/share/cmus/curr_cover.jpg "$_status: $_title" "$_artist" - ''; - - cmus_theme = '' - set color_cmdline_error=lightred - set color_cmdline_info=lightyellow + cmus_theme_kanagawa = '' set color_cmdline_fg=lightred set color_cmdline_bg=237 set color_separator=238 @@ -49,23 +29,49 @@ set color_win_title_fg=lightred ''; + cmus_theme_catppuccin = '' + set color_cmdline_bg=default + set color_cmdline_fg=default + set color_error=211 + set color_info=223 + set color_separator=8 + set color_statusline_bg=default + set color_statusline_fg=default + set color_titleline_bg=183 + set color_titleline_fg=8 + set color_titleline_attr=bold + set color_win_bg=default + set color_win_cur=117 + set color_win_cur_sel_bg=117 + set color_win_cur_sel_fg=235 + set color_win_dir=default + set color_win_fg=default + set color_win_inactive_cur_sel_bg=0 + set color_win_inactive_cur_sel_fg=default + set color_win_inactive_sel_bg=0 + set color_win_inactive_sel_fg=default + set color_win_sel_bg=15 + set color_win_sel_fg=235 + set color_win_title_bg=default + set color_win_title_fg=183 + set color_win_title_attr=bold + ''; + cmus_rc = '' - colorscheme all - set status_display_program=${scriptsDir}/status.sh + colorscheme ${cfg.theme} ''; in lib.mkIf cfg.enable { - files = let - e = text: { - inherit text; - executable = true; - }; - in { - ".config/cmus/scripts/status.sh" = e scripts.statusDisplay; - - ".config/cmus/rc".text = cmus_rc; - ".config/cmus/all.theme".text = cmus_theme; - }; + files = + { + ".config/cmus/rc".text = cmus_rc; + } + // (lib.mkIf (cfg.theme == "catppuccin") { + ".config/cmus/catppuccin.theme".text = cmus_theme_catppuccin; + }) + // (lib.mkIf (cfg.theme == "kanagawa") { + ".config/cmus/kanagawa.theme".text = cmus_theme_kanagawa; + }); packages = [pkgs.cmus]; } diff --git a/modules/terminal/hjem/programs/tmux.nix b/modules/terminal/hjem/programs/tmux.nix index 152c443..8525569 100644 --- a/modules/terminal/hjem/programs/tmux.nix +++ b/modules/terminal/hjem/programs/tmux.nix @@ -15,18 +15,10 @@ in { tsunami = { enable = true; - theme = - if (cfg.theme == "catppuccin") - then { - bg = "#1e1e2e"; - bg_dark = "#181825"; - } - else if (cfg.theme == "adwaita") - then { - bg = "#1d1d1d"; - bg_dark = "#171717"; - } - else {}; + theme = { + bg = config.collinux.palette.base01; + bg_dark = config.collinux.palette.base00; + }; keys.leader = [ { diff --git a/modules/terminal/options.nix b/modules/terminal/options.nix index e55ab1b..77b1f13 100644 --- a/modules/terminal/options.nix +++ b/modules/terminal/options.nix @@ -31,7 +31,7 @@ in { starship = mkProgramOption "starship prompt"; lazygit.enable = mkEnableOption "lazygit"; - cmus.enable = mkEnableOption "cmus"; + cmus = mkProgramOption "cmus"; nh.enable = mkEnableOption "nh nix helper"; git = { diff --git a/modules/user/nixos/default.nix b/modules/user/nixos/default.nix index 05afe37..0257198 100644 --- a/modules/user/nixos/default.nix +++ b/modules/user/nixos/default.nix @@ -1,5 +1,6 @@ { config, + hostname, lib, ... }: let @@ -9,9 +10,10 @@ in { isNormalUser = true; description = cfg.name; extraGroups = ["networkmanager" "pipewire" "disks" "input" "video" "dialout" "kvm"] ++ (lib.optional cfg.isAdmin "wheel"); - hashedPassword = cfg.password; + hashedPasswordFile = config.age.secrets."${cfg.name}@${hostname}-passwd".path; }; security.sudo-rs.enable = true; + services.userborn.enable = true; time.timeZone = "America/Chicago"; diff --git a/modules/user/options.nix b/modules/user/options.nix index f5c7a5f..1024494 100644 --- a/modules/user/options.nix +++ b/modules/user/options.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: let +{lib, ...}: let inherit (lib) mkOption types; in { options = { @@ -10,10 +6,6 @@ in { name = mkOption { type = types.str; }; - password = mkOption { - type = types.str; - description = "hashed password for user"; - }; isAdmin = mkOption { type = types.bool; default = true; |
