diff --git a/_sources/generated.nix b/_sources/generated.nix index 9f1ce72..473cdd7 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -1,5 +1,10 @@ # This file was generated by nvfetcher, please do not modify it manually. -{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: +{ + fetchgit, + fetchurl, + fetchFromGitHub, + dockerTools, +}: { catppuccin-bat = { pname = "catppuccin-bat"; diff --git a/flake.nix b/flake.nix index 289190c..be6731d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,23 +1,20 @@ { description = "nekowinston's hm flake"; - outputs = { - flake-parts, - self, - ... - } @ inputs: let - inherit (import ./machines/lib.nix {inherit inputs overlays;}) mkSystems; - overlays = import ./pkgs/overlays.nix {inherit inputs;}; - in - flake-parts.lib.mkFlake {inherit self inputs;} - { + outputs = + { flake-parts, self, ... }@inputs: + let + inherit (import ./machines/lib.nix { inherit inputs overlays; }) mkSystems; + overlays = import ./pkgs/overlays.nix { inherit inputs; }; + in + flake-parts.lib.mkFlake { inherit self inputs; } { flake = mkSystems [ { host = "sashimi"; system = "aarch64-darwin"; username = "winston"; isGraphical = true; - extraModules = [inputs.nekowinston-nur.darwinModules.default]; + extraModules = [ inputs.nekowinston-nur.darwinModules.default ]; } { host = "futomaki"; @@ -30,61 +27,79 @@ system = "x86_64-linux"; username = "winston"; isGraphical = false; - extraModules = [inputs.wsl.nixosModules.default]; + extraModules = [ inputs.wsl.nixosModules.default ]; } ]; - imports = [inputs.pre-commit-hooks.flakeModule]; - perSystem = { - config, - self', - inputs', - pkgs, - system, - ... - }: { - _module.args.pkgs = import inputs.nixpkgs { - inherit overlays system; - config.allowUnfree = true; - }; - - pre-commit = { - check.enable = true; - settings.excludes = ["_sources/"]; - settings.hooks = { - alejandra.enable = true; - commitizen.enable = true; - editorconfig-checker.enable = true; - luacheck.enable = true; - nil.enable = true; - shellcheck.enable = true; - stylua.enable = true; + imports = [ inputs.pre-commit-hooks.flakeModule ]; + perSystem = + { + config, + self', + inputs', + pkgs, + lib, + system, + ... + }: + { + _module.args.pkgs = import inputs.nixpkgs { + inherit overlays system; + config.allowUnfree = true; }; - }; - devShells.default = pkgs.mkShell { - inherit (config.pre-commit.devShell) shellHook; - RULES = "./home/secrets/secrets.nix"; - buildInputs = with pkgs; - [alejandra just nil nix-output-monitor nvd inputs'.agenix.packages.agenix] - ++ lib.optionals stdenv.isDarwin [inputs'.darwin.packages.darwin-rebuild]; - }; - - legacyPackages.homeConfigurations = let - homeLib = import ./home/lib.nix { - inherit inputs pkgs username; - isNixOS = false; + pre-commit = { + check.enable = true; + settings.excludes = [ "_sources/" ]; + settings.hooks = { + commitizen.enable = true; + editorconfig-checker.enable = true; + luacheck.enable = true; + nil.enable = true; + nixfmt.enable = true; + nixfmt.package = pkgs.nixfmt-rfc-style; + shellcheck.enable = true; + stylua.enable = true; + }; }; - username = "winston"; - in { - ${username} = inputs.home-manager.lib.homeManagerConfiguration { - inherit pkgs; - inherit (homeLib) extraSpecialArgs modules; - }; - }; - formatter = pkgs.alejandra; - }; - systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"]; + devShells.default = pkgs.mkShell { + inherit (config.pre-commit.devShell) shellHook; + RULES = "./home/secrets/secrets.nix"; + buildInputs = + (with pkgs; [ + just + nix-output-monitor + nixd + nvd + self'.formatter + ]) + ++ [ inputs'.agenix.packages.agenix ] + ++ lib.optionals pkgs.stdenv.isDarwin [ inputs'.darwin.packages.darwin-rebuild ]; + }; + + legacyPackages.homeConfigurations = + let + homeLib = import ./home/lib.nix { + inherit inputs pkgs username; + isNixOS = false; + }; + username = "winston"; + in + { + ${username} = inputs.home-manager.lib.homeManagerConfiguration { + inherit pkgs; + inherit (homeLib) extraSpecialArgs modules; + }; + }; + + formatter = pkgs.nixfmt-rfc-style; + }; + systems = [ + "aarch64-darwin" + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; }; nixConfig = { diff --git a/home/apps/browsers.nix b/home/apps/browsers.nix index ea46a40..96815c3 100644 --- a/home/apps/browsers.nix +++ b/home/apps/browsers.nix @@ -3,9 +3,11 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv) isLinux; -in { +in +{ config = lib.mkIf config.isGraphical { programs.chromium = { enable = isLinux; @@ -155,9 +157,7 @@ in { }; }; - home.packages = lib.mkIf isLinux [ - pkgs.mullvad-browser - ]; + home.packages = lib.mkIf isLinux [ pkgs.mullvad-browser ]; xdg.mimeApps.defaultApplications = { "text/html" = "chromium.desktop"; diff --git a/home/apps/colorscheme-sync.nix b/home/apps/colorscheme-sync.nix index fad8e5d..3e63430 100644 --- a/home/apps/colorscheme-sync.nix +++ b/home/apps/colorscheme-sync.nix @@ -3,16 +3,19 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv) isDarwin isLinux; - vividBuilder = flavor: - pkgs.runCommand "vivid-${flavor}" {nativeBuildInputs = [pkgs.vivid];} '' + vividBuilder = + flavor: + pkgs.runCommand "vivid-${flavor}" { nativeBuildInputs = [ pkgs.vivid ]; } '' vivid generate ${pkgs.vivid.src}/themes/catppuccin-${flavor}.yml > $out ''; vividLatte = vividBuilder "latte"; vividMocha = vividBuilder "mocha"; -in { +in +{ config = lib.mkIf config.isGraphical { home.packages = [ (pkgs.writeShellApplication { @@ -21,22 +24,25 @@ in { pkgs.dbus pkgs.gnugrep ]; - text = let - queryCommand = - if isLinux - then "dbus-send --session --print-reply=literal --reply-timeout=5 --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:'org.freedesktop.appearance' string:'color-scheme' | grep -q 'uint32 1'" - else if isDarwin - then "defaults read -g AppleInterfaceStyle &>/dev/null" - else throw "Unsupported platform"; - in '' - [[ -z "''${1-}" ]] && [[ -z "''${2-}" ]] && echo "Usage: $0 " && exit 1 + text = + let + queryCommand = + if isLinux then + "dbus-send --session --print-reply=literal --reply-timeout=5 --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:'org.freedesktop.appearance' string:'color-scheme' | grep -q 'uint32 1'" + else if isDarwin then + "defaults read -g AppleInterfaceStyle &>/dev/null" + else + throw "Unsupported platform"; + in + '' + [[ -z "''${1-}" ]] && [[ -z "''${2-}" ]] && echo "Usage: $0 " && exit 1 - if ${queryCommand}; then - echo "$1" - else - echo "$2" - fi - ''; + if ${queryCommand}; then + echo "$1" + else + echo "$2" + fi + ''; }) ]; diff --git a/home/apps/discord.nix b/home/apps/discord.nix index 5572f43..bd9dd92 100644 --- a/home/apps/discord.nix +++ b/home/apps/discord.nix @@ -3,38 +3,42 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv) isDarwin isLinux; -in { +in +{ config = lib.mkIf config.isGraphical { home.packages = - (lib.optionals isDarwin [(pkgs.discord.override {withOpenASAR = true;})]) - ++ (lib.optionals isLinux [(pkgs.vesktop.override {withSystemVencord = false;})]); + (lib.optionals isDarwin [ (pkgs.discord.override { withOpenASAR = true; }) ]) + ++ (lib.optionals isLinux [ (pkgs.vesktop.override { withSystemVencord = false; }) ]); - home.activation.discordSettings = let - json = pkgs.writeTextFile { - name = "discord-settings.json"; - text = lib.generators.toJSON {} { - DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true; - MIN_WIDTH = 0; - MIN_HEIGHT = 0; - openasar = { - css = builtins.readFile ./discord/custom.css; - setup = true; + home.activation.discordSettings = + let + json = pkgs.writeTextFile { + name = "discord-settings.json"; + text = lib.generators.toJSON { } { + DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true; + MIN_WIDTH = 0; + MIN_HEIGHT = 0; + openasar = { + css = builtins.readFile ./discord/custom.css; + setup = true; + }; + trayBalloonShown = false; + SKIP_HOST_UPDATE = true; }; - trayBalloonShown = false; - SKIP_HOST_UPDATE = true; }; - }; - path = - if isLinux - then "${config.xdg.configHome}/discord/settings.json" - else if isDarwin - then "${config.home.homeDirectory}/Library/Application Support/discord/settings.json" - else throw "unsupported platform"; - in + path = + if isLinux then + "${config.xdg.configHome}/discord/settings.json" + else if isDarwin then + "${config.home.homeDirectory}/Library/Application Support/discord/settings.json" + else + throw "unsupported platform"; + in # gets written as a file after the writeBoundary to keep it mutable - lib.hm.dag.entryAfter ["writeBoundary"] '' + lib.hm.dag.entryAfter [ "writeBoundary" ] '' mkdir -p "$(dirname "${path}")" cp -f "${json}" "${path}" ''; @@ -43,7 +47,7 @@ in { launchd.agents.arrpc = { enable = isDarwin; config = { - ProgramArguments = ["${pkgs.arrpc}/bin/arrpc"]; + ProgramArguments = [ "${pkgs.arrpc}/bin/arrpc" ]; KeepAlive = true; RunAtLoad = true; }; diff --git a/home/apps/fonts.nix b/home/apps/fonts.nix index 2a5770b..504eab7 100644 --- a/home/apps/fonts.nix +++ b/home/apps/fonts.nix @@ -3,23 +3,26 @@ lib, pkgs, ... -}: { +}: +{ config = lib.mkIf config.isGraphical { home.activation = { - installCustomFonts = let - fontDirectory = - if pkgs.stdenv.isDarwin - then "${config.home.homeDirectory}/Library/Fonts" - else "${config.xdg.dataHome}/fonts"; - fontPath = ../secrets/fonts; - in - lib.hm.dag.entryAfter ["writeBoundary"] '' + installCustomFonts = + let + fontDirectory = + if pkgs.stdenv.isDarwin then + "${config.home.homeDirectory}/Library/Fonts" + else + "${config.xdg.dataHome}/fonts"; + fontPath = ../secrets/fonts; + in + lib.hm.dag.entryAfter [ "writeBoundary" ] '' mkdir -p "${fontDirectory}" install -Dm644 ${fontPath}/* "${fontDirectory}" ''; }; home.packages = with pkgs; [ - (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) + (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) cascadia-code victor-mono ibm-plex diff --git a/home/apps/foot.nix b/home/apps/foot.nix index 5b07cf0..8095da2 100644 --- a/home/apps/foot.nix +++ b/home/apps/foot.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.foot = { enable = pkgs.stdenv.isLinux; settings = { diff --git a/home/apps/git.nix b/home/apps/git.nix index 3240e7b..e745071 100644 --- a/home/apps/git.nix +++ b/home/apps/git.nix @@ -1,8 +1,5 @@ +{ config, pkgs, ... }: { - config, - pkgs, - ... -}: { programs.git.includes = [ { condition = "gitdir:~/Code/work/"; @@ -15,7 +12,10 @@ ]; # use fsmonitor - home.packages = [pkgs.rs-git-fsmonitor pkgs.watchman]; + home.packages = [ + pkgs.rs-git-fsmonitor + pkgs.watchman + ]; programs.git = { enable = true; diff --git a/home/apps/gnome.nix b/home/apps/gnome.nix index d42288e..0dd2774 100644 --- a/home/apps/gnome.nix +++ b/home/apps/gnome.nix @@ -4,64 +4,77 @@ osConfig, pkgs, ... -}: let +}: +let primary-color = "#161321"; secondary-color = "#161321"; wallpaper-uri = "file://${../wallpapers/dhm_1610.png}"; -in { - config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "gnome")) { - home.packages = with pkgs.gnomeExtensions; [ - appindicator - blur-my-shell - mullvad-indicator - native-window-placement - noannoyance-fork - pop-shell - user-themes - pkgs.pop-launcher - ]; - - dconf.settings = with lib.hm.gvariant; { - # input - "org/gnome/desktop/wm/preferences" = { - resize-with-right-button = true; - }; - "org/gnome/desktop/input-sources" = { - sources = [(mkTuple ["xkb" "us"])]; - xkb-options = ["caps:ctrl_modifier"]; - }; - - # rice - "org/gnome/shell" = { - disable-user-extensions = false; - enabled-extensions = [ - "appindicatorsupport@rgcjonas.gmail.com" - "blur-my-shell@aunetx" - "drive-menu@gnome-shell-extensions.gcampax.github.com" - "mullvadindicator@pobega.github.com" - "noannoyance-fork@vrba.dev" - "user-theme@gnome-shell-extensions.gcampax.github.com" +in +{ + config = + lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "gnome")) + { + home.packages = with pkgs.gnomeExtensions; [ + appindicator + blur-my-shell + mullvad-indicator + native-window-placement + noannoyance-fork + pop-shell + user-themes + pkgs.pop-launcher ]; - favorite-apps = ["org.gnome.Nautilus.desktop" "chromium-browser.desktop" "org.wezfurlong.wezterm.desktop"]; - }; - "org/gnome/shell/extensions/user-theme" = { - name = "WhiteSur-Light"; - }; - # wallpaper - "org/gnome/desktop/background" = { - color-shading-type = "solid"; - picture-options = "zoom"; - picture-uri = wallpaper-uri; - picture-uri-dark = wallpaper-uri; - inherit primary-color secondary-color; + dconf.settings = with lib.hm.gvariant; { + # input + "org/gnome/desktop/wm/preferences" = { + resize-with-right-button = true; + }; + "org/gnome/desktop/input-sources" = { + sources = [ + (mkTuple [ + "xkb" + "us" + ]) + ]; + xkb-options = [ "caps:ctrl_modifier" ]; + }; + + # rice + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = [ + "appindicatorsupport@rgcjonas.gmail.com" + "blur-my-shell@aunetx" + "drive-menu@gnome-shell-extensions.gcampax.github.com" + "mullvadindicator@pobega.github.com" + "noannoyance-fork@vrba.dev" + "user-theme@gnome-shell-extensions.gcampax.github.com" + ]; + favorite-apps = [ + "org.gnome.Nautilus.desktop" + "chromium-browser.desktop" + "org.wezfurlong.wezterm.desktop" + ]; + }; + "org/gnome/shell/extensions/user-theme" = { + name = "WhiteSur-Light"; + }; + + # wallpaper + "org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = wallpaper-uri; + picture-uri-dark = wallpaper-uri; + inherit primary-color secondary-color; + }; + "org/gnome/desktop/screensaver" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = wallpaper-uri; + inherit primary-color secondary-color; + }; + }; }; - "org/gnome/desktop/screensaver" = { - color-shading-type = "solid"; - picture-options = "zoom"; - picture-uri = wallpaper-uri; - inherit primary-color secondary-color; - }; - }; - }; } diff --git a/home/apps/gpg.nix b/home/apps/gpg.nix index 620b487..7fea7bb 100644 --- a/home/apps/gpg.nix +++ b/home/apps/gpg.nix @@ -1,8 +1,5 @@ -{ - config, - pkgs, - ... -}: let +{ config, pkgs, ... }: +let inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; key = "0x0B89BC45007EE9CC"; mailvelopeConfig = builtins.toJSON { @@ -10,16 +7,21 @@ description = "JavaScript binding for GnuPG"; path = pkgs.gpgme.dev + /bin/gpgme-json; type = "stdio"; - allowed_extensions = ["jid1-AQqSMBYb0a8ADg@jetpack"]; + allowed_extensions = [ "jid1-AQqSMBYb0a8ADg@jetpack" ]; }; -in { - home.packages = with pkgs; ([ - git-credential-gopass - gopass - gopass-jsonapi - yubikey-personalization - ] - ++ lib.optionals isDarwin [pinentry_mac]); +in +{ + home.packages = + with pkgs; + ( + [ + git-credential-gopass + gopass + gopass-jsonapi + yubikey-personalization + ] + ++ lib.optionals isDarwin [ pinentry_mac ] + ); # two amazing examples of glorious XDG compliance home.file = { @@ -101,9 +103,6 @@ in { enable = isLinux; enableExtraSocket = true; enableSshSupport = true; - pinentryPackage = - if config.isGraphical - then pkgs.pinentry-gnome3 - else pkgs.pinentry-curses; + pinentryPackage = if config.isGraphical then pkgs.pinentry-gnome3 else pkgs.pinentry-curses; }; } diff --git a/home/apps/gtk.nix b/home/apps/gtk.nix index 2a116c1..b010e24 100644 --- a/home/apps/gtk.nix +++ b/home/apps/gtk.nix @@ -3,9 +3,11 @@ lib, pkgs, ... -}: let +}: +let themeDir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}"; -in { +in +{ config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) { home.pointerCursor = { name = "macOS-Monterey"; diff --git a/home/apps/hyprland.nix b/home/apps/hyprland.nix index 8cadceb..7f38385 100644 --- a/home/apps/hyprland.nix +++ b/home/apps/hyprland.nix @@ -4,142 +4,145 @@ pkgs, osConfig, ... -}: { - config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) { - home = { - packages = with pkgs; [ - blueberry - grimblast - hyprpicker - kooha - libnotify - pavucontrol - swaybg - swayosd - wl-clipboard - ]; - }; - - services = { - clipman.enable = true; - gnome-keyring = { - enable = true; - components = ["secrets"]; - }; - wlsunset = { - enable = true; - latitude = toString config.location.latitude; - longitude = toString config.location.longitude; - }; - udiskie.enable = true; - }; - - wayland.windowManager.hyprland = let - mod = "SUPER"; - modFocus = "${mod}_CTRL"; - modMove = "${mod}_SHIFT"; - hyper = "SUPER_CTRL_SHIFT_ALT"; - swayosd = pkgs.swayosd + "/bin/swayosd-client"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; - in { - enable = true; - settings = { - monitor = ",preferred,auto,2"; - input.follow_mouse = 1; - env = [ - "MOZ_ENABLE_WAYLAND, 1" - "NIXOS_OZONE_WL, 1" - "QT_QPA_PLATFORM, wayland" - "QT_QPA_PLATFORMTHEME, qt5ct" - "SDL_VIDEODRIVER, wayland" - "GDK_SCALE, 2" - "XCURSOR_SIZE, 24" - "XDG_CURRENT_DESKTOP, hyprland" - "XDG_SESSION_DESKTOP, hyprland" - "XDG_SESSION_TYPE, wayland" - "_JAVA_AWT_WM_NONREPARENTING, 1" - ]; - xwayland.force_zero_scaling = true; - general = { - gaps_in = 2; - gaps_out = 5; - border_size = 2; - "col.active_border" = "0xfff5c2e7"; - "col.inactive_border" = "0x80cba6f7"; +}: +{ + config = + lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) + { + home = { + packages = with pkgs; [ + blueberry + grimblast + hyprpicker + kooha + libnotify + pavucontrol + swaybg + swayosd + wl-clipboard + ]; }; - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; + + services = { + clipman.enable = true; + gnome-keyring = { + enable = true; + components = [ "secrets" ]; + }; + wlsunset = { + enable = true; + latitude = toString config.location.latitude; + longitude = toString config.location.longitude; + }; + udiskie.enable = true; }; - decoration.rounding = 5; - dwindle.preserve_split = true; - windowrulev2 = ["suppressevent maximize, class:.*"]; - bind = [ - "${modMove}, return, exec, foot" - "${modMove}, q, killactive," - "${modMove}, m, exit," - "${modMove}, d, togglefloating," - "${mod}, space, exec, rofi -show drun" - "${modMove}, space, exec, 1password --quick-access" - "${hyper}, p, exec, grimblast --notify --freeze copy area" - "${modMove}, p, exec, hyprpicker -a" - "${modFocus}, h, movefocus, l" - "${modFocus}, j, movefocus, d" - "${modFocus}, k, movefocus, u" - "${modFocus}, l, movefocus, r" - "${modMove}, h, movewindow, l" - "${modMove}, j, movewindow, u" - "${modMove}, k, movewindow, d" - "${modMove}, l, movewindow, r" + wayland.windowManager.hyprland = + let + mod = "SUPER"; + modFocus = "${mod}_CTRL"; + modMove = "${mod}_SHIFT"; + hyper = "SUPER_CTRL_SHIFT_ALT"; + swayosd = pkgs.swayosd + "/bin/swayosd-client"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + in + { + enable = true; + settings = { + monitor = ",preferred,auto,2"; + input.follow_mouse = 1; + env = [ + "MOZ_ENABLE_WAYLAND, 1" + "NIXOS_OZONE_WL, 1" + "QT_QPA_PLATFORM, wayland" + "QT_QPA_PLATFORMTHEME, qt5ct" + "SDL_VIDEODRIVER, wayland" + "GDK_SCALE, 2" + "XCURSOR_SIZE, 24" + "XDG_CURRENT_DESKTOP, hyprland" + "XDG_SESSION_DESKTOP, hyprland" + "XDG_SESSION_TYPE, wayland" + "_JAVA_AWT_WM_NONREPARENTING, 1" + ]; + xwayland.force_zero_scaling = true; + general = { + gaps_in = 2; + gaps_out = 5; + border_size = 2; + "col.active_border" = "0xfff5c2e7"; + "col.inactive_border" = "0x80cba6f7"; + }; + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + }; + decoration.rounding = 5; + dwindle.preserve_split = true; + windowrulev2 = [ "suppressevent maximize, class:.*" ]; + bind = [ + "${modMove}, return, exec, foot" + "${modMove}, q, killactive," + "${modMove}, m, exit," + "${modMove}, d, togglefloating," + "${mod}, space, exec, rofi -show drun" + "${modMove}, space, exec, 1password --quick-access" + "${hyper}, p, exec, grimblast --notify --freeze copy area" + "${modMove}, p, exec, hyprpicker -a" - "${modFocus}, 1, workspace, 1" - "${modFocus}, 2, workspace, 2" - "${modFocus}, 3, workspace, 3" - "${modFocus}, 4, workspace, 4" - "${modFocus}, 5, workspace, 5" - "${modFocus}, 6, workspace, 6" - "${modFocus}, 7, workspace, 7" - "${modFocus}, 8, workspace, 8" - "${modFocus}, 9, workspace, 9" - "${modFocus}, 0, workspace, 10" + "${modFocus}, h, movefocus, l" + "${modFocus}, j, movefocus, d" + "${modFocus}, k, movefocus, u" + "${modFocus}, l, movefocus, r" + "${modMove}, h, movewindow, l" + "${modMove}, j, movewindow, u" + "${modMove}, k, movewindow, d" + "${modMove}, l, movewindow, r" - "${modMove}, 1, movetoworkspace, 1" - "${modMove}, 2, movetoworkspace, 2" - "${modMove}, 3, movetoworkspace, 3" - "${modMove}, 4, movetoworkspace, 4" - "${modMove}, 5, movetoworkspace, 5" - "${modMove}, 6, movetoworkspace, 6" - "${modMove}, 7, movetoworkspace, 7" - "${modMove}, 8, movetoworkspace, 8" - "${modMove}, 9, movetoworkspace, 9" - "${modMove}, 0, movetoworkspace, 10" - "${mod}, tab, togglespecialworkspace, magic" - "${modMove}, tab, movetoworkspace, special:magic" + "${modFocus}, 1, workspace, 1" + "${modFocus}, 2, workspace, 2" + "${modFocus}, 3, workspace, 3" + "${modFocus}, 4, workspace, 4" + "${modFocus}, 5, workspace, 5" + "${modFocus}, 6, workspace, 6" + "${modFocus}, 7, workspace, 7" + "${modFocus}, 8, workspace, 8" + "${modFocus}, 9, workspace, 9" + "${modFocus}, 0, workspace, 10" - ", XF86AudioMute, exec, ${swayosd} --output-volume mute-toggle" - ", XF86AudioNext, exec, ${playerctl} next" - ", XF86AudioPrev, exec, ${playerctl} previous" - ", XF86AudioPause, exec, ${playerctl} play-pause" - ]; - binde = [ - ", XF86AudioRaiseVolume, exec, ${swayosd} --output-volume 5" - ", XF86AudioLowerVolume, exec, ${swayosd} --output-volume -5" - ]; - bindm = [ - "SUPER, mouse:272, movewindow" - "SUPER, mouse:273, resizewindow" - ]; - exec = [ - "${pkgs.swayosd}/bin/swayosd-server" - "${pkgs.swaybg}/bin/swaybg -o '*' -m fill -i ${../wallpapers/dhm_1610.png}" - ]; - exec-once = [ - "${config.programs.waybar.package}/bin/waybar -b hyprland" - ]; - plugin.hy3.autotile.enable = true; + "${modMove}, 1, movetoworkspace, 1" + "${modMove}, 2, movetoworkspace, 2" + "${modMove}, 3, movetoworkspace, 3" + "${modMove}, 4, movetoworkspace, 4" + "${modMove}, 5, movetoworkspace, 5" + "${modMove}, 6, movetoworkspace, 6" + "${modMove}, 7, movetoworkspace, 7" + "${modMove}, 8, movetoworkspace, 8" + "${modMove}, 9, movetoworkspace, 9" + "${modMove}, 0, movetoworkspace, 10" + "${mod}, tab, togglespecialworkspace, magic" + "${modMove}, tab, movetoworkspace, special:magic" + + ", XF86AudioMute, exec, ${swayosd} --output-volume mute-toggle" + ", XF86AudioNext, exec, ${playerctl} next" + ", XF86AudioPrev, exec, ${playerctl} previous" + ", XF86AudioPause, exec, ${playerctl} play-pause" + ]; + binde = [ + ", XF86AudioRaiseVolume, exec, ${swayosd} --output-volume 5" + ", XF86AudioLowerVolume, exec, ${swayosd} --output-volume -5" + ]; + bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; + exec = [ + "${pkgs.swayosd}/bin/swayosd-server" + "${pkgs.swaybg}/bin/swaybg -o '*' -m fill -i ${../wallpapers/dhm_1610.png}" + ]; + exec-once = [ "${config.programs.waybar.package}/bin/waybar -b hyprland" ]; + plugin.hy3.autotile.enable = true; + }; + plugins = [ pkgs.hyprlandPlugins.hy3 ]; + }; }; - plugins = [pkgs.hyprlandPlugins.hy3]; - }; - }; } diff --git a/home/apps/kubernetes.nix b/home/apps/kubernetes.nix index 2068454..608a762 100644 --- a/home/apps/kubernetes.nix +++ b/home/apps/kubernetes.nix @@ -1,12 +1,7 @@ +{ config, pkgs, ... }: { - config, - pkgs, - ... -}: { home.packages = with pkgs; [ - (wrapHelm kubernetes-helm { - plugins = [kubernetes-helmPlugins.helm-diff]; - }) + (wrapHelm kubernetes-helm { plugins = [ kubernetes-helmPlugins.helm-diff ]; }) cmctl dyff gojq diff --git a/home/apps/mail.nix b/home/apps/mail.nix index 06cc59e..138b254 100644 --- a/home/apps/mail.nix +++ b/home/apps/mail.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ age.secrets."aerc-personal.conf".path = "${config.xdg.configHome}/aerc/accounts.conf"; programs = { aerc = { diff --git a/home/apps/media.nix b/home/apps/media.nix index a7a88a7..f32c402 100644 --- a/home/apps/media.nix +++ b/home/apps/media.nix @@ -3,15 +3,17 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv.hostPlatform) isLinux; -in { +in +{ config = lib.mkIf config.isGraphical { programs.imv.enable = isLinux; programs.mpv.enable = isLinux; programs.zathura.enable = isLinux; - home.packages = lib.mkIf isLinux [(pkgs.callPackage ../../pkgs/apple-music.nix {})]; + home.packages = lib.mkIf isLinux [ (pkgs.callPackage ../../pkgs/apple-music.nix { }) ]; services.mopidy = lib.mkIf isLinux { enable = true; diff --git a/home/apps/newsboat.nix b/home/apps/newsboat.nix index b7b2f26..a1defa1 100644 --- a/home/apps/newsboat.nix +++ b/home/apps/newsboat.nix @@ -1,13 +1,12 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let inherit (pkgs.stdenv.hostPlatform) isLinux; -in { +in +{ programs.newsboat = rec { enable = true; autoReload = true; - browser = - if isLinux - then "${pkgs.xdg-utils}/bin/xdg-open" - else "open"; + browser = if isLinux then "${pkgs.xdg-utils}/bin/xdg-open" else "open"; extraConfig = '' urls-source "freshrss" freshrss-url "https://freshrss.winston.sh/api/greader.php" diff --git a/home/apps/rice.nix b/home/apps/rice.nix index a6f2309..a7f0d51 100644 --- a/home/apps/rice.nix +++ b/home/apps/rice.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv.hostPlatform) isLinux; ctp = { base = "#1e1e2e"; @@ -13,7 +14,8 @@ red = "#f38ba8"; mauve = "#cba6f7"; }; -in { +in +{ config = lib.mkIf config.isGraphical { programs.i3status-rust = lib.mkIf isLinux { enable = true; diff --git a/home/apps/sway.nix b/home/apps/sway.nix index ddff3f9..9f3422f 100644 --- a/home/apps/sway.nix +++ b/home/apps/sway.nix @@ -4,9 +4,13 @@ osConfig, pkgs, ... -}: let +}: +let fonts = { - names = ["IBM Plex Sans" "Symbols Nerd Font"]; + names = [ + "IBM Plex Sans" + "Symbols Nerd Font" + ]; size = 12.0; }; ctp = { @@ -17,341 +21,344 @@ red = "#f38ba8"; mauve = "#cba6f7"; }; -in { - config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) { - fonts.fontconfig.enable = true; +in +{ + config = + lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) + { + fonts.fontconfig.enable = true; - home = { - packages = with pkgs; [ - blueberry - kooha - libnotify - pavucontrol - sway-contrib.grimshot - swaynotificationcenter - swayosd - wl-clipboard - ]; - }; + home = { + packages = with pkgs; [ + blueberry + kooha + libnotify + pavucontrol + sway-contrib.grimshot + swaynotificationcenter + swayosd + wl-clipboard + ]; + }; - services = { - clipman.enable = true; - gnome-keyring = { - enable = true; - components = ["secrets"]; - }; - wlsunset = { - enable = true; - latitude = toString config.location.latitude; - longitude = toString config.location.longitude; - }; - udiskie.enable = true; - }; + services = { + clipman.enable = true; + gnome-keyring = { + enable = true; + components = [ "secrets" ]; + }; + wlsunset = { + enable = true; + latitude = toString config.location.latitude; + longitude = toString config.location.longitude; + }; + udiskie.enable = true; + }; - wayland.windowManager.sway = let - modifier = "Mod4"; - in { - enable = true; - package = null; - checkConfig = false; - config = rec { - inherit modifier; - focus.wrapping = "no"; - focus.mouseWarping = "container"; - startup = [ + wayland.windowManager.sway = + let + modifier = "Mod4"; + in { - command = "${pkgs.autotiling}/bin/autotiling -l2"; - always = true; - } - { - command = "1password --silent"; - } - { - command = '' - swayidle -w \ - timeout 180 'swaylock -f' \ - timeout 360 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock -f' + enable = true; + package = null; + checkConfig = false; + config = rec { + inherit modifier; + focus.wrapping = "no"; + focus.mouseWarping = "container"; + startup = [ + { + command = "${pkgs.autotiling}/bin/autotiling -l2"; + always = true; + } + { command = "1password --silent"; } + { + command = '' + swayidle -w \ + timeout 180 'swaylock -f' \ + timeout 360 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f' + ''; + always = true; + } + { + command = "${pkgs.swayosd}/bin/swayosd-server"; + always = true; + } + { command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; } + ]; + workspaceAutoBackAndForth = true; + terminal = "${config.programs.wezterm.package}/bin/wezterm"; + menu = "${config.programs.rofi.package}/bin/rofi"; + defaultWorkspace = "workspace number 1"; + input."type:keyboard".xkb_options = "ctrl:nocaps,compose:ralt"; + output."*" = { + scale = "2"; + bg = "${../wallpapers/dhm_1610.png} fill #171320"; + }; + keybindings = + let + mod = modifier; + modMove = "${mod}+Shift"; + modFocus = "${mod}+Ctrl"; + hyper = "Mod4+Mod1+Shift+Ctrl"; + + filebrowser = "${pkgs.gnome.nautilus}/bin/nautilus"; + screenshot = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + swayosd = pkgs.swayosd + "/bin/swayosd-client"; + in + { + "${mod}+Shift+b" = "border none"; + "${mod}+b" = "border pixel 2"; + "${mod}+n" = "border normal"; + # reload the configuration file + "${mod}+Shift+r" = "reload"; + # kill focused window + "${mod}+Shift+q" = "kill"; + # Start Applications + "${mod}+Shift+Return" = "exec ${terminal}"; + "${mod}+e" = "exec --no-startup-id ${filebrowser}"; + "${hyper}+p" = "exec --no-startup-id ${screenshot}"; + + # change focus + "${modFocus}+h" = "focus left"; + "${modFocus}+j" = "focus down"; + "${modFocus}+k" = "focus up"; + "${modFocus}+l" = "focus right"; + "${modFocus}+Left" = "focus left"; + "${modFocus}+Down" = "focus down"; + "${modFocus}+Up" = "focus up"; + "${modFocus}+Right" = "focus right"; + # move focus + "${modMove}+h" = "move left"; + "${modMove}+j" = "move down"; + "${modMove}+k" = "move up"; + "${modMove}+l" = "move right"; + "${modMove}+Left" = "move left"; + "${modMove}+Down" = "move down"; + "${modMove}+Up" = "move up"; + "${modMove}+Right" = "move right"; + + # move workspaces across monitors + "${modMove}+greater" = "move workspace to output right"; + "${modMove}+less" = "move workspace to output left"; + + # split orientation + "${mod}+q" = "split toggle"; + + # toggle fullscreen mode for the focused container + "${mod}+f" = "fullscreen toggle"; + + # change container layout (stacked, tabbed, toggle split) + "${mod}+s" = "layout toggle"; + + # toggle tiling / floating + "${mod}+Shift+d" = "floating toggle"; + # change focus between tiling / floating windows + "${mod}+d" = "focus mode_toggle"; + + # toggle sticky + "${mod}+Shift+s" = "sticky toggle"; + + # focus the parent container + "${mod}+a" = "focus parent"; + + # move the currently focused window to the scratchpad + "${mod}+Shift+Tab" = "move scratchpad"; + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + "${mod}+Tab" = "scratchpad show"; + "${mod}+m" = "[class=\"discord\"] scratchpad show"; + + # switch to workspace + "${modFocus}+1" = "workspace 1"; + "${modFocus}+2" = "workspace 2"; + "${modFocus}+3" = "workspace 3"; + "${modFocus}+4" = "workspace 4"; + "${modFocus}+5" = "workspace 5"; + "${modFocus}+6" = "workspace 6"; + "${modFocus}+7" = "workspace 7"; + "${modFocus}+8" = "workspace 8"; + "${modFocus}+9" = "workspace 9"; + "${modFocus}+0" = "workspace 10"; + # Move to workspace with focused container + "${modMove}+1" = "move container to workspace 1; workspace 1"; + "${modMove}+2" = "move container to workspace 2; workspace 2"; + "${modMove}+3" = "move container to workspace 3; workspace 3"; + "${modMove}+4" = "move container to workspace 4; workspace 4"; + "${modMove}+5" = "move container to workspace 5; workspace 5"; + "${modMove}+6" = "move container to workspace 6; workspace 6"; + "${modMove}+7" = "move container to workspace 7; workspace 7"; + "${modMove}+8" = "move container to workspace 8; workspace 8"; + "${modMove}+9" = "move container to workspace 9; workspace 9"; + "${modMove}+0" = "move container to workspace 10; workspace 10"; + # rofi instead of drun + "${mod}+space" = "exec --no-startup-id ${menu} -show drun -dpi $dpi"; + # 1password + "${mod}+Shift+space" = "exec ${pkgs._1password-gui}/bin/1password --quick-access"; + + # audio + "XF86AudioRaiseVolume" = "exec ${swayosd} --output-volume 5"; + "XF86AudioLowerVolume" = "exec ${swayosd} --output-volume -5"; + "XF86AudioMute" = "exec ${swayosd} --output-volume mute-toggle"; + "XF86AudioNext" = "exec --no-startup-id ${playerctl} next"; + "XF86AudioPrev" = "exec --no-startup-id ${playerctl} previous"; + "XF86AudioPlay" = "exec --no-startup-id ${playerctl} play-pause"; + + # modes + "${mod}+r" = "mode \"resize\""; + "${mod}+p" = "mode \"power: (l)ock, (e)xit, (r)eboot, (s)uspend, (h)ibernate, (S)hut off\""; + }; + modes = { + "power: (l)ock, (e)xit, (r)eboot, (s)uspend, (h)ibernate, (S)hut off" = { + l = "exec --no-startup-id swaylock --color 000000, mode \"default\""; + e = "exec --no-startup-id swaymsg exit, mode \"default\""; + r = "exec --no-startup-id systemctl reboot, mode \"default\""; + s = "exec --no-startup-id systemctl suspend, mode \"default\""; + h = "exec --no-startup-id systemctl hibernate, mode \"default\""; + "Shift+s" = "exec --no-startup-id systemctl poweroff, mode \"default\""; + Escape = "mode default"; + Return = "mode default"; + }; + resize = { + Escape = "mode default"; + Return = "mode default"; + h = "resize shrink width 10 px or 10 ppt"; + j = "resize grow height 10 px or 10 ppt"; + k = "resize shrink height 10 px or 10 ppt"; + l = "resize grow width 10 px or 10 ppt"; + R = "resize set 50 ppt 50 ppt"; + }; + }; + inherit fonts; + colors = rec { + focused = { + background = ctp.base; + border = ctp.pink; + childBorder = ctp.pink; + indicator = ctp.pink; + inherit (ctp) text; + }; + urgent = { + background = ctp.base; + border = ctp.red; + childBorder = ctp.red; + indicator = ctp.red; + inherit (ctp) text; + }; + unfocused = { + background = ctp.base; + border = ctp.mauve; + childBorder = ctp.mauve; + indicator = ctp.mauve; + inherit (ctp) text; + }; + focusedInactive = unfocused; + placeholder = unfocused; + }; + window = { + titlebar = false; + hideEdgeBorders = "none"; + border = 2; + }; + gaps = { + inner = 5; + outer = 2; + }; + bars = [ + { + inherit fonts; + mode = "hide"; + position = "top"; + statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml"; + } + ]; + }; + + extraConfig = '' + for_window [floating] border pixel 2 + + # floating sticky + for_window [class="1Password"] floating enable sticky enable + for_window [window_role="PictureInPicture"] floating enable sticky enable + + # floating + for_window [class="GParted"] floating enable + for_window [title="(?i)SteamTinkerLaunch"] floating enable + for_window [title="Blender Render"] floating enable + + # general WM role settings + for_window [title="splash"] floating enable + for_window [urgent=latest] focus + for_window [window_role="pop-up"] floating enable + for_window [window_role="task_dialog"] floating enable + + # apps + for_window [class="Pavucontrol"] floating enable + for_window [class="Yad" title="Authentication"] floating enable + for_window [class="jetbrains*" title="Welcome*"] floating enable + for_window [title="File Transfer*"] floating enable + for_window [title="Steam Guard*"] floating enable + + # keep apps in scratchpad + for_window [class="discord"] move scratchpad sticky + + set $mode_gaps Gaps: (o)uter, (i)nner + set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) + set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) + bindsym ${modifier}+Shift+g mode "$mode_gaps" + + mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" + } + mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" + } + mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" + } + + shadows enable + shadow_color #11111b99 + shadow_blur_radius 20 + + corner_radius 5 + smart_corner_radius enable + + blur enable + blur_passes 2 + blur_radius 4 + + layer_effects "swaync-notification-window" blur enable; shadows enable; corner_radius 5; ''; - always = true; - } - { - command = "${pkgs.swayosd}/bin/swayosd-server"; - always = true; - } - { - command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - } - ]; - workspaceAutoBackAndForth = true; - terminal = "${config.programs.wezterm.package}/bin/wezterm"; - menu = "${config.programs.rofi.package}/bin/rofi"; - defaultWorkspace = "workspace number 1"; - input."type:keyboard".xkb_options = "ctrl:nocaps,compose:ralt"; - output."*" = { - scale = "2"; - bg = "${../wallpapers/dhm_1610.png} fill #171320"; - }; - keybindings = let - mod = modifier; - modMove = "${mod}+Shift"; - modFocus = "${mod}+Ctrl"; - hyper = "Mod4+Mod1+Shift+Ctrl"; - - filebrowser = "${pkgs.gnome.nautilus}/bin/nautilus"; - screenshot = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; - swayosd = pkgs.swayosd + "/bin/swayosd-client"; - in { - "${mod}+Shift+b" = "border none"; - "${mod}+b" = "border pixel 2"; - "${mod}+n" = "border normal"; - # reload the configuration file - "${mod}+Shift+r" = "reload"; - # kill focused window - "${mod}+Shift+q" = "kill"; - # Start Applications - "${mod}+Shift+Return" = "exec ${terminal}"; - "${mod}+e" = "exec --no-startup-id ${filebrowser}"; - "${hyper}+p" = "exec --no-startup-id ${screenshot}"; - - # change focus - "${modFocus}+h" = "focus left"; - "${modFocus}+j" = "focus down"; - "${modFocus}+k" = "focus up"; - "${modFocus}+l" = "focus right"; - "${modFocus}+Left" = "focus left"; - "${modFocus}+Down" = "focus down"; - "${modFocus}+Up" = "focus up"; - "${modFocus}+Right" = "focus right"; - # move focus - "${modMove}+h" = "move left"; - "${modMove}+j" = "move down"; - "${modMove}+k" = "move up"; - "${modMove}+l" = "move right"; - "${modMove}+Left" = "move left"; - "${modMove}+Down" = "move down"; - "${modMove}+Up" = "move up"; - "${modMove}+Right" = "move right"; - - # move workspaces across monitors - "${modMove}+greater" = "move workspace to output right"; - "${modMove}+less" = "move workspace to output left"; - - # split orientation - "${mod}+q" = "split toggle"; - - # toggle fullscreen mode for the focused container - "${mod}+f" = "fullscreen toggle"; - - # change container layout (stacked, tabbed, toggle split) - "${mod}+s" = "layout toggle"; - - # toggle tiling / floating - "${mod}+Shift+d" = "floating toggle"; - # change focus between tiling / floating windows - "${mod}+d" = "focus mode_toggle"; - - # toggle sticky - "${mod}+Shift+s" = "sticky toggle"; - - # focus the parent container - "${mod}+a" = "focus parent"; - - # move the currently focused window to the scratchpad - "${mod}+Shift+Tab" = "move scratchpad"; - # Show the next scratchpad window or hide the focused scratchpad window. - # If there are multiple scratchpad windows, this command cycles through them. - "${mod}+Tab" = "scratchpad show"; - "${mod}+m" = "[class=\"discord\"] scratchpad show"; - - # switch to workspace - "${modFocus}+1" = "workspace 1"; - "${modFocus}+2" = "workspace 2"; - "${modFocus}+3" = "workspace 3"; - "${modFocus}+4" = "workspace 4"; - "${modFocus}+5" = "workspace 5"; - "${modFocus}+6" = "workspace 6"; - "${modFocus}+7" = "workspace 7"; - "${modFocus}+8" = "workspace 8"; - "${modFocus}+9" = "workspace 9"; - "${modFocus}+0" = "workspace 10"; - # Move to workspace with focused container - "${modMove}+1" = "move container to workspace 1; workspace 1"; - "${modMove}+2" = "move container to workspace 2; workspace 2"; - "${modMove}+3" = "move container to workspace 3; workspace 3"; - "${modMove}+4" = "move container to workspace 4; workspace 4"; - "${modMove}+5" = "move container to workspace 5; workspace 5"; - "${modMove}+6" = "move container to workspace 6; workspace 6"; - "${modMove}+7" = "move container to workspace 7; workspace 7"; - "${modMove}+8" = "move container to workspace 8; workspace 8"; - "${modMove}+9" = "move container to workspace 9; workspace 9"; - "${modMove}+0" = "move container to workspace 10; workspace 10"; - # rofi instead of drun - "${mod}+space" = "exec --no-startup-id ${menu} -show drun -dpi $dpi"; - # 1password - "${mod}+Shift+space" = "exec ${pkgs._1password-gui}/bin/1password --quick-access"; - - # audio - "XF86AudioRaiseVolume" = "exec ${swayosd} --output-volume 5"; - "XF86AudioLowerVolume" = "exec ${swayosd} --output-volume -5"; - "XF86AudioMute" = "exec ${swayosd} --output-volume mute-toggle"; - "XF86AudioNext" = "exec --no-startup-id ${playerctl} next"; - "XF86AudioPrev" = "exec --no-startup-id ${playerctl} previous"; - "XF86AudioPlay" = "exec --no-startup-id ${playerctl} play-pause"; - - # modes - "${mod}+r" = "mode \"resize\""; - "${mod}+p" = "mode \"power: (l)ock, (e)xit, (r)eboot, (s)uspend, (h)ibernate, (S)hut off\""; - }; - modes = { - "power: (l)ock, (e)xit, (r)eboot, (s)uspend, (h)ibernate, (S)hut off" = { - l = "exec --no-startup-id swaylock --color 000000, mode \"default\""; - e = "exec --no-startup-id swaymsg exit, mode \"default\""; - r = "exec --no-startup-id systemctl reboot, mode \"default\""; - s = "exec --no-startup-id systemctl suspend, mode \"default\""; - h = "exec --no-startup-id systemctl hibernate, mode \"default\""; - "Shift+s" = "exec --no-startup-id systemctl poweroff, mode \"default\""; - Escape = "mode default"; - Return = "mode default"; + systemd = { + enable = true; + xdgAutostart = true; + }; }; - resize = { - Escape = "mode default"; - Return = "mode default"; - h = "resize shrink width 10 px or 10 ppt"; - j = "resize grow height 10 px or 10 ppt"; - k = "resize shrink height 10 px or 10 ppt"; - l = "resize grow width 10 px or 10 ppt"; - R = "resize set 50 ppt 50 ppt"; - }; - }; - inherit fonts; - colors = rec { - focused = { - background = ctp.base; - border = ctp.pink; - childBorder = ctp.pink; - indicator = ctp.pink; - inherit (ctp) text; - }; - urgent = { - background = ctp.base; - border = ctp.red; - childBorder = ctp.red; - indicator = ctp.red; - inherit (ctp) text; - }; - unfocused = { - background = ctp.base; - border = ctp.mauve; - childBorder = ctp.mauve; - indicator = ctp.mauve; - inherit (ctp) text; - }; - focusedInactive = unfocused; - placeholder = unfocused; - }; - window = { - titlebar = false; - hideEdgeBorders = "none"; - border = 2; - }; - gaps = { - inner = 5; - outer = 2; - }; - bars = [ - { - inherit fonts; - mode = "hide"; - position = "top"; - statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml"; - } - ]; }; - - extraConfig = '' - for_window [floating] border pixel 2 - - # floating sticky - for_window [class="1Password"] floating enable sticky enable - for_window [window_role="PictureInPicture"] floating enable sticky enable - - # floating - for_window [class="GParted"] floating enable - for_window [title="(?i)SteamTinkerLaunch"] floating enable - for_window [title="Blender Render"] floating enable - - # general WM role settings - for_window [title="splash"] floating enable - for_window [urgent=latest] focus - for_window [window_role="pop-up"] floating enable - for_window [window_role="task_dialog"] floating enable - - # apps - for_window [class="Pavucontrol"] floating enable - for_window [class="Yad" title="Authentication"] floating enable - for_window [class="jetbrains*" title="Welcome*"] floating enable - for_window [title="File Transfer*"] floating enable - for_window [title="Steam Guard*"] floating enable - - # keep apps in scratchpad - for_window [class="discord"] move scratchpad sticky - - set $mode_gaps Gaps: (o)uter, (i)nner - set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) - set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) - bindsym ${modifier}+Shift+g mode "$mode_gaps" - - mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" - } - mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" - } - mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" - } - - shadows enable - shadow_color #11111b99 - shadow_blur_radius 20 - - corner_radius 5 - smart_corner_radius enable - - blur enable - blur_passes 2 - blur_radius 4 - - layer_effects "swaync-notification-window" blur enable; shadows enable; corner_radius 5; - ''; - systemd = { - enable = true; - xdgAutostart = true; - }; - }; - }; } diff --git a/home/apps/tmux.nix b/home/apps/tmux.nix index 635efdf..003be57 100644 --- a/home/apps/tmux.nix +++ b/home/apps/tmux.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let inherit (pkgs.tmuxPlugins) mkTmuxPlugin; menus = mkTmuxPlugin { @@ -21,7 +22,8 @@ sha256 = "sha256-c5EGBrKcrqHWTKpCEhxYfxPeERFrbTuDfcQhsUAbic4="; }; }; -in { +in +{ programs.tmux = { enable = true; sensibleOnTop = true; diff --git a/home/apps/vscode.nix b/home/apps/vscode.nix index 32e01a2..9007cf8 100644 --- a/home/apps/vscode.nix +++ b/home/apps/vscode.nix @@ -5,13 +5,15 @@ pkgs, isNixOS, ... -}: let +}: +let inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; settingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json"; keybindingsJSON = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/keybindings.json"; snippetsDir = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/snippets"; -in { +in +{ programs.vscode = { enable = config.isGraphical; extensions = @@ -36,24 +38,11 @@ in { # some default config patching to make these work without needing devShells all the time. # other extensions like Go/Rust are only really used with devShells, # nix & shell are universal enough for me to want them everywhere. - (jnoortheen.nix-ide.overrideAttrs (prev: { - nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils]; - postInstall = '' - cd "$out/$installPrefix" - jq -e ' - .contributes.configuration.properties."nix.formatterPath".default = - "${pkgs.alejandra}/bin/alejandra" | - .contributes.configuration.properties."nix.enableLanguageServer".default = - "true" | - .contributes.configuration.properties."nix.serverPath".default = - "${pkgs.nil}/bin/nil" | - .contributes.configuration.properties."nix.serverSettings".default.nil.formatting.command[0] = - "${pkgs.alejandra}/bin/alejandra" - ' < package.json | sponge package.json - ''; - })) (mads-hartmann.bash-ide-vscode.overrideAttrs (prev: { - nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils]; + nativeBuildInputs = prev.nativeBuildInputs ++ [ + pkgs.jq + pkgs.moreutils + ]; postInstall = '' cd "$out/$installPrefix" jq -e ' @@ -63,7 +52,10 @@ in { ''; })) (mkhl.shfmt.overrideAttrs (prev: { - nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils]; + nativeBuildInputs = prev.nativeBuildInputs ++ [ + pkgs.jq + pkgs.moreutils + ]; postInstall = '' cd "$out/$installPrefix" jq -e ' @@ -72,8 +64,6 @@ in { ' < package.json | sponge package.json ''; })) - ms-vscode-remote.remote-ssh-edit - ms-vscode.remote-explorer adrianwilczynski.alpine-js-intellisense antfu.icons-carbon arcanis.vscode-zipfs @@ -95,13 +85,18 @@ in { golang.go graphql.vscode-graphql-syntax gruntfuggly.todo-tree + hbenl.vscode-test-explorer + jnoortheen.nix-ide jock.svg leonardssh.vscord lunuan.kubernetes-templates mikestead.dotenv mkhl.direnv ms-kubernetes-tools.vscode-kubernetes-tools + ms-vscode-remote.remote-ssh-edit ms-vscode.live-server + ms-vscode.remote-explorer + ms-vscode.test-adapter-converter oscarotero.vento-syntax redhat.vscode-yaml ryanluker.vscode-coverage-gutters @@ -113,19 +108,7 @@ in { usernamehw.errorlens vscodevim.vim wakatime.vscode-wakatime - ms-vscode.test-adapter-converter - hbenl.vscode-test-explorer webfreak.code-d - # (webfreak.code-d.overrideAttrs (prev: { - # nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.jq pkgs.moreutils]; - # postInstall = '' - # cd "$out/$installPrefix" - # jq -e ' - # .contributes.configuration.properties."d.dcdClientPath".default = - # "${pkgs.alejandra}/bin/alejandra" - # ' < package.json | sponge package.json - # ''; - # })) ]); mutableExtensionsDir = true; }; diff --git a/home/apps/waybar.nix b/home/apps/waybar.nix index 86ef503..79eaf16 100644 --- a/home/apps/waybar.nix +++ b/home/apps/waybar.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: let +}: +let commonSettings = { layer = "top"; position = "top"; @@ -12,7 +13,7 @@ spacing = 2; margin = "2"; - modules-center = ["hyprland/window"]; + modules-center = [ "hyprland/window" ]; modules-right = [ "tray" "idle_inhibitor" @@ -112,34 +113,33 @@ padding: 0 10px; } ''; -in { +in +{ config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) { programs.waybar = { enable = true; settings = { - hyprland = - commonSettings - // { - modules-left = ["hyprland/workspaces"]; - "hyprland/workspaces" = { - format = "{icon}"; - on-click = "activate"; - format-icons = { - "1" = "Ⅰ"; - "2" = "Ⅱ"; - "3" = "Ⅲ"; - "4" = "Ⅳ"; - "5" = "Ⅴ"; - "6" = "Ⅵ"; - "7" = "Ⅶ"; - "8" = "Ⅷ"; - "9" = "Ⅸ"; - "10" = "Ⅹ"; - }; - persistent-workspaces."*" = 10; + hyprland = commonSettings // { + modules-left = [ "hyprland/workspaces" ]; + "hyprland/workspaces" = { + format = "{icon}"; + on-click = "activate"; + format-icons = { + "1" = "Ⅰ"; + "2" = "Ⅱ"; + "3" = "Ⅲ"; + "4" = "Ⅳ"; + "5" = "Ⅴ"; + "6" = "Ⅵ"; + "7" = "Ⅶ"; + "8" = "Ⅷ"; + "9" = "Ⅸ"; + "10" = "Ⅹ"; }; + persistent-workspaces."*" = 10; }; + }; }; }; xdg.configFile = { diff --git a/home/apps/wezterm.nix b/home/apps/wezterm.nix index 37c322f..f03242d 100644 --- a/home/apps/wezterm.nix +++ b/home/apps/wezterm.nix @@ -4,15 +4,15 @@ lib, pkgs, ... -}: let +}: +let mkSymlink = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm/${path}"; - srcs = pkgs.callPackage ../../_sources/generated.nix {}; -in { + srcs = pkgs.callPackage ../../_sources/generated.nix { }; +in +{ # use the GUI version & config when we have a gui, else just get terminfo config = lib.mkMerge [ - (lib.mkIf (!config.isGraphical) { - home.packages = [pkgs.wezterm.terminfo]; - }) + (lib.mkIf (!config.isGraphical) { home.packages = [ pkgs.wezterm.terminfo ]; }) (lib.mkIf config.isGraphical { programs.wezterm.enable = true; diff --git a/home/apps/zsh.nix b/home/apps/zsh.nix index e66bd57..b03f2e2 100644 --- a/home/apps/zsh.nix +++ b/home/apps/zsh.nix @@ -3,26 +3,29 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv) isLinux; - srcs = pkgs.callPackage ../../_sources/generated.nix {}; - zshPlugins = plugins: (map (plugin: rec { + srcs = pkgs.callPackage ../../_sources/generated.nix { }; + zshPlugins = + plugins: + (map (plugin: rec { name = src.name; inherit (plugin) file src; - }) - plugins); -in { + }) plugins); +in +{ home.sessionVariables = { LESS = "-R --use-color"; LESSHISTFILE = "-"; MANPAGER = "sh -c 'col -bx | bat -l man -p'"; }; - home.packages = [pkgs.onefetch]; + home.packages = [ pkgs.onefetch ]; programs = { atuin = { enable = true; - flags = ["--disable-up-arrow"]; + flags = [ "--disable-up-arrow" ]; settings = { inline_height = 30; style = "compact"; @@ -87,7 +90,11 @@ in { prompt = "#cba6f7"; spinner = "#f5e0dc"; }; - defaultOptions = ["--height=30%" "--layout=reverse" "--info=inline"]; + defaultOptions = [ + "--height=30%" + "--layout=reverse" + "--info=inline" + ]; }; less.enable = true; @@ -161,8 +168,16 @@ in { oh-my-zsh = { enable = true; plugins = - ["colored-man-pages" "colorize" "git" "kubectl"] - ++ lib.optionals pkgs.stdenv.isDarwin ["dash" "macos"]; + [ + "colored-man-pages" + "colorize" + "git" + "kubectl" + ] + ++ lib.optionals pkgs.stdenv.isDarwin [ + "dash" + "macos" + ]; }; plugins = zshPlugins [ { diff --git a/home/default.nix b/home/default.nix index b093367..731477f 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,41 +3,51 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; -in { - imports = [./apps ./secrets ./xdg.nix]; +in +{ + imports = [ + ./apps + ./secrets + ./xdg.nix + ]; home = { - packages = with pkgs; ([ - _1password - age - age-plugin-yubikey - catppuccin-catwalk - catppuccin-whiskers - deno - fd - ffmpeg - file - gh - git-crypt - gocryptfs - imagemagick - just - mdcat - nix-output-monitor - nur.repos.nekowinston.icat - nvd - ranger - ripgrep - wakatime - watchexec - ] - ++ lib.optionals (config.isGraphical && isLinux) [ - _1password-gui - uhk-agent - neovide - ]); + packages = + with pkgs; + ( + [ + _1password + age + age-plugin-yubikey + catppuccin-catwalk + catppuccin-whiskers + deno + fd + ffmpeg + file + gh + git-crypt + gocryptfs + imagemagick + just + mdcat + nix-output-monitor + nur.repos.nekowinston.icat + nvd + ranger + ripgrep + wakatime + watchexec + ] + ++ lib.optionals (config.isGraphical && isLinux) [ + _1password-gui + uhk-agent + neovide + ] + ); sessionVariables = lib.mkIf isDarwin { SSH_AUTH_SOCK = "${config.programs.gpg.homedir}/S.gpg-agent.ssh"; }; diff --git a/home/lib.nix b/home/lib.nix index 3967cc9..3c720c8 100644 --- a/home/lib.nix +++ b/home/lib.nix @@ -3,24 +3,24 @@ pkgs, username, isNixOS ? true, -}: rec { +}: +rec { inherit (pkgs.stdenv) isLinux isDarwin; extraSpecialArgs = { flakePath = - if isDarwin - then "/Users/${username}/.config/flake" - else "/home/${username}/.config/flake"; + if isDarwin then "/Users/${username}/.config/flake" else "/home/${username}/.config/flake"; inherit inputs isNixOS; }; hmStandaloneConfig = { home.homeDirectory = - if isLinux - then "/home/${username}" - else if isDarwin - then "/Users/${username}" - else throw "Unsupported system"; + if isLinux then + "/home/${username}" + else if isDarwin then + "/Users/${username}" + else + throw "Unsupported system"; home.username = username; isGraphical = false; targets.genericLinux.enable = isLinux; @@ -36,32 +36,32 @@ vscode-server.homeModules.default ]) ++ [ - ({ - osConfig, - lib, - ... - }: let - inherit (lib) mkOption types; - in { - options = { - isGraphical = mkOption { - default = osConfig.isGraphical; - description = "Whether the system is a graphical target"; - type = types.bool; - }; - location = { - latitude = mkOption { - default = osConfig.location.latitude; - type = types.nullOr types.float; + ( + { osConfig, lib, ... }: + let + inherit (lib) mkOption types; + in + { + options = { + isGraphical = mkOption { + default = osConfig.isGraphical; + description = "Whether the system is a graphical target"; + type = types.bool; }; - longitude = mkOption { - default = osConfig.location.longitude; - type = types.nullOr types.float; + location = { + latitude = mkOption { + default = osConfig.location.latitude; + type = types.nullOr types.float; + }; + longitude = mkOption { + default = osConfig.location.longitude; + type = types.nullOr types.float; + }; }; }; - }; - }) + } + ) ] - ++ pkgs.lib.optionals (!isNixOS) [hmStandaloneConfig] - ++ [./.]; + ++ pkgs.lib.optionals (!isNixOS) [ hmStandaloneConfig ] + ++ [ ./. ]; } diff --git a/home/secrets/default.nix b/home/secrets/default.nix index 52d4b78..288fa04 100644 --- a/home/secrets/default.nix +++ b/home/secrets/default.nix @@ -3,17 +3,24 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv) isDarwin; -in { +in +{ age = { - identityPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"]; + identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; - secrets = with builtins; - listToAttrs (map (k: { - name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k); - value = {file = ./../.. + "/${k}";}; - }) (attrNames (import ./secrets.nix))); + secrets = + with builtins; + listToAttrs ( + map (k: { + name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k); + value = { + file = ./../.. + "/${k}"; + }; + }) (attrNames (import ./secrets.nix)) + ); secretsDir = lib.mkIf isDarwin "/private/tmp/agenix"; secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d"; diff --git a/home/secrets/secrets.nix b/home/secrets/secrets.nix index d215363..546df4b 100644 --- a/home/secrets/secrets.nix +++ b/home/secrets/secrets.nix @@ -6,8 +6,9 @@ let }; yubikeys._5ci = "age1yubikey1qfkn095xth4ukxjye98ew4ul6xdkyz7sek0hd67yfjs5z6tv7q9jgnfchls"; - default = [yubikeys._5ci] ++ (builtins.attrValues homes); -in { + default = [ yubikeys._5ci ] ++ (builtins.attrValues homes); +in +{ "home/secrets/aerc-personal.conf.age".publicKeys = default; "home/secrets/gitconfig-freelance.age".publicKeys = default; "home/secrets/gitconfig-work.age".publicKeys = default; diff --git a/home/xdg.nix b/home/xdg.nix index ca543af..90c7e45 100644 --- a/home/xdg.nix +++ b/home/xdg.nix @@ -5,11 +5,18 @@ lib, pkgs, ... -}: let +}: +let inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; - inherit (config.xdg) cacheHome configHome dataHome stateHome; + inherit (config.xdg) + cacheHome + configHome + dataHome + stateHome + ; inherit (config.home) homeDirectory; -in { +in +{ home = rec { sessionVariables = { AZURE_CONFIG_DIR = "${configHome}/azure"; diff --git a/machines/common/darwin/default.nix b/machines/common/darwin/default.nix index 9426230..2d8fa39 100644 --- a/machines/common/darwin/default.nix +++ b/machines/common/darwin/default.nix @@ -1,9 +1,6 @@ +{ pkgs, lib, ... }: { - pkgs, - lib, - ... -}: { - imports = [./options.nix]; + imports = [ ./options.nix ]; # manipulate the global /etc/zshenv for PATH, etc. programs.zsh.enable = true; @@ -40,98 +37,96 @@ mouse_follows_focus = "off"; focus_follows_mouse = "off"; }; - extraConfig = let - rule = "yabai -m rule"; - mkRules = apps: options: - builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps); - unmanaged = apps: mkRules apps "manage=off"; - in '' - # auto-inject scripting additions - yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" - sudo yabai --load-sa + extraConfig = + let + rule = "yabai -m rule"; + mkRules = + apps: options: + builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps); + unmanaged = apps: mkRules apps "manage=off"; + in + '' + # auto-inject scripting additions + yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" + sudo yabai --load-sa - # ensure that there are always 10 spaces - spacestocreate=10 - spaces=$((spacestocreate - $(yabai -m query --spaces | ${pkgs.jq}/bin/jq length))) - while [ "$spaces" -gt 0 ]; do - yabai -m space --create - spaces=$((spaces - 1)) - done + # ensure that there are always 10 spaces + spacestocreate=10 + spaces=$((spacestocreate - $(yabai -m query --spaces | ${pkgs.jq}/bin/jq length))) + while [ "$spaces" -gt 0 ]; do + yabai -m space --create + spaces=$((spaces - 1)) + done - # make the spaces auto-balance - for i in {1..10}; do - yabai -m config --space "$i" auto_balance on - done + # make the spaces auto-balance + for i in {1..10}; do + yabai -m config --space "$i" auto_balance on + done - ${unmanaged [ - "CleanShot" - "GOG Galaxy" - "Godot" - "JetBrains Toolbox" - "Mullvad VPN" - "OBS Studio" - "Sip" - "Steam" - "System Settings" - "iStat Menus" - ]} + ${unmanaged [ + "CleanShot" + "GOG Galaxy" + "Godot" + "JetBrains Toolbox" + "Mullvad VPN" + "OBS Studio" + "Sip" + "Steam" + "System Settings" + "iStat Menus" + ]} - ${rule} --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off - ${rule} --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off - ''; + ${rule} --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off + ${rule} --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off + ''; }; skhd = { enable = true; - skhdConfig = let - mapKeymaps = cmd: - builtins.concatStringsSep "\n" ( - map (i: - builtins.replaceStrings ["Num"] [ - (toString ( - if (i == 10) - then 0 - else i - )) - ] - cmd) ( - lib.range 1 10 - ) - ); - in '' - #!/usr/bin/env sh - # focus window - cmd + ctrl - h : yabai -m window --focus west - cmd + ctrl - j : yabai -m window --focus south - cmd + ctrl - k : yabai -m window --focus north - cmd + ctrl - l : yabai -m window --focus east - # move window - cmd + shift - h : yabai -m window --warp west - cmd + shift - j : yabai -m window --warp south - cmd + shift - k : yabai -m window --warp north - cmd + shift - l : yabai -m window --warp east - # toggle sticky/floating - cmd + shift - s: yabai -m window --toggle sticky --toggle float --toggle topmost - cmd + shift - d: yabai -m window --toggle float - # rotate - cmd + ctrl - e : yabai -m space --balance - cmd + ctrl - r : yabai -m space --rotate 270 - # open terminal - cmd + shift - return : open -na "''${HOME}/Applications/Home Manager Apps/WezTerm.app" - # restart yabai - cmd + alt - r : brew services restart yabai + skhdConfig = + let + mapKeymaps = + cmd: + builtins.concatStringsSep "\n" ( + map (i: builtins.replaceStrings [ "Num" ] [ (toString (if (i == 10) then 0 else i)) ] cmd) ( + lib.range 1 10 + ) + ); + in + '' + #!/usr/bin/env sh + # focus window + cmd + ctrl - h : yabai -m window --focus west + cmd + ctrl - j : yabai -m window --focus south + cmd + ctrl - k : yabai -m window --focus north + cmd + ctrl - l : yabai -m window --focus east + # move window + cmd + shift - h : yabai -m window --warp west + cmd + shift - j : yabai -m window --warp south + cmd + shift - k : yabai -m window --warp north + cmd + shift - l : yabai -m window --warp east + # toggle sticky/floating + cmd + shift - s: yabai -m window --toggle sticky --toggle float --toggle topmost + cmd + shift - d: yabai -m window --toggle float + # rotate + cmd + ctrl - e : yabai -m space --balance + cmd + ctrl - r : yabai -m space --rotate 270 + # open terminal + cmd + shift - return : open -na "''${HOME}/Applications/Home Manager Apps/WezTerm.app" + # restart yabai + cmd + alt - r : brew services restart yabai - # ONLY WORKS WITH SIP DISABLED: - # fast focus space left/right - ctrl - left : yabai -m space --focus prev - ctrl - right : yabai -m space --focus next - # switch to space - ${mapKeymaps "cmd + ctrl - Num : yabai -m space --focus Num"} - # send window to desktop, follow focus, and move out of scratchpad - ${mapKeymaps "cmd + shift - Num : yabai -m window --space Num; yabai -m space --focus Num; yabai -m window --scratchpad ''"} + # ONLY WORKS WITH SIP DISABLED: + # fast focus space left/right + ctrl - left : yabai -m space --focus prev + ctrl - right : yabai -m space --focus next + # switch to space + ${mapKeymaps "cmd + ctrl - Num : yabai -m space --focus Num"} + # send window to desktop, follow focus, and move out of scratchpad + ${mapKeymaps "cmd + shift - Num : yabai -m window --space Num; yabai -m space --focus Num; yabai -m window --scratchpad ''"} - cmd - tab : yabai -m window --toggle main - cmd + shift - tab : yabai -m window --scratchpad main - ''; + cmd - tab : yabai -m window --toggle main + cmd + shift - tab : yabai -m window --scratchpad main + ''; }; }; } diff --git a/machines/common/darwin/options.nix b/machines/common/darwin/options.nix index 7b08a6a..24766be 100644 --- a/machines/common/darwin/options.nix +++ b/machines/common/darwin/options.nix @@ -1,8 +1,10 @@ -{lib, ...}: let +{ lib, ... }: +let inherit (lib) mkOption types; -in { +in +{ options.location = { - latitude = mkOption {type = types.nullOr types.float;}; - longitude = mkOption {type = types.nullOr types.float;}; + latitude = mkOption { type = types.nullOr types.float; }; + longitude = mkOption { type = types.nullOr types.float; }; }; } diff --git a/machines/common/linux/boot.nix b/machines/common/linux/boot.nix index b274df8..51413a9 100644 --- a/machines/common/linux/boot.nix +++ b/machines/common/linux/boot.nix @@ -4,7 +4,7 @@ loader.systemd-boot.enable = true; initrd.systemd.enable = true; - supportedFilesystems = ["ntfs"]; + supportedFilesystems = [ "ntfs" ]; plymouth.enable = true; }; diff --git a/machines/common/linux/default.nix b/machines/common/linux/default.nix index 6c0f1f8..7af8fc9 100644 --- a/machines/common/linux/default.nix +++ b/machines/common/linux/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./boot.nix ./gnome.nix @@ -38,7 +39,7 @@ programs.nix-ld.enable = true; programs.zsh.enable = true; - environment.systemPackages = [pkgs.xdg-utils]; + environment.systemPackages = [ pkgs.xdg-utils ]; # enable yubikey u2f support security.pam.u2f = { diff --git a/machines/common/linux/gnome.nix b/machines/common/linux/gnome.nix index 4ec2dd3..9736b43 100644 --- a/machines/common/linux/gnome.nix +++ b/machines/common/linux/gnome.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ config = lib.mkIf (config.dotfiles.desktop == "gnome") { services.xserver = { enable = true; @@ -11,7 +12,7 @@ desktopManager.gnome.enable = true; }; - environment.systemPackages = with pkgs; [gnomeExtensions.appindicator]; + environment.systemPackages = with pkgs; [ gnomeExtensions.appindicator ]; hardware.pulseaudio.enable = false; diff --git a/machines/common/linux/greeter.nix b/machines/common/linux/greeter.nix index d6f94b6..ad750dd 100644 --- a/machines/common/linux/greeter.nix +++ b/machines/common/linux/greeter.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ config = lib.mkIf (config.dotfiles.desktop == "sway") { services.greetd = { enable = true; @@ -27,13 +28,13 @@ # start a keyring daemon for sway systemd = { - packages = [pkgs.polkit_gnome]; + packages = [ pkgs.polkit_gnome ]; user.services.polkit-gnome-authentication-agent-1 = { unitConfig = { Description = "polkit-gnome-authentication-agent-1"; - Wants = ["graphical-session.target"]; - WantedBy = ["graphical-session.target"]; - After = ["graphical-session.target"]; + Wants = [ "graphical-session.target" ]; + WantedBy = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; }; serviceConfig = { Type = "simple"; diff --git a/machines/common/linux/input.nix b/machines/common/linux/input.nix index 31cff5f..9a0ee15 100644 --- a/machines/common/linux/input.nix +++ b/machines/common/linux/input.nix @@ -1,10 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ hardware.keyboard.qmk.enable = true; - services.udev.packages = [pkgs.uhk-udev-rules]; + services.udev.packages = [ pkgs.uhk-udev-rules ]; services.kanata = { enable = true; keyboards.keychron-k6 = { - devices = ["/dev/input/by-id/usb-Keychron_Keychron_K6-event-kbd"]; + devices = [ "/dev/input/by-id/usb-Keychron_Keychron_K6-event-kbd" ]; config = '' (defsrc esc 1 2 3 4 5 6 7 8 9 0 - = bspc diff --git a/machines/common/linux/network.nix b/machines/common/linux/network.nix index 1150e15..701e340 100644 --- a/machines/common/linux/network.nix +++ b/machines/common/linux/network.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ services = { dnsmasq = { enable = true; @@ -26,25 +27,23 @@ }; stubby = { enable = true; - settings = - pkgs.stubby.passthru.settingsExample - // { - resolution_type = "GETDNS_RESOLUTION_STUB"; - listen_addresses = [ - "127.0.0.1@53000" - "0::1@53000" - ]; - upstream_recursive_servers = [ - { - address_data = "146.255.56.98"; - tls_auth_name = "dot1.applied-privacy.net"; - } - { - address_data = "2a01:4f8:c0c:83ed::1"; - tls_auth_name = "dot1.applied-privacy.net"; - } - ]; - }; + settings = pkgs.stubby.passthru.settingsExample // { + resolution_type = "GETDNS_RESOLUTION_STUB"; + listen_addresses = [ + "127.0.0.1@53000" + "0::1@53000" + ]; + upstream_recursive_servers = [ + { + address_data = "146.255.56.98"; + tls_auth_name = "dot1.applied-privacy.net"; + } + { + address_data = "2a01:4f8:c0c:83ed::1"; + tls_auth_name = "dot1.applied-privacy.net"; + } + ]; + }; }; }; } diff --git a/machines/common/linux/podman.nix b/machines/common/linux/podman.nix index 59790c1..0d65cf8 100644 --- a/machines/common/linux/podman.nix +++ b/machines/common/linux/podman.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ virtualisation.podman = { enable = true; extraPackages = with pkgs; [ diff --git a/machines/common/linux/sound.nix b/machines/common/linux/sound.nix index 08c3143..d115ba6 100644 --- a/machines/common/linux/sound.nix +++ b/machines/common/linux/sound.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ programs.noisetorch.enable = config.isGraphical; security.rtkit.enable = true; services = { diff --git a/machines/common/linux/sway.nix b/machines/common/linux/sway.nix index ff0e661..ce1911c 100644 --- a/machines/common/linux/sway.nix +++ b/machines/common/linux/sway.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ config = lib.mkIf (config.dotfiles.desktop == "sway") { environment.systemPackages = with pkgs; [ # file management @@ -22,7 +23,7 @@ ]; programs.dconf.enable = true; - environment.pathsToLink = ["/share/nautilus-python/extensions"]; + environment.pathsToLink = [ "/share/nautilus-python/extensions" ]; environment.sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-4"; programs.hyprland.enable = true; diff --git a/machines/common/linux/traefik.nix b/machines/common/linux/traefik.nix index c7dc21c..3fcafde 100644 --- a/machines/common/linux/traefik.nix +++ b/machines/common/linux/traefik.nix @@ -40,7 +40,10 @@ keyFile = builtins.toString ../certs/local.key; }; http.routers.traefik = { - entryPoints = ["http" "https"]; + entryPoints = [ + "http" + "https" + ]; rule = "Host(`traefik.this.test`)"; tls = true; service = "api@internal"; diff --git a/machines/common/shared/nix.nix b/machines/common/shared/nix.nix index 1237ad5..c62d055 100644 --- a/machines/common/shared/nix.nix +++ b/machines/common/shared/nix.nix @@ -3,41 +3,42 @@ inputs, pkgs, ... -}: let +}: +let inherit (builtins) attrValues mapAttrs; inherit (lib) filterAttrs; inherit (pkgs.stdenv) isDarwin isLinux; flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs; -in { +in +{ nixpkgs.config.allowUnfree = true; nix = { gc.automatic = true; package = pkgs.nixVersions.nix_2_22; - settings = - { - # breaks the Nix Store on macOS - # https://github.com/NixOS/nix/issues/7273 - auto-optimise-store = isLinux; - experimental-features = [ - "auto-allocate-uids" - "flakes" - "nix-command" - ]; - trusted-users = [ - "@sudo" - "@wheel" - "winston" - ]; - use-xdg-base-directories = true; - warn-dirty = false; - } - // (import ../../../flake.nix).nixConfig; - registry = mapAttrs (name: v: {flake = v;}) flakeInputs; + settings = { + # breaks the Nix Store on macOS + # https://github.com/NixOS/nix/issues/7273 + auto-optimise-store = isLinux; + experimental-features = [ + "auto-allocate-uids" + "flakes" + "nix-command" + ]; + trusted-users = [ + "@sudo" + "@wheel" + "winston" + ]; + use-xdg-base-directories = true; + warn-dirty = false; + } // (import ../../../flake.nix).nixConfig; + registry = mapAttrs (name: v: { flake = v; }) flakeInputs; nixPath = - if isDarwin - then lib.mkForce (mapAttrs (k: v: v.outPath) flakeInputs) - else if isLinux - then attrValues (mapAttrs (k: v: "${k}=${v.outPath}") flakeInputs) - else throw "Unsupported platform"; + if isDarwin then + lib.mkForce (mapAttrs (k: v: v.outPath) flakeInputs) + else if isLinux then + attrValues (mapAttrs (k: v: "${k}=${v.outPath}") flakeInputs) + else + throw "Unsupported platform"; }; } diff --git a/machines/common/shared/user.nix b/machines/common/shared/user.nix index 3b0dd63..69cc031 100644 --- a/machines/common/shared/user.nix +++ b/machines/common/shared/user.nix @@ -3,26 +3,32 @@ lib, pkgs, ... -}: let +}: +let homeRoot = - if pkgs.stdenv.isDarwin - then "/Users" - else if pkgs.stdenv.isLinux - then "/home" - else throw "Unsupported OS"; -in { + if pkgs.stdenv.isDarwin then + "/Users" + else if pkgs.stdenv.isLinux then + "/home" + else + throw "Unsupported OS"; +in +{ users.users."${config.dotfiles.username}" = { home = "${homeRoot}/${config.dotfiles.username}"; - openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh" + ]; shell = pkgs.zsh; } // ( - if pkgs.stdenv.isLinux - then { - isNormalUser = lib.mkIf pkgs.stdenv.isLinux true; - extraGroups = ["wheel"]; - } - else {} + if pkgs.stdenv.isLinux then + { + isNormalUser = lib.mkIf pkgs.stdenv.isLinux true; + extraGroups = [ "wheel" ]; + } + else + { } ); } diff --git a/machines/common/wsl/default.nix b/machines/common/wsl/default.nix index 5d492bd..c75b880 100644 --- a/machines/common/wsl/default.nix +++ b/machines/common/wsl/default.nix @@ -1,10 +1,8 @@ -{ - lib, - pkgs, - ... -}: let +{ lib, pkgs, ... }: +let inherit (lib) mkForce; -in { +in +{ services = { kanata.enable = mkForce false; dnsmasq.enable = mkForce false; diff --git a/machines/futomaki/default.nix b/machines/futomaki/default.nix index 95e4ae6..0c2e9e2 100644 --- a/machines/futomaki/default.nix +++ b/machines/futomaki/default.nix @@ -1,9 +1,6 @@ +{ config, pkgs, ... }: { - config, - pkgs, - ... -}: { - imports = [./hardware.nix]; + imports = [ ./hardware.nix ]; dotfiles.desktop = "sway"; @@ -30,7 +27,10 @@ virtualisation.podman.enable = true; virtualisation.libvirtd.enable = true; - users.users."${config.dotfiles.username}".extraGroups = ["libvirtd" "transmission"]; + users.users."${config.dotfiles.username}".extraGroups = [ + "libvirtd" + "transmission" + ]; environment.systemPackages = with pkgs; [ cabextract @@ -56,8 +56,8 @@ enable = true; package = pkgs.steam.override { extraEnv.MANGOHUD = 1; - extraPkgs = p: - with p; [ + extraPkgs = + p: with p; [ corefonts protontricks gamescope diff --git a/machines/futomaki/hardware.nix b/machines/futomaki/hardware.nix index 13148f8..529da8d 100644 --- a/machines/futomaki/hardware.nix +++ b/machines/futomaki/hardware.nix @@ -4,22 +4,33 @@ pkgs, modulesPath, ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; +}: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { - initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; - initrd.kernelModules = ["dm-snapshot"]; + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "sd_mod" + ]; + initrd.kernelModules = [ "dm-snapshot" ]; kernelPackages = pkgs.linuxPackages_latest; - kernelModules = ["kvm-amd" "v4l2loopback"]; - kernelParams = ["quiet" "splash"]; + kernelModules = [ + "kvm-amd" + "v4l2loopback" + ]; + kernelParams = [ + "quiet" + "splash" + ]; }; # Intel Arc A770 environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD"; - boot.extraModulePackages = [config.boot.kernelPackages.v4l2loopback]; + boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; hardware.opengl = { enable = true; driSupport32Bit = true; diff --git a/machines/lib.nix b/machines/lib.nix index f1cee3d..f4fb77c 100644 --- a/machines/lib.nix +++ b/machines/lib.nix @@ -1,55 +1,59 @@ -{ - inputs, - overlays, -}: rec { - hmCommonConfig = {username}: ({ - config, - pkgs, - ... - }: let - homeLib = import ../home/lib.nix {inherit inputs username pkgs;}; - in { - config = { - nixpkgs = { - overlays = overlays; - config.permittedInsecurePackages = []; - }; - home-manager = { - backupFileExtension = "backup"; - extraSpecialArgs = homeLib.extraSpecialArgs; - sharedModules = homeLib.modules; - useGlobalPkgs = true; - useUserPackages = true; - users.${username}.imports = [../home]; - }; - }; - }); +{ inputs, overlays }: +rec { + hmCommonConfig = + { username }: + ( + { config, pkgs, ... }: + let + homeLib = import ../home/lib.nix { inherit inputs username pkgs; }; + in + { + config = { + nixpkgs = { + overlays = overlays; + config.permittedInsecurePackages = [ ]; + }; + home-manager = { + backupFileExtension = "backup"; + extraSpecialArgs = homeLib.extraSpecialArgs; + sharedModules = homeLib.modules; + useGlobalPkgs = true; + useUserPackages = true; + users.${username}.imports = [ ../home ]; + }; + }; + } + ); - mkSystem = { - host, - system, - username, - isGraphical ? false, - extraModules ? [], - }: let - ldTernary = l: d: - if pkgs.stdenv.isLinux - then l - else if pkgs.stdenv.isDarwin - then d - else throw "Unsupported system"; - target = ldTernary "nixosConfigurations" "darwinConfigurations"; - builder = with inputs; ldTernary nixpkgs.lib.nixosSystem darwin.lib.darwinSystem; - module = ldTernary "nixosModules" "darwinModules"; - hostPlatform = ldTernary "linux" "darwin"; + mkSystem = + { + host, + system, + username, + isGraphical ? false, + extraModules ? [ ], + }: + let + ldTernary = + l: d: + if pkgs.stdenv.isLinux then + l + else if pkgs.stdenv.isDarwin then + d + else + throw "Unsupported system"; + target = ldTernary "nixosConfigurations" "darwinConfigurations"; + builder = with inputs; ldTernary nixpkgs.lib.nixosSystem darwin.lib.darwinSystem; + module = ldTernary "nixosModules" "darwinModules"; + hostPlatform = ldTernary "linux" "darwin"; - pkgs = inputs.nixpkgs.legacyPackages.${system}; - inherit (pkgs.lib) mkOption types; - in { - ${target}."${host}" = builder { - inherit system; - modules = - [ + pkgs = inputs.nixpkgs.legacyPackages.${system}; + inherit (pkgs.lib) mkOption types; + in + { + ${target}."${host}" = builder { + inherit system; + modules = [ { options = { dotfiles = { @@ -59,7 +63,12 @@ description = "The username of the user"; }; desktop = mkOption { - type = types.nullOr (types.enum ["gnome" "sway"]); + type = types.nullOr ( + types.enum [ + "gnome" + "sway" + ] + ); default = "sway"; description = "The desktop environment to use"; }; @@ -77,12 +86,12 @@ ./common/${hostPlatform} ./${host} inputs.home-manager.${module}.home-manager - ] - ++ [(hmCommonConfig {inherit username;})] - ++ extraModules; - specialArgs = {inherit inputs;}; + ] ++ [ (hmCommonConfig { inherit username; }) ] ++ extraModules; + specialArgs = { + inherit inputs; + }; + }; }; - }; mkSystems = systems: inputs.nixpkgs.lib.mkMerge (map mkSystem systems); } diff --git a/machines/sashimi/brew.nix b/machines/sashimi/brew.nix index 62da578..3c5fe2e 100644 --- a/machines/sashimi/brew.nix +++ b/machines/sashimi/brew.nix @@ -1,4 +1,5 @@ -{config, ...}: let +{ config, ... }: +let noQuarantine = name: { inherit name; args.no_quarantine = true; @@ -7,9 +8,10 @@ inherit name; args.require_sha = false; }; -in { +in +{ # make brew available in PATH - environment.systemPath = [config.homebrew.brewPrefix]; + environment.systemPath = [ config.homebrew.brewPrefix ]; homebrew = { enable = true; @@ -50,6 +52,6 @@ in { autoUpdate = true; upgrade = true; }; - taps = ["homebrew/cask"]; + taps = [ "homebrew/cask" ]; }; } diff --git a/machines/sashimi/default.nix b/machines/sashimi/default.nix index 9ebcb68..88d6fd4 100644 --- a/machines/sashimi/default.nix +++ b/machines/sashimi/default.nix @@ -1,5 +1,5 @@ { - imports = [./brew.nix]; + imports = [ ./brew.nix ]; nix.settings.extra-platforms = [ "aarch64-darwin" diff --git a/machines/yuba/default.nix b/machines/yuba/default.nix index 2caac72..a28306a 100644 --- a/machines/yuba/default.nix +++ b/machines/yuba/default.nix @@ -1,5 +1,5 @@ { - imports = [../common/wsl]; + imports = [ ../common/wsl ]; i18n.defaultLocale = "en_US.UTF-8"; location = { diff --git a/pkgs/apple-music.nix b/pkgs/apple-music.nix index 16bf875..83d8369 100644 --- a/pkgs/apple-music.nix +++ b/pkgs/apple-music.nix @@ -7,15 +7,16 @@ symlinkJoin, writeScriptBin, # command line arguments which are always set e.g "--disable-gpu" - commandLineArgs ? [], -}: let + commandLineArgs ? [ ], +}: +let name = "apple-music-via-google-chrome"; meta = { description = "Open Apple Music in Google Chrome app mode"; homepage = google-chrome.meta.homepage or null; license = lib.licenses.unfree; - maintainers = [lib.maintainers.roberth]; + maintainers = [ lib.maintainers.roberth ]; platforms = google-chrome.meta.platforms or lib.platforms.all; }; @@ -30,7 +31,7 @@ }; desktopName = "Apple Music via Google Chrome"; genericName = "Music streaming service"; - categories = ["AudioVideo"]; + categories = [ "AudioVideo" ]; startupNotify = true; }; @@ -44,7 +45,10 @@ "$@" ''; in - symlinkJoin { - inherit name meta; - paths = [script desktopItem]; - } +symlinkJoin { + inherit name meta; + paths = [ + script + desktopItem + ]; +} diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix index fc35e21..e17883a 100644 --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -1,28 +1,33 @@ -{inputs}: [ +{ inputs }: +[ inputs.catppuccin-toolbox.overlays.default inputs.catppuccin-vsc.overlays.default inputs.nix-vscode-extensions.overlays.default - (final: prev: let - srcs = prev.callPackages ../_sources/generated.nix {}; - in { - inherit (inputs.swayfx.packages.${prev.system}) swayfx-unwrapped; - starship = prev.starship.overrideAttrs (old: { - patches = [ - (prev.fetchpatch { - url = "https://github.com/starship/starship/pull/4439.patch"; - sha256 = "sha256-BKH3elz96Oa424Oz5UIKA2/BOpkym1LTestvccFinnc="; - }) - ]; - }); - yabai = prev.yabai.overrideAttrs (_: { - inherit (srcs.yabai) version src; - }); - nur = import inputs.nur { - nurpkgs = prev; - pkgs = prev; - repoOverrides = { - nekowinston = inputs.nekowinston-nur.packages.${prev.stdenv.system}; + ( + final: prev: + let + srcs = prev.callPackages ../_sources/generated.nix { }; + in + { + inherit (inputs.swayfx.packages.${prev.system}) swayfx-unwrapped; + starship = prev.starship.overrideAttrs (old: { + patches = [ + (prev.fetchpatch { + url = "https://github.com/starship/starship/pull/4439.patch"; + sha256 = "sha256-BKH3elz96Oa424Oz5UIKA2/BOpkym1LTestvccFinnc="; + }) + ]; + }); + yabai = prev.yabai.overrideAttrs (_: { + inherit (srcs.yabai) version src; + }); + nur = import inputs.nur { + nurpkgs = prev; + pkgs = prev; + repoOverrides = { + nekowinston = inputs.nekowinston-nur.packages.${prev.stdenv.system}; + }; }; - }; - }) + } + ) ]