diff --git a/home/robin/cli/shell/fish.nix b/home/robin/cli/shell/fish.nix index bc973c44..ba94ae65 100644 --- a/home/robin/cli/shell/fish.nix +++ b/home/robin/cli/shell/fish.nix @@ -40,89 +40,88 @@ in fish_add_path --move --prepend --path $HOME/.nix-profile/bin /run/wrappers/bin /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin ''; - shellInit = - '' - # themeing - set fish_greeting - export "MICRO_TRUECOLOR=1" - set -g theme_display_date no - set -g theme_nerd_fonts yes - set -g theme_newline_cursor yes + shellInit = '' + # themeing + set fish_greeting + export "MICRO_TRUECOLOR=1" + set -g theme_display_date no + set -g theme_nerd_fonts yes + set -g theme_newline_cursor yes - set SHELL ${getExe config.programs.fish.package} - '' - + (buildColors { - # default color - normal = "brwhite"; + set SHELL ${getExe config.programs.fish.package} + '' + + (buildColors { + # default color + normal = "brwhite"; - # commands like echo - command = "yellow"; + # commands like echo + command = "yellow"; - # keywords like if - this falls back on the command color if unset - keyword = "red"; + # keywords like if - this falls back on the command color if unset + keyword = "red"; - # quoted text like "abc" - quote = "green"; + # quoted text like "abc" + quote = "green"; - # IO redirections like >/dev/null - redirection = "magenta"; + # IO redirections like >/dev/null + redirection = "magenta"; - # process separators like ; and & - end = "brwhite"; + # process separators like ; and & + end = "brwhite"; - # syntax errors - error = "red"; + # syntax errors + error = "red"; - # ordinary command parameters - param = "teal"; + # ordinary command parameters + param = "teal"; - # parameters that are filenames (if the file exists) - valid_path = "brred"; + # parameters that are filenames (if the file exists) + valid_path = "brred"; - # options starting with “-”, up to the first “--” parameter - option = "teal"; + # options starting with “-”, up to the first “--” parameter + option = "teal"; - # comments like ‘# important’ - comment = "brwhite"; + # comments like ‘# important’ + comment = "brwhite"; - # selected text in vi visual mode - # selection = ""; + # selected text in vi visual mode + # selection = ""; - # parameter expansion operators like * and ~ - operator = "brwhite"; + # parameter expansion operators like * and ~ + operator = "brwhite"; - # character escapes like \n and \x70 - escape = "teal"; + # character escapes like \n and \x70 + escape = "teal"; - # autosuggestions (the proposed rest of a command) - autosuggestion = "brblack"; + # autosuggestions (the proposed rest of a command) + autosuggestion = "brblack"; - # the current working directory in the default prompt - cwd = "yellow"; + # the current working directory in the default prompt + cwd = "yellow"; - # the current working directory in the default prompt for the root user - cwd_root = "blue"; + # the current working directory in the default prompt for the root user + cwd_root = "blue"; - # the username in the default prompt - user = "green"; + # the username in the default prompt + user = "green"; - # the hostname in the default prompt - host = "magenta"; + # the hostname in the default prompt + host = "magenta"; - # the hostname in the default prompt for remote sessions (like ssh) - host_remote = "teal"; + # the hostname in the default prompt for remote sessions (like ssh) + host_remote = "teal"; - # the last command’s nonzero exit code in the default prompt - status = "red"; + # the last command’s nonzero exit code in the default prompt + status = "red"; - # the ‘^C’ indicator on a canceled command - cancel = "brblack"; + # the ‘^C’ indicator on a canceled command + cancel = "brblack"; - # history search matches and selected pager items (background only) - search_match = "brred"; + # history search matches and selected pager items (background only) + search_match = "brred"; - # the current position in the history - history_current = "brred"; - }); + # the current position in the history + history_current = "brred"; + }); }; } diff --git a/home/robin/gui/hyprland/config/binds.nix b/home/robin/gui/hyprland/config/binds.nix index 4eb4900d..56308700 100644 --- a/home/robin/gui/hyprland/config/binds.nix +++ b/home/robin/gui/hyprland/config/binds.nix @@ -9,92 +9,91 @@ let in { wayland.windowManager.hyprland.settings = { - bind = - [ - # launchers - "${mod}, B, exec, ${defaults.browser}" - "${mod}, E, exec, ${defaults.fileManager}" - "${mod}, C, exec, ${defaults.editor}" - "${mod}, Return, exec, ${defaults.terminal}" - "${mod}, L, exec, systemctl suspend" - "${mod}, O, exec, obsidian" + bind = [ + # launchers + "${mod}, B, exec, ${defaults.browser}" + "${mod}, E, exec, ${defaults.fileManager}" + "${mod}, C, exec, ${defaults.editor}" + "${mod}, Return, exec, ${defaults.terminal}" + "${mod}, L, exec, systemctl suspend" + "${mod}, O, exec, obsidian" - "${mod} SHIFT, W, exec, haikei r $(dirname $(haikei current))" + "${mod} SHIFT, W, exec, haikei r $(dirname $(haikei current))" - # window management - "${mod}, Q, killactive," - # "${mod} SHIFT, Q, exit," - "${mod}, F, fullscreen," - "${mod}, Z, fullscreen, 1" # toggle maximize - "${mod} SHIFT, F, fullscreenstate, -1 2" # toggle fullscreenstate in client - "${mod}, Space, togglefloating," - "${mod}, D, pseudo," # dwindle - "${mod}, J, togglesplit," # dwindle + # window management + "${mod}, Q, killactive," + # "${mod} SHIFT, Q, exit," + "${mod}, F, fullscreen," + "${mod}, Z, fullscreen, 1" # toggle maximize + "${mod} SHIFT, F, fullscreenstate, -1 2" # toggle fullscreenstate in client + "${mod}, Space, togglefloating," + "${mod}, D, pseudo," # dwindle + "${mod}, J, togglesplit," # dwindle - # grouping - "${mod}, g, togglegroup" - "${mod} ALT, tab, changegroupactive" + # grouping + "${mod}, g, togglegroup" + "${mod} ALT, tab, changegroupactive" - "${mod}, Tab, cyclenext," - "${mod}, Tab, bringactivetotop," + "${mod}, Tab, cyclenext," + "${mod}, Tab, bringactivetotop," - # special workspace stuff - "${mod}, grave, togglespecialworkspace" - "${mod}, grave, exec, $notifycmd 'Toggled Special Workspace'" - "${mod} SHIFT, grave, movetoworkspace, special" + # special workspace stuff + "${mod}, grave, togglespecialworkspace" + "${mod}, grave, exec, $notifycmd 'Toggled Special Workspace'" + "${mod} SHIFT, grave, movetoworkspace, special" - # screen shot - ", Print, exec, moonblast copysave full" - "${mod} SHIFT, S, exec, moonblast copysave area" - "ALT, Print, exec, moonblast copysave window" + # screen shot + ", Print, exec, moonblast copysave full" + "${mod} SHIFT, S, exec, moonblast copysave area" + "ALT, Print, exec, moonblast copysave window" - "${mod} CTRL, right, workspace, r+1" - "${mod} CTRL, left, workspace, r-1" - # scroll wheel binds - "${mod}, mouse_down, workspace, r+1" - "${mod}, mouse_up, workspace, r-1" + "${mod} CTRL, right, workspace, r+1" + "${mod} CTRL, left, workspace, r-1" + # scroll wheel binds + "${mod}, mouse_down, workspace, r+1" + "${mod}, mouse_up, workspace, r-1" - # global mute - ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + # global mute + ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - # playerctl - ",XF86AudioPlay, exec, playercontrol toggle" - ",XF86AudioNext, exec, playercontrol next" - ",XF86AudioPrev, exec, playercontrol prev" - ] - ++ optionals (defaults.bar == "waybar") [ - "ALT, space, exec, pkill rofi || rofi -show drun" - "${mod} SHIFT, B, exec, pkill --signal SIGUSR2 waybar" # reload waybar - "${mod}, escape, exec, wlogout" - "${mod}, period, exec, killall rofi || rofi -show emoji -emoji-format '{emoji}' -modi emoji" - ] - ++ optionals (defaults.bar == "ags") [ - "${mod}, D, exec, ags -t launcher" - "${mod}, escape, exec, ags -t powermenu" - "${mod} SHIFT, R, exec, systemctl --user restart ags.service" - ] - ++ optionals (defaults.bar == "quickshell") [ - "ALT, space, exec, qs ipc call drawers toggle launcher" - "${mod} SHIFT, B, exec, pkill quickshell || quickshell &disown" - "${mod}, escape, exec, qs ipc call drawers toggle session" - ] - ++ (concatLists ( - genList ( - x: - let - ws = - let - c = (x + 1) / 10; - in - toString (x + 1 - (c * 10)); - in - [ - "${mod}, ${ws}, workspace, ${toString (x + 1)}" - "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) 10 - )); + # playerctl + ",XF86AudioPlay, exec, playercontrol toggle" + ",XF86AudioNext, exec, playercontrol next" + ",XF86AudioPrev, exec, playercontrol prev" + ] + ++ optionals (defaults.bar == "waybar") [ + "ALT, space, exec, pkill rofi || rofi -show drun" + "${mod} SHIFT, B, exec, pkill --signal SIGUSR2 waybar" # reload waybar + "${mod}, escape, exec, wlogout" + "${mod}, period, exec, killall rofi || rofi -show emoji -emoji-format '{emoji}' -modi emoji" + ] + ++ optionals (defaults.bar == "ags") [ + "${mod}, D, exec, ags -t launcher" + "${mod}, escape, exec, ags -t powermenu" + "${mod} SHIFT, R, exec, systemctl --user restart ags.service" + ] + ++ optionals (defaults.bar == "quickshell") [ + "ALT, space, exec, qs ipc call drawers toggle launcher" + "${mod} SHIFT, B, exec, pkill quickshell || quickshell &disown" + "${mod}, escape, exec, qs ipc call drawers toggle session" + ] + ++ (concatLists ( + genList ( + x: + let + ws = + let + c = (x + 1) / 10; + in + toString (x + 1 - (c * 10)); + in + [ + "${mod}, ${ws}, workspace, ${toString (x + 1)}" + "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) 10 + )); # mouse binds bindm = [ diff --git a/home/robin/gui/hyprland/config/exec.nix b/home/robin/gui/hyprland/config/exec.nix index 2d505042..6a4bdd56 100644 --- a/home/robin/gui/hyprland/config/exec.nix +++ b/home/robin/gui/hyprland/config/exec.nix @@ -16,6 +16,7 @@ in "wl-paste --type image --watch cliphist store" # Stores only image data "hyprctl setcursor ${pointer.name} ${toString pointer.size}" "swww-daemon" - ] ++ optionals (defaults.bar == "waybar") [ "waybar" ]; + ] + ++ optionals (defaults.bar == "waybar") [ "waybar" ]; }; } diff --git a/home/robin/themes/fonts.nix b/home/robin/themes/fonts.nix index 3c41400a..9439057e 100644 --- a/home/robin/themes/fonts.nix +++ b/home/robin/themes/fonts.nix @@ -31,13 +31,15 @@ in serif = [ "TeX Gyre Schola" "IBM Plex Serif" - ] ++ fnts; + ] + ++ fnts; sansSerif = [ "IBM Plex Sans" "IBM Plex Sans KR" "IBM Plex Sans JP" - ] ++ fnts; + ] + ++ fnts; }; }; } diff --git a/modules/base/nix/environment.nix b/modules/base/nix/environment.nix index 35fc6cfc..9cec37a5 100644 --- a/modules/base/nix/environment.nix +++ b/modules/base/nix/environment.nix @@ -14,14 +14,13 @@ let mkForce ; - commonPaths = - [ - "nixpkgs" - "tgirlpkgs" - ] - ++ optionals pkgs.stdenv.hostPlatform.isDarwin [ - "nix-darwin" - ]; + commonPaths = [ + "nixpkgs" + "tgirlpkgs" + ] + ++ optionals pkgs.stdenv.hostPlatform.isDarwin [ + "nix-darwin" + ]; in { environment = { diff --git a/modules/base/nix/substituters.nix b/modules/base/nix/substituters.nix index 1b9a3f86..c5f37a00 100644 --- a/modules/base/nix/substituters.nix +++ b/modules/base/nix/substituters.nix @@ -16,22 +16,20 @@ in # substituters to use nix.settings = { # don't worry that you cannot see cache.nixos.org here, it is added by default - substituters = - [ - "https://nix-community.cachix.org" # nix-community cache - "https://everviolet.cachix.org" # a cache for all everviolet ports - ] - ++ optionals hasCtp [ - "https://catppuccin.cachix.org" # a cache for all catppuccin ports - ]; + substituters = [ + "https://nix-community.cachix.org" # nix-community cache + "https://everviolet.cachix.org" # a cache for all everviolet ports + ] + ++ optionals hasCtp [ + "https://catppuccin.cachix.org" # a cache for all catppuccin ports + ]; - trusted-public-keys = - [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "everviolet.cachix.org-1:3nHvJgzKRRRCQZURheH1INddNlyU4OWqfn068t8AuvU=" - ] - ++ optionals hasCtp [ - "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" - ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "everviolet.cachix.org-1:3nHvJgzKRRRCQZURheH1INddNlyU4OWqfn068t8AuvU=" + ] + ++ optionals hasCtp [ + "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" + ]; }; } diff --git a/modules/base/users/mkuser.nix b/modules/base/users/mkuser.nix index 2bb6c5eb..604b5cb5 100644 --- a/modules/base/users/mkuser.nix +++ b/modules/base/users/mkuser.nix @@ -37,31 +37,30 @@ in initialPassword = mkDefault "changeme"; # only add groups that exist - extraGroups = - [ - "wheel" - "nix" - ] - ++ ifTheyExist config [ - "network" - "networkmanager" - "systemd-journal" - "audio" - "pipewire" # this give us access to the rt limits - "video" - "input" - "plugdev" - "lp" - "tss" - "power" - "wireshark" - "mysql" - "docker" - "podman" - "git" - "libvirtd" - "cloudflared" - ]; + extraGroups = [ + "wheel" + "nix" + ] + ++ ifTheyExist config [ + "network" + "networkmanager" + "systemd-journal" + "audio" + "pipewire" # this give us access to the rt limits + "video" + "input" + "plugdev" + "lp" + "tss" + "power" + "wireshark" + "mysql" + "docker" + "podman" + "git" + "libvirtd" + "cloudflared" + ]; }) ] ); diff --git a/modules/flake/packages/docs/options.nix b/modules/flake/packages/docs/options.nix index 4bd61f16..b0b9b983 100644 --- a/modules/flake/packages/docs/options.nix +++ b/modules/flake/packages/docs/options.nix @@ -89,7 +89,8 @@ inputs.nuscht-search.packages.${system}.mkMultiSearch { { name = "nixos modules"; optionsJSON = - (import "${inputs.nixpkgs}/nixos/release.nix" { }).options + /share/doc/nixos/options.json; + (import "${inputs.nixpkgs}/nixos/release.nix" { }).options + + /share/doc/nixos/options.json; urlPrefix = "https://github.com/NixOS/nixpkgs/tree/master/"; } { @@ -100,7 +101,8 @@ inputs.nuscht-search.packages.${system}.mkMultiSearch { { name = "home manager"; optionsJSON = - inputs.home-manager.packages.${system}.docs-json + /share/doc/home-manager/options.json; + inputs.home-manager.packages.${system}.docs-json + + /share/doc/home-manager/options.json; urlPrefix = "https://github.com/nix-community/home-manager/tree/master/"; } { diff --git a/modules/home/environment/path.nix b/modules/home/environment/path.nix index 6927db38..5bf4ee2a 100644 --- a/modules/home/environment/path.nix +++ b/modules/home/environment/path.nix @@ -12,5 +12,6 @@ in "${config.home.homeDirectory}/.local/bin" # I relocated this too the fish config, such that it would fix a issue where git would use the wrong version # "/etc/profiles/per-user/isabel/bin" # needed for darwin - ] ++ optional pkgs.stdenv.hostPlatform.isDarwin "$GHOSTTY_BIN_DIR"; + ] + ++ optional pkgs.stdenv.hostPlatform.isDarwin "$GHOSTTY_BIN_DIR"; } diff --git a/modules/home/programs/chromium.nix b/modules/home/programs/chromium.nix index e3128213..df2a1f15 100644 --- a/modules/home/programs/chromium.nix +++ b/modules/home/programs/chromium.nix @@ -14,17 +14,16 @@ let in { programs.chromium = { - extensions = - [ - "cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin - "clngdbkpkpeebahjckkjfobafhncgmne" # stylus - "nngceckbapebfimnlniiiahkandclblb" # Bitwarden - "fkagelmloambgokoeokbpihmgpkbgbfm" # Indie Wiki Buddy - ] - ++ optionals osConfig.garden.profiles.gaming.enable [ - "ngonfifpkpeefnhelnfdkficaiihklid" # ProtonDB - "dnhpnfgdlenaccegplpojghhmaamnnfp" # Augmented Steam - ]; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin + "clngdbkpkpeebahjckkjfobafhncgmne" # stylus + "nngceckbapebfimnlniiiahkandclblb" # Bitwarden + "fkagelmloambgokoeokbpihmgpkbgbfm" # Indie Wiki Buddy + ] + ++ optionals osConfig.garden.profiles.gaming.enable [ + "ngonfifpkpeefnhelnfdkficaiihklid" # ProtonDB + "dnhpnfgdlenaccegplpojghhmaamnnfp" # Augmented Steam + ]; package = pkgs.chromium.override { enableWideVine = true; diff --git a/modules/nixos/environment/paths.nix b/modules/nixos/environment/paths.nix index b9bac405..266c1349 100644 --- a/modules/nixos/environment/paths.nix +++ b/modules/nixos/environment/paths.nix @@ -6,10 +6,9 @@ let in { # if a given shell is enabled, add the corresponding completion paths - environment.pathsToLink = - [ - "/share/bash-completion" - ] - ++ optional cfg.zsh.enable "/share/zsh" - ++ optional cfg.fish.enable "/share/fish"; + environment.pathsToLink = [ + "/share/bash-completion" + ] + ++ optional cfg.zsh.enable "/share/zsh" + ++ optional cfg.fish.enable "/share/fish"; } diff --git a/modules/nixos/networking/systemd.nix b/modules/nixos/networking/systemd.nix index be4b2a9f..e04ab950 100644 --- a/modules/nixos/networking/systemd.nix +++ b/modules/nixos/networking/systemd.nix @@ -15,22 +15,21 @@ in # allow for the system to boot without waiting for the network interfaces are online network.wait-online.enable = false; - services = - { - # https://github.com/systemd/systemd/blob/e1b45a756f71deac8c1aa9a008bd0dab47f64777/NEWS#L13 - NetworkManager-wait-online.enable = false; + services = { + # https://github.com/systemd/systemd/blob/e1b45a756f71deac8c1aa9a008bd0dab47f64777/NEWS#L13 + NetworkManager-wait-online.enable = false; - # disable networkd and resolved from being restarted on configuration changes - # also prevents failures from services that are restarted instead of stopped - systemd-networkd.stopIfChanged = false; - systemd-resolved.stopIfChanged = false; - } - // concatMapAttrs (_: v: v) ( - genAttrs ethernetDevices (device: { - # Assign an IP address when the device is plugged in rather than on startup. Needed to prevent - # blocking the boot sequence when the device is unavailable, as it is hotpluggable. - "network-addresses-${device}".wantedBy = mkForce [ "sys-subsystem-net-devices-${device}.device" ]; - }) - ); + # disable networkd and resolved from being restarted on configuration changes + # also prevents failures from services that are restarted instead of stopped + systemd-networkd.stopIfChanged = false; + systemd-resolved.stopIfChanged = false; + } + // concatMapAttrs (_: v: v) ( + genAttrs ethernetDevices (device: { + # Assign an IP address when the device is plugged in rather than on startup. Needed to prevent + # blocking the boot sequence when the device is unavailable, as it is hotpluggable. + "network-addresses-${device}".wantedBy = mkForce [ "sys-subsystem-net-devices-${device}.device" ]; + }) + ); }; }