From ce784026b8c6753ab1d4a404af402fe56cd625fc Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 2 Mar 2024 03:13:17 +0000 Subject: [PATCH] reformat with nixfmt-rfc-style --- flake.lock | 50 +-- flake.nix | 52 ++- home/fish.nix | 8 +- home/git.nix | 13 +- home/gpg.nix | 3 +- home/gtk.nix | 8 +- home/mpv.nix | 11 +- home/sway.nix | 110 +++--- home/terminals.nix | 38 +- home/tmux.nix | 17 +- home/use-xdg.nix | 3 +- sets/1password.nix | 4 +- sets/aarch64-zboot.nix | 34 +- sets/base.nix | 47 ++- sets/buildMachines.nix | 26 +- sets/disc.nix | 5 +- sets/documentation.nix | 3 +- sets/firefox.nix | 17 +- sets/fonts.nix | 11 +- sets/fpga.nix | 3 +- sets/hacking.nix | 5 +- sets/hardware.nix | 8 +- sets/ime.nix | 15 +- sets/laptop.nix | 3 +- sets/nix-index.nix | 3 +- sets/nixvim.nix | 8 +- sets/nvim.nix | 337 +++++++++--------- sets/packages.nix | 241 +++++++------ sets/pipewire.nix | 6 +- sets/radio.nix | 5 +- sets/swap.nix | 3 +- sets/sway.nix | 13 +- sets/tpm.nix | 3 +- sets/virtualization.nix | 23 +- sets/wifi.nix | 3 +- sets/workstation.nix | 7 +- system/gallus/boot-config.nix | 3 +- system/gallus/default.nix | 7 +- system/gallus/hardware-configuration.nix | 14 +- system/mistmane/default.nix | 7 +- system/mistmane/hardware-configuration.nix | 11 +- system/rainbowdash/default.nix | 18 +- system/rainbowdash/hardware-configuration.nix | 23 +- system/smolder/boot-config.nix | 3 +- system/smolder/default.nix | 1 - system/smolder/hardware-configuration.nix | 11 +- system/spike/boot-config.nix | 20 +- system/spike/hardware-configuration.nix | 22 +- system/starlight/boot-config.nix | 8 +- system/starlight/default.nix | 50 ++- system/starlight/hardware-configuration.nix | 22 +- system/starlight/scripts.nix | 3 +- 52 files changed, 806 insertions(+), 563 deletions(-) diff --git a/flake.lock b/flake.lock index d43a650..208a5ad 100644 --- a/flake.lock +++ b/flake.lock @@ -239,11 +239,11 @@ ] }, "locked": { - "lastModified": 1708591310, - "narHash": "sha256-8mQGVs8JccWTnORgoLOTh9zvf6Np+x2JzhIc+LDcJ9s=", + "lastModified": 1709204054, + "narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e0e9669547e45ea6cca2de4044c1a384fd0fe55", + "rev": "2f3367769a93b226c467551315e9e270c3f78b15", "type": "github" }, "original": { @@ -260,11 +260,11 @@ ] }, "locked": { - "lastModified": 1708585220, - "narHash": "sha256-eQ5nGEEW4I8Btwso6Q940xilYG7QNyTuocfB0awjpA8=", + "lastModified": 1709295149, + "narHash": "sha256-+blV8vKyvh3gYnUFYTOu2yuWxEEBqwS7hfLm6qdpoe4=", "owner": "jovian-experiments", "repo": "jovian-nixos", - "rev": "2654de9ed084890d1814a841c4f863e9d7a44d54", + "rev": "0ef51034dcc8b65b8be72eedd0d5db7d426ea054", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1708225687, - "narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=", + "lastModified": 1708830466, + "narHash": "sha256-nGKe3Y1/jkLR2eh1aRSVBtKadMBNv8kOnB52UXqRy6A=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127", + "rev": "f070c7eeec3bde8c8c8baa9c02b6d3d5e114d73b", "type": "github" }, "original": { @@ -324,11 +324,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1708594753, - "narHash": "sha256-c/gH7iXS/IYH9NrFOT+aJqTq+iEBkvAkpWuUHGU3+f0=", + "lastModified": 1709147990, + "narHash": "sha256-vpXMWoaCtMYJ7lisJedCRhQG9BSsInEyZnnG5GfY9tQ=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958", + "rev": "33a97b5814d36ddd65ad678ad07ce43b1a67f159", "type": "github" }, "original": { @@ -339,11 +339,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1708655239, - "narHash": "sha256-ZrP/yACUvDB+zbqYJsln4iwotbH6CTZiTkANJ0AgDv4=", + "lastModified": 1709237383, + "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cbc4211f0afffe6dfd2478a62615dd5175a13f9a", + "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", "type": "github" }, "original": { @@ -383,11 +383,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1708614940, - "narHash": "sha256-36muWApzetaV4WAEeqKsWxW4k2l0u3E841RI4sHPiz0=", + "lastModified": 1709303299, + "narHash": "sha256-sBMl8/pvsuRHOre2wu3du9eQmk5K8rGHi/+noz4c3lg=", "owner": "nix-community", "repo": "nixvim", - "rev": "060a05138ca1a46fc0a0f79ef27f080cac57a59e", + "rev": "ec687c5adefed06a70c91c002fcbcbcd2cb40005", "type": "github" }, "original": { @@ -457,11 +457,11 @@ }, "private": { "locked": { - "lastModified": 1708040288, - "narHash": "sha256-xJY8FztA02HSaFxYuuaBmwVw54zTjqY4Old0QDzeQIc=", + "lastModified": 1709351173, + "narHash": "sha256-6Xw6654Sj9LQ3gYhFox/ab8pSVF1jleygb7T6ZlXjHU=", "ref": "unified", - "rev": "6f1245d222b56427cae3073df28bd0ff9a4d6d87", - "revCount": 41, + "rev": "14ff812b8ebc6e4573ff2954c515f909b03ccf7f", + "revCount": 44, "type": "git", "url": "ssh://forgejo@git.mildlyfunctional.gay/artemist/nixos-config-private" }, @@ -570,11 +570,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e9461d5..e936c65 100644 --- a/flake.nix +++ b/flake.nix @@ -34,8 +34,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; rustybar = { - url = - "git+https://git.mildlyfunctional.gay/mildlyfunctionalgays/rustybar.git"; + url = "git+https://git.mildlyfunctional.gay/mildlyfunctionalgays/rustybar.git"; inputs.nixpkgs.follows = "nixpkgs"; inputs.utils.follows = "utils"; }; @@ -45,39 +44,56 @@ inputs.nix-github-actions.follows = ""; }; - private.url = - "git+ssh://forgejo@git.mildlyfunctional.gay/artemist/nixos-config-private?ref=unified"; + private.url = "git+ssh://forgejo@git.mildlyfunctional.gay/artemist/nixos-config-private?ref=unified"; }; - outputs = { self, nixpkgs, home-manager, utils, nixvim, ... }@inputs: + outputs = + { + self, + nixpkgs, + home-manager, + utils, + nixvim, + ... + }@inputs: let baseDir = ./system; lib = nixpkgs.lib; - makeSystem = module: + makeSystem = + module: lib.nixosSystem (rec { - specialArgs = { inherit inputs; }; + specialArgs = { + inherit inputs; + }; modules = [ home-manager.nixosModules.home-manager { home-manager.extraSpecialArgs = specialArgs; } ] ++ [ module ]; }); - in { - nixosConfigurations = - lib.mapAttrs (name: _: makeSystem (baseDir + "/${name}")) - (builtins.readDir baseDir); - } // utils.lib.eachDefaultSystem (system: - let pkgs = import nixpkgs { inherit system; }; - in { - formatter = pkgs.nixfmt; + in + { + nixosConfigurations = lib.mapAttrs (name: _: makeSystem (baseDir + "/${name}")) ( + builtins.readDir baseDir + ); + } + // utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + formatter = pkgs.nixfmt-rfc-style; packages = { nvim = inputs.nixvim.legacyPackages."${system}".makeNixvimWithModule { - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { + inherit inputs; + }; module = import ./sets/nvim.nix { path = [ ]; inherit (pkgs) lib; }; }; }; - }); + } + ); } - diff --git a/home/fish.nix b/home/fish.nix index 0685c25..8e0bc65 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.fish = { enable = true; interactiveShellInit = "set -g -x GPG_TTY (tty)"; @@ -9,5 +10,8 @@ nix-fish = "nix-shell --command fish"; }; }; - home.packages = with pkgs; [ bat eza ]; + home.packages = with pkgs; [ + bat + eza + ]; } diff --git a/home/git.nix b/home/git.nix index 7dd4ce3..8a65153 100644 --- a/home/git.nix +++ b/home/git.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; @@ -8,7 +9,12 @@ key = "D2173817C3E4B155EA8FFF49A54531E0D32143ED"; signByDefault = true; }; - ignores = [ "compile_commands.json" ".clangd/" ".idea/" ".config/clangd" ]; + ignores = [ + "compile_commands.json" + ".clangd/" + ".idea/" + ".config/clangd" + ]; lfs.enable = true; delta.enable = true; extraConfig = { @@ -19,8 +25,7 @@ init.defaultBranch = "canon"; log.showSignature = true; - credential.helper = - "!${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper $@"; + credential.helper = "!${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper $@"; sendemail = { smtpServer = "smtp.fastmail.com"; smtpUser = "me@artem.ist"; diff --git a/home/gpg.nix b/home/gpg.nix index 3db0ecf..1dc1823 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -1,4 +1,5 @@ -{ config, ... }: { +{ config, ... }: +{ services.gpg-agent = { enable = true; enableExtraSocket = true; diff --git a/home/gtk.nix b/home/gtk.nix index 08317ae..0a5a1c6 100644 --- a/home/gtk.nix +++ b/home/gtk.nix @@ -1,6 +1,10 @@ { ... }: -let common-gtk = { gtk-application-prefer-dark-theme = true; }; -in { +let + common-gtk = { + gtk-application-prefer-dark-theme = true; + }; +in +{ home.sessionVariables.GTK_THEME = "Adwaita:dark"; gtk = { enable = true; diff --git a/home/mpv.nix b/home/mpv.nix index a0369a4..2b5d30e 100644 --- a/home/mpv.nix +++ b/home/mpv.nix @@ -2,11 +2,9 @@ let ffmpeg = pkgs.ffmpeg-full; scripts = with pkgs.mpvScripts; [ sponsorblock ]; - mpv = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { inherit ffmpeg; }) { - inherit scripts; - }; - -in { + mpv = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { inherit ffmpeg; }) { inherit scripts; }; +in +{ home.packages = [ ffmpeg ]; programs.mpv = { enable = true; @@ -21,8 +19,7 @@ in { audio-normalize-downmix = "yes"; replaygain = "track"; - script-opts-set = - "sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]"; + script-opts-set = "sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]"; }; # Don't make this profile default since not all machines can handle it profiles.gpu-hq = { diff --git a/home/sway.nix b/home/sway.nix index 0d558f1..80a2857 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, config, inputs, ... }: +{ + pkgs, + lib, + config, + inputs, + ... +}: let rustybar = inputs.rustybar.defaultPackage."${pkgs.system}"; cfg = config.wayland.windowManager.sway; @@ -18,15 +24,22 @@ let F11 = "21"; F12 = "22"; }; - extraGotoBindings = lib.mapAttrs' (name: value: { - name = "${mod}+${name}"; - value = "workspace ${value}"; - }) extraWorkspaces; - extraMoveBindings = lib.mapAttrs' (name: value: { - name = "${mod}+Shift+${name}"; - value = "move container to workspace ${value}"; - }) extraWorkspaces; -in { + extraGotoBindings = + lib.mapAttrs' + (name: value: { + name = "${mod}+${name}"; + value = "workspace ${value}"; + }) + extraWorkspaces; + extraMoveBindings = + lib.mapAttrs' + (name: value: { + name = "${mod}+Shift+${name}"; + value = "move container to workspace ${value}"; + }) + extraWorkspaces; +in +{ home.sessionVariables = { MOZ_USE_XINPUT2 = 1; _JAVA_AWT_WM_NONREPARENTING = 1; @@ -60,8 +73,7 @@ in { always = true; } { - command = - "swayidle -w before-sleep 'swaylock -f' timeout 600 'swaylock -f' timeout 660 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; + command = "swayidle -w before-sleep 'swaylock -f' timeout 600 'swaylock -f' timeout 660 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; } ]; @@ -70,46 +82,50 @@ in { down = "Mod1+Down"; up = "Mod1+Up"; right = "Mod1+Right"; - keybindings = lib.mkOptionDefault ({ - "${mod}+Shift+d" = "exec wofi -I -i -S drun"; - "${mod}+j" = "move workspace to left"; - "${mod}+k" = "move workspace to right"; - "${mod}+l" = "exec swaylock"; - "${mod}+Mod1+e" = "exec wofi-emoji"; - # Sink 0 means the default AIUI - "XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%"; - "Shift+XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +1%"; - "XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -5%"; - "Shift+XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -1%"; - "XF86AudioMute" = "exec pactl set-sink-mute 0 toggle"; - "XF86MonBrightnessUp" = "exec light -A 5"; - "Shift+XF86MonBrightnessUp" = "exec light -A 1"; - "XF86MonBrightnessDown" = "exec light -U 5"; - "Shift+XF86MonBrightnessDown" = "exec light -U 1"; - "Print" = '' - exec grim "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; - "Shift+Print" = '' - exec grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; - } // extraGotoBindings // extraMoveBindings); + keybindings = lib.mkOptionDefault ( + { + "${mod}+Shift+d" = "exec wofi -I -i -S drun"; + "${mod}+j" = "move workspace to left"; + "${mod}+k" = "move workspace to right"; + "${mod}+l" = "exec swaylock"; + "${mod}+Mod1+e" = "exec wofi-emoji"; + # Sink 0 means the default AIUI + "XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%"; + "Shift+XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +1%"; + "XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -5%"; + "Shift+XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -1%"; + "XF86AudioMute" = "exec pactl set-sink-mute 0 toggle"; + "XF86MonBrightnessUp" = "exec light -A 5"; + "Shift+XF86MonBrightnessUp" = "exec light -A 1"; + "XF86MonBrightnessDown" = "exec light -U 5"; + "Shift+XF86MonBrightnessDown" = "exec light -U 1"; + "Print" = ''exec grim "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; + "Shift+Print" = ''exec grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; + } + // extraGotoBindings + // extraMoveBindings + ); floating.titlebar = true; window.titlebar = true; - bars = [{ - statusCommand = "${rustybar}/bin/rustybar"; - position = "top"; - fonts = cfg.config.fonts; - colors = { - background = "#000000d0"; - statusline = "#ffffff"; - separator = "#aaaaaa"; - inactiveWorkspace = { - border = "#000000d0"; - background = "#323232d0"; - text = "#ffffffd0"; + bars = [ + { + statusCommand = "${rustybar}/bin/rustybar"; + position = "top"; + fonts = cfg.config.fonts; + colors = { + background = "#000000d0"; + statusline = "#ffffff"; + separator = "#aaaaaa"; + inactiveWorkspace = { + border = "#000000d0"; + background = "#323232d0"; + text = "#ffffffd0"; + }; }; - }; - }]; + } + ]; }; }; } diff --git a/home/terminals.nix b/home/terminals.nix index 04466f3..431bfd1 100644 --- a/home/terminals.nix +++ b/home/terminals.nix @@ -34,26 +34,39 @@ let "ffffff" ]; }; - colorNames = - [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; - namedColors = prefix: colors: - listToAttrs - (zipListsWith nameValuePair colorNames (map (c: prefix + c) colors)); - numberedColors = attrPrefix: valuePrefix: attrOffset: colors: - listToAttrs (zipListsWith nameValuePair - (map (i: attrPrefix + toString (i + attrOffset)) (range 0 7)) - (map (c: valuePrefix + c) colors)); + colorNames = [ + "black" + "red" + "green" + "yellow" + "blue" + "magenta" + "cyan" + "white" + ]; + namedColors = + prefix: colors: listToAttrs (zipListsWith nameValuePair colorNames (map (c: prefix + c) colors)); + numberedColors = + attrPrefix: valuePrefix: attrOffset: colors: + listToAttrs ( + zipListsWith nameValuePair (map (i: attrPrefix + toString (i + attrOffset)) (range 0 7)) ( + map (c: valuePrefix + c) colors + ) + ); font = { name = "Fira Code"; size = 9; }; -in { +in +{ # Not used on most systems programs.foot = { settings = { main.font = "${font.name}:size=${toString font.size}"; - colors = colors.primary // (numberedColors "regular" "" 0 colors.normal) + colors = + colors.primary + // (numberedColors "regular" "" 0 colors.normal) // (numberedColors "bright" "" 0 colors.bright); }; }; @@ -86,8 +99,7 @@ in { clipboard_control = false; scrollback_lines = 32768; touch_scroll_multiplier = 4; - } // (numberedColors "color" "#" 0 colors.normal) - // (numberedColors "color" "#" 8 colors.bright); + } // (numberedColors "color" "#" 0 colors.normal) // (numberedColors "color" "#" 8 colors.bright); extraConfig = '' symbol_map U+e000-U+f8ff,U+f0000-U+f2000 Symbols Nerd Font Mono ''; diff --git a/home/tmux.nix b/home/tmux.nix index 219bc5d..2078cf5 100644 --- a/home/tmux.nix +++ b/home/tmux.nix @@ -1,15 +1,18 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.tmux = { enable = true; terminal = "screen-256color"; historyLimit = 65536; clock24 = true; - plugins = with pkgs.tmuxPlugins; [{ - plugin = catppuccin; - extraConfig = '' - set -g @catppuccin_flavour 'mocha' - ''; - }]; + plugins = with pkgs.tmuxPlugins; [ + { + plugin = catppuccin; + extraConfig = '' + set -g @catppuccin_flavour 'mocha' + ''; + } + ]; extraConfig = '' bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" diff --git a/home/use-xdg.nix b/home/use-xdg.nix index d3cf488..5e23c5c 100644 --- a/home/use-xdg.nix +++ b/home/use-xdg.nix @@ -1,4 +1,5 @@ -{ config, ... }: { +{ config, ... }: +{ home.sessionVariables = { ANDROID_USER_HOME = "${config.xdg.dataHome}/android"; CARGO_HOME = "${config.xdg.dataHome}/cargo"; diff --git a/sets/1password.nix b/sets/1password.nix index 6a29bfe..82323c7 100644 --- a/sets/1password.nix +++ b/sets/1password.nix @@ -12,9 +12,7 @@ programs.firefox.policies.ExtensionSettings = { "{25fc87fa-4d31-4fee-b5c1-c32a7844c063}" = { installation_mode = "normal_installed"; - install_url = - "https://c.1password.com/dist/1P/b5x/firefox/beta/latest.xpi"; + install_url = "https://c.1password.com/dist/1P/b5x/firefox/beta/latest.xpi"; }; }; } - diff --git a/sets/aarch64-zboot.nix b/sets/aarch64-zboot.nix index 82a65ee..4db7534 100644 --- a/sets/aarch64-zboot.nix +++ b/sets/aarch64-zboot.nix @@ -1,19 +1,21 @@ -{ lib, ... }: { - nixpkgs.hostPlatform = - lib.recursiveUpdate lib.systems.platforms.aarch64-multiplatform { - linux-kernel = { - target = "vmlinuz.efi"; - installTarget = "zinstall"; - }; +{ lib, ... }: +{ + nixpkgs.hostPlatform = lib.recursiveUpdate lib.systems.platforms.aarch64-multiplatform { + linux-kernel = { + target = "vmlinuz.efi"; + installTarget = "zinstall"; }; + }; - boot.kernelPatches = [{ - name = "zboot-enable"; - patch = null; - extraStructuredConfig = with lib.kernel; { - EFI_ZBOOT = yes; - KERNEL_ZSTD = yes; - DEBUG_INFO_BTF = no; - }; - }]; + boot.kernelPatches = [ + { + name = "zboot-enable"; + patch = null; + extraStructuredConfig = with lib.kernel; { + EFI_ZBOOT = yes; + KERNEL_ZSTD = yes; + DEBUG_INFO_BTF = no; + }; + } + ]; } diff --git a/sets/base.nix b/sets/base.nix index 1f00b48..9ca8cbc 100644 --- a/sets/base.nix +++ b/sets/base.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: { imports = [ @@ -6,8 +12,9 @@ inputs.private.nixosModules.substituter ]; - systemd.tmpfiles.rules = lib.mapAttrsToList - (key: value: "L+ /etc/channels/${key} - - - - ${value.outPath}") inputs; + systemd.tmpfiles.rules = + lib.mapAttrsToList (key: value: "L+ /etc/channels/${key} - - - - ${value.outPath}") + inputs; nix = { nixPath = [ "/etc/channels" ]; @@ -17,7 +24,11 @@ }; settings = { auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" "ca-derivations" ]; + experimental-features = [ + "nix-command" + "flakes" + "ca-derivations" + ]; trusted-users = [ "@wheel" ]; use-xdg-base-directories = true; }; @@ -30,9 +41,12 @@ }; nixpkgs = { - overlays = - [ inputs.artemist.overlays.default inputs.fonts.overlays.default ]; - config.allowUnfreePredicate = pkg: + overlays = [ + inputs.artemist.overlays.default + inputs.fonts.overlays.default + ]; + config.allowUnfreePredicate = + pkg: (pkg ? passthru && pkg.passthru ? font && pkg.passthru.font) || (builtins.elem (lib.getName pkg) [ "1password" @@ -67,7 +81,10 @@ isNormalUser = true; description = "Artemis Tosini"; uid = 1000; - extraGroups = [ "wheel" "artemis" ]; + extraGroups = [ + "wheel" + "artemis" + ]; shell = pkgs.fish; # hashedPassword set in private }; @@ -78,10 +95,12 @@ security.sudo.execWheelOnly = true; systemd.extraConfig = "DefaultLimitCORE=infinity"; - security.pam.loginLimits = [{ - domain = "*"; - item = "core"; - type = "hard"; - value = "infinity"; - }]; + security.pam.loginLimits = [ + { + domain = "*"; + item = "core"; + type = "hard"; + value = "infinity"; + } + ]; } diff --git a/sets/buildMachines.nix b/sets/buildMachines.nix index cbd1d20..6d99a9b 100644 --- a/sets/buildMachines.nix +++ b/sets/buildMachines.nix @@ -2,14 +2,21 @@ { nix = { - buildMachines = [{ - hostName = "starlight.manehattan.artem.ist"; - protocol = "ssh-ng"; - sshUser = "build"; - supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-text" ]; - system = "x86_64-linux"; - maxJobs = 2; - }]; + buildMachines = [ + { + hostName = "starlight.manehattan.artem.ist"; + protocol = "ssh-ng"; + sshUser = "build"; + supportedFeatures = [ + "kvm" + "big-parallel" + "benchmark" + "nixos-text" + ]; + system = "x86_64-linux"; + maxJobs = 2; + } + ]; distributedBuilds = true; extraOptions = '' builders-use-substitutes = true @@ -20,8 +27,7 @@ home.stateVersion = config.system.stateVersion; programs.ssh = { enable = true; - userKnownHostsFile = - "~/.ssh/known_hosts ${../home/ssh/extra_known_hosts}"; + userKnownHostsFile = "~/.ssh/known_hosts ${../home/ssh/extra_known_hosts}"; }; }; } diff --git a/sets/disc.nix b/sets/disc.nix index 5603393..eb2eb5d 100644 --- a/sets/disc.nix +++ b/sets/disc.nix @@ -1,7 +1,10 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ cyanrip makemkv ]; + environment.systemPackages = with pkgs; [ + cyanrip + makemkv + ]; # Needed for MakeMKV boot.kernelModules = [ "sg" ]; diff --git a/sets/documentation.nix b/sets/documentation.nix index 32cddfd..380b73c 100644 --- a/sets/documentation.nix +++ b/sets/documentation.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ environment.systemPackages = with pkgs; [ man-pages ]; documentation = { diff --git a/sets/firefox.nix b/sets/firefox.nix index 3e701b1..3cfd73a 100644 --- a/sets/firefox.nix +++ b/sets/firefox.nix @@ -1,7 +1,11 @@ -{ ... }: { +{ ... }: +{ programs.firefox = { enable = true; - languagePacks = [ "en-US" "de" ]; + languagePacks = [ + "en-US" + "de" + ]; preferences = { "app.shield.outputstudies.enabled" = false; "browser.urlbar.switchTabs.adoptIntoActiveWindow" = true; @@ -12,18 +16,15 @@ policies.ExtensionSettings = { "uBlock0@raymondhill.net" = { installation_mode = "normal_installed"; - install_url = - "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; }; "@testpilot-containers" = { installation_mode = "normal_installed"; - install_url = - "https://addons.mozilla.org/firefox/downloads/latest/multi-account-containers/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/multi-account-containers/latest.xpi"; }; "sponsorBlocker@ajay.app" = { installation_mode = "normal_installed"; - install_url = - "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; }; }; }; diff --git a/sets/fonts.nix b/sets/fonts.nix index 1c85ef0..f16faca 100644 --- a/sets/fonts.nix +++ b/sets/fonts.nix @@ -11,7 +11,10 @@ monospace = [ "Fira Code" ]; serif = [ "DejaVu Serif" ]; - emoji = [ "Noto Color Emoji" "Noto Emoji" ]; + emoji = [ + "Noto Color Emoji" + "Noto Emoji" + ]; }; localConf = '' @@ -76,7 +79,8 @@ }; enableDefaultPackages = true; - packages = with pkgs; + packages = + with pkgs; [ corefonts dejavu_fonts @@ -108,6 +112,7 @@ # Weird symbols (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) - ] ++ (builtins.attrValues pkgs.extraFonts); + ] + ++ (builtins.attrValues pkgs.extraFonts); }; } diff --git a/sets/fpga.nix b/sets/fpga.nix index e40dfc1..7e80fa5 100644 --- a/sets/fpga.nix +++ b/sets/fpga.nix @@ -1,8 +1,7 @@ { pkgs, ... }: { - services.udev.packages = - [ (pkgs.callPackage ../externals/rules/fpga.nix { }) ]; + services.udev.packages = [ (pkgs.callPackage ../externals/rules/fpga.nix { }) ]; environment.systemPackages = with pkgs; [ # Synthesis icestorm diff --git a/sets/hacking.nix b/sets/hacking.nix index 481205c..b7a32ea 100644 --- a/sets/hacking.nix +++ b/sets/hacking.nix @@ -17,5 +17,8 @@ fusee-launcher ]; - users.users.artemis.extraGroups = [ "adbusers" "wireshark" ]; + users.users.artemis.extraGroups = [ + "adbusers" + "wireshark" + ]; } diff --git a/sets/hardware.nix b/sets/hardware.nix index 9541404..6346187 100644 --- a/sets/hardware.nix +++ b/sets/hardware.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.udev.packages = [ (pkgs.callPackage ../externals/rules/adafruit.nix { }) (pkgs.callPackage ../externals/rules/limesuite.nix { }) @@ -22,7 +23,10 @@ ]; users = { - users.artemis.extraGroups = [ "plugdev" "dialout" ]; + users.artemis.extraGroups = [ + "plugdev" + "dialout" + ]; extraGroups.plugdev = { }; }; } diff --git a/sets/ime.nix b/sets/ime.nix index 6def230..6fdc359 100644 --- a/sets/ime.nix +++ b/sets/ime.nix @@ -3,15 +3,20 @@ { i18n.inputMethod = { enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-gtk ]; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; }; environment.systemPackages = with pkgs; [ fcitx5-configtool ]; # Required for support in kitty, ibus/fcitx5 are somewhat compatible so this works environment.variables.GLFW_IM_MODULE = "ibus"; - home-manager.users.artemis.wayland.windowManager.sway.config.startup = [{ - command = "fcitx5 -d --replace"; - always = true; - }]; + home-manager.users.artemis.wayland.windowManager.sway.config.startup = [ + { + command = "fcitx5 -d --replace"; + always = true; + } + ]; } diff --git a/sets/laptop.nix b/sets/laptop.nix index bad1b54..6e0039e 100644 --- a/sets/laptop.nix +++ b/sets/laptop.nix @@ -8,6 +8,5 @@ programs.light.enable = true; users.users.artemis.extraGroups = [ "video" ]; - environment.systemPackages = with pkgs; - [ config.boot.kernelPackages.cpupower ]; + environment.systemPackages = with pkgs; [ config.boot.kernelPackages.cpupower ]; } diff --git a/sets/nix-index.nix b/sets/nix-index.nix index e888f84..3841f3a 100644 --- a/sets/nix-index.nix +++ b/sets/nix-index.nix @@ -1,4 +1,5 @@ -{ inputs, ... }: { +{ inputs, ... }: +{ imports = [ inputs.nix-index-database.nixosModules.nix-index ]; programs.command-not-found.enable = false; diff --git a/sets/nixvim.nix b/sets/nixvim.nix index 2daf283..9c66cbd 100644 --- a/sets/nixvim.nix +++ b/sets/nixvim.nix @@ -1,9 +1,13 @@ -{ inputs, lib, ... }@args: { +{ inputs, lib, ... }@args: +{ imports = [ inputs.nixvim.nixosModules.nixvim (import ./nvim.nix { inherit lib; - path = [ "programs" "nixvim" ]; + path = [ + "programs" + "nixvim" + ]; }) ]; diff --git a/sets/nvim.nix b/sets/nvim.nix index caf8f13..5352ee0 100644 --- a/sets/nvim.nix +++ b/sets/nvim.nix @@ -1,182 +1,191 @@ { lib, path }: { pkgs, config, ... }: -let setPath = if path == [ ] then [ "config" ] else path; -in lib.setAttrByPath setPath (let cfg = lib.getAttrFromPath path config; -in { - vimAlias = true; - enableMan = false; +let + setPath = if path == [ ] then [ "config" ] else path; +in +lib.setAttrByPath setPath ( + let + cfg = lib.getAttrFromPath path config; + in + { + vimAlias = true; + enableMan = false; - # Basic editing / QoL - editorconfig.enable = true; - colorschemes.kanagawa.enable = true; - plugins = { - nix.enable = true; - fugitive.enable = true; - gitgutter.enable = true; - instant.enable = true; - lualine.enable = true; - typst-vim.enable = true; - telescope = { - enable = true; - keymaps = { - "tgf" = "git_files"; - "tb" = "buffers"; - "tl" = "live_grep"; - "ts" = "grep_string"; - "tf" = "find_files"; - "tt" = "builtin"; - "tz" = "spell_suggest"; + # Basic editing / QoL + editorconfig.enable = true; + colorschemes.kanagawa.enable = true; + plugins = { + nix.enable = true; + fugitive.enable = true; + gitgutter.enable = true; + instant.enable = true; + lualine.enable = true; + typst-vim.enable = true; + telescope = { + enable = true; + keymaps = { + "tgf" = "git_files"; + "tb" = "buffers"; + "tl" = "live_grep"; + "ts" = "grep_string"; + "tf" = "find_files"; + "tt" = "builtin"; + "tz" = "spell_suggest"; - gd = "lsp_definitions"; - gt = "lsp_type_definitions"; - gr = "lsp_references"; - gi = "lsp_implementations"; - gcd = "diagnostics"; - gsd = "lsp_document_symbols"; - gsw = "lsp_workspace_symbols"; - gci = "lsp_incoming_calls"; - gco = "lsp_outgoing_calls"; + gd = "lsp_definitions"; + gt = "lsp_type_definitions"; + gr = "lsp_references"; + gi = "lsp_implementations"; + gcd = "diagnostics"; + gsd = "lsp_document_symbols"; + gsw = "lsp_workspace_symbols"; + gci = "lsp_incoming_calls"; + gco = "lsp_outgoing_calls"; - "tgs" = "git_status"; - "tgb" = "git_branches"; - "tgc" = "git_commits"; - }; - }; - }; - extraPlugins = with pkgs.vimPlugins; [ - vim-fetch - vim-fish - vim-flatbuffers - vim-nftables - vim-protobuf - vim-toml - ]; - options = { - hidden = true; - backup = false; - writebackup = false; - cmdheight = 2; - shortmess = "filnxtToOFc"; - signcolumn = "yes"; - number = true; - }; - - # LSP - plugins.rust-tools = { - enable = cfg.plugins.lsp.enable; - server.standalone = false; - }; - plugins.clangd-extensions.enable = cfg.plugins.lsp.enable; - plugins.lsp = { - enable = lib.mkDefault true; - servers = { - clangd.enable = cfg.plugins.lsp.enable; - java-language-server.enable = cfg.plugins.lsp.enable; - jsonls.enable = cfg.plugins.lsp.enable; - nil_ls.enable = cfg.plugins.lsp.enable; - pylsp = { - enable = cfg.plugins.lsp.enable; - settings.plugins = { - pylsp_mypy.enabled = true; - black.enabled = true; + "tgs" = "git_status"; + "tgb" = "git_branches"; + "tgc" = "git_commits"; }; }; - texlab.enable = cfg.plugins.lsp.enable; - tsserver.enable = cfg.plugins.lsp.enable; - typst-lsp.enable = cfg.plugins.lsp.enable; + }; + extraPlugins = with pkgs.vimPlugins; [ + vim-fetch + vim-fish + vim-flatbuffers + vim-nftables + vim-protobuf + vim-toml + ]; + options = { + hidden = true; + backup = false; + writebackup = false; + cmdheight = 2; + shortmess = "filnxtToOFc"; + signcolumn = "yes"; + number = true; }; - keymaps = { - silent = true; - diagnostic = { - "rk" = "goto_prev"; - "rj" = "goto_next"; + # LSP + plugins.rust-tools = { + enable = cfg.plugins.lsp.enable; + server.standalone = false; + }; + plugins.clangd-extensions.enable = cfg.plugins.lsp.enable; + plugins.lsp = { + enable = lib.mkDefault true; + servers = { + clangd.enable = cfg.plugins.lsp.enable; + java-language-server.enable = cfg.plugins.lsp.enable; + jsonls.enable = cfg.plugins.lsp.enable; + nil_ls.enable = cfg.plugins.lsp.enable; + pylsp = { + enable = cfg.plugins.lsp.enable; + settings.plugins = { + pylsp_mypy.enabled = true; + black.enabled = true; + }; + }; + texlab.enable = cfg.plugins.lsp.enable; + tsserver.enable = cfg.plugins.lsp.enable; + typst-lsp.enable = cfg.plugins.lsp.enable; }; - lspBuf = { - K = "hover"; - gD = "declaration"; - "ra" = "code_action"; - "rn" = "rename"; - "rs" = "signature_help"; - "f" = "format"; + keymaps = { + silent = true; + diagnostic = { + "rk" = "goto_prev"; + "rj" = "goto_next"; + }; + lspBuf = { + K = "hover"; + gD = "declaration"; + + "ra" = "code_action"; + "rn" = "rename"; + "rs" = "signature_help"; + "f" = "format"; + }; + }; + + onAttach = '' + if client.server_capabilities.documentHighlightProvider then + vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true }) + vim.api.nvim_clear_autocmds { buffer = bufnr, group = "lsp_document_highlight" } + vim.api.nvim_create_autocmd("CursorHold", { + callback = vim.lsp.buf.document_highlight, + buffer = bufnr, + group = "lsp_document_highlight", + desc = "Document Highlight", + }) + vim.api.nvim_create_autocmd("CursorMoved", { + callback = vim.lsp.buf.clear_references, + buffer = bufnr, + group = "lsp_document_highlight", + desc = "Clear All the References", + }) + end + ''; + }; + + # Autocomplete + plugins = { + luasnip.enable = true; + cmp-cmdline.enable = true; + cmp-git.enable = true; + cmp-buffer.enable = true; + nvim-cmp = { + enable = true; + snippet.expand = "luasnip"; + sources = [ + { name = "luasnip"; } + { name = "nvim_lsp"; } + { name = "path"; } + { name = "calc"; } + { name = "emoji"; } + ]; + mappingPresets = [ + "insert" + "cmdline" + ]; + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.abort()"; + }; }; }; - onAttach = '' - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true }) - vim.api.nvim_clear_autocmds { buffer = bufnr, group = "lsp_document_highlight" } - vim.api.nvim_create_autocmd("CursorHold", { - callback = vim.lsp.buf.document_highlight, - buffer = bufnr, - group = "lsp_document_highlight", - desc = "Document Highlight", + # For some reason you can't do this directly in nix? + extraConfigLuaPost = '' + do + local cmp = require('cmp') + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, + }, { + { name = 'buffer' }, }) - vim.api.nvim_create_autocmd("CursorMoved", { - callback = vim.lsp.buf.clear_references, - buffer = bufnr, - group = "lsp_document_highlight", - desc = "Clear All the References", + }) + + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } }) + }) end ''; - }; - - # Autocomplete - plugins = { - luasnip.enable = true; - cmp-cmdline.enable = true; - cmp-git.enable = true; - cmp-buffer.enable = true; - nvim-cmp = { - enable = true; - snippet.expand = "luasnip"; - sources = [ - { name = "luasnip"; } - { name = "nvim_lsp"; } - { name = "path"; } - { name = "calc"; } - { name = "emoji"; } - ]; - mappingPresets = [ "insert" "cmdline" ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.abort()"; - }; - }; - }; - - # For some reason you can't do this directly in nix? - extraConfigLuaPost = '' - do - local cmp = require('cmp') - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'git' }, - }, { - { name = 'buffer' }, - }) - }) - - cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } - }) - - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) - end - ''; -}) + } +) diff --git a/sets/packages.nix b/sets/packages.nix index d16de3a..cbb537f 100644 --- a/sets/packages.nix +++ b/sets/packages.nix @@ -1,129 +1,138 @@ -{ pkgs, lib, ... }: { - environment.systemPackages = (with pkgs; [ - # Audiovisual - darktable - exiftool - flac - lame - opusTools - pavucontrol - r128gain - simple-scan - skanlite - yt-dlp +{ pkgs, lib, ... }: +{ + environment.systemPackages = + (with pkgs; [ + # Audiovisual + darktable + exiftool + flac + lame + opusTools + pavucontrol + r128gain + simple-scan + skanlite + yt-dlp - # Linux tools - dmidecode - gparted - hdparm - iptables - lm_sensors - nethogs - nvme-cli - parted - powertop - psmisc - qrencode - rsync - xorg.xeyes - xorg.xkill - zbar + # Linux tools + dmidecode + gparted + hdparm + iptables + lm_sensors + nethogs + nvme-cli + parted + powertop + psmisc + qrencode + rsync + xorg.xeyes + xorg.xkill + zbar - # Filesystems - cifs-utils - exfatprogs - nfs-utils - ntfsprogs - udftools + # Filesystems + cifs-utils + exfatprogs + nfs-utils + ntfsprogs + udftools - # Useful CLI tools - _7zz - appimage-run - bind - borgbackup - file - fzf - git-lfs - gitAndTools.gitFull - gitAndTools.pass-git-helper - htop - hunspell - jq - libarchive - lsof - nix-output-monitor - nix-top - openssl - parallel - pciutils - pdftk - poppler_utils - python3Packages.ipython - ripgrep - rlwrap - tmux - tomb - tree - unrar - unzip - usbutils - xxd - zip + # Useful CLI tools + _7zz + appimage-run + bind + borgbackup + file + fzf + git-lfs + gitAndTools.gitFull + gitAndTools.pass-git-helper + htop + hunspell + jq + libarchive + lsof + nix-output-monitor + nix-top + openssl + parallel + pciutils + pdftk + poppler_utils + python3Packages.ipython + ripgrep + rlwrap + tmux + tomb + tree + unrar + unzip + usbutils + xxd + zip - # Networking - curlFull - iw - magic-wormhole - mosh - mtr - sshuttle - traceroute - transmission-remote-gtk - wget + # Networking + curlFull + iw + magic-wormhole + mosh + mtr + sshuttle + traceroute + transmission-remote-gtk + wget - # Development - patchelf - rustup + # Development + patchelf + rustup - # Security - pass - wireguard-tools - yubikey-manager + # Security + pass + wireguard-tools + yubikey-manager - # GUI tools - dino - evince - gimp - gnome3.eog - gnome3.gnome-system-monitor - inkscape - libreoffice-fresh - nheko + # GUI tools + dino + evince + gimp + gnome3.eog + gnome3.gnome-system-monitor + inkscape + libreoffice-fresh + nheko - # I guess this is its own thing - libqalculate - qalculate-gtk + # I guess this is its own thing + libqalculate + qalculate-gtk - # Gnome configuration - gnome3.adwaita-icon-theme - gsettings-desktop-schemas - gnome-themes-extra - hicolor-icon-theme + # Gnome configuration + gnome3.adwaita-icon-theme + gsettings-desktop-schemas + gnome-themes-extra + hicolor-icon-theme - # Dictionaries - ]) ++ (with pkgs.hunspellDicts; [ en-us-large de_DE ]) - ++ (lib.optionals (pkgs.system == "x86_64-linux") (with pkgs; [ - # Web - google-chrome + # Dictionaries + ]) + ++ (with pkgs.hunspellDicts; [ + en-us-large + de_DE + ]) + ++ (lib.optionals (pkgs.system == "x86_64-linux") ( + with pkgs; + [ + # Web + google-chrome - # EFI stuff - efibootmgr - efitools - sbsigntool + # EFI stuff + efibootmgr + efitools + sbsigntool - # Wine and tools - cabextract - samba - wineWowPackages.waylandFull - ])); + # Wine and tools + cabextract + samba + wineWowPackages.waylandFull + ] + )); } diff --git a/sets/pipewire.nix b/sets/pipewire.nix index 5e26510..6c7c8a2 100644 --- a/sets/pipewire.nix +++ b/sets/pipewire.nix @@ -12,5 +12,9 @@ }; hardware.pulseaudio.enable = lib.mkForce false; security.rtkit.enable = true; - environment.systemPackages = with pkgs; [ pulseaudio qpwgraph easyeffects ]; + environment.systemPackages = with pkgs; [ + pulseaudio + qpwgraph + easyeffects + ]; } diff --git a/sets/radio.nix b/sets/radio.nix index 74bdee0..59f3779 100644 --- a/sets/radio.nix +++ b/sets/radio.nix @@ -2,5 +2,8 @@ { services.udev.packages = with pkgs; [ soapysdr-with-plugins ]; - environment.systemPackages = with pkgs; [ soapysdr-with-plugins gqrx ]; + environment.systemPackages = with pkgs; [ + soapysdr-with-plugins + gqrx + ]; } diff --git a/sets/swap.nix b/sets/swap.nix index b239948..3139809 100644 --- a/sets/swap.nix +++ b/sets/swap.nix @@ -1,4 +1,5 @@ -{ lib, ... }: { +{ lib, ... }: +{ zramSwap = { enable = true; memoryPercent = lib.mkDefault 25; diff --git a/sets/sway.nix b/sets/sway.nix index 0a910c8..c4410b6 100644 --- a/sets/sway.nix +++ b/sets/sway.nix @@ -1,5 +1,9 @@ -{ pkgs, inputs, ... }: { - imports = [ ./fonts.nix inputs.private.nixosModules.sway ]; +{ pkgs, inputs, ... }: +{ + imports = [ + ./fonts.nix + inputs.private.nixosModules.sway + ]; security.polkit.enable = true; services = { accounts-daemon.enable = true; @@ -12,7 +16,10 @@ extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; config = { common.default = [ "gtk" ]; - sway.default = [ "wlr" "gtk" ]; + sway.default = [ + "wlr" + "gtk" + ]; }; }; sound.enable = true; diff --git a/sets/tpm.nix b/sets/tpm.nix index 18ea0a7..fb24fde 100644 --- a/sets/tpm.nix +++ b/sets/tpm.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ security.tpm2 = { enable = true; pkcs11.enable = true; diff --git a/sets/virtualization.nix b/sets/virtualization.nix index 513fddf..8695f6b 100644 --- a/sets/virtualization.nix +++ b/sets/virtualization.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { virtualisation = { @@ -10,9 +15,9 @@ enable = true; qemu = { ovmf.enable = true; - ovmf.packages = [ pkgs.OVMFFull.fd ] - ++ lib.optional (pkgs.system == "x86_64-linux") - pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd; + ovmf.packages = [ + pkgs.OVMFFull.fd + ] ++ lib.optional (pkgs.system == "x86_64-linux") pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd; swtpm.enable = true; vhostUserPackages = [ pkgs.virtiofsd ]; runAsRoot = false; @@ -29,10 +34,16 @@ boot.kernel.sysctl."net.bridge.bridge-nf-call-iptables" = 0; programs.virt-manager.enable = true; - environment.systemPackages = with pkgs; [ spice-gtk qemu ]; + environment.systemPackages = with pkgs; [ + spice-gtk + qemu + ]; users.users = { - artemis.extraGroups = [ "lxd" "libvirtd" ]; + artemis.extraGroups = [ + "lxd" + "libvirtd" + ]; lxd = { isSystemUser = true; subUidRanges = [ diff --git a/sets/wifi.nix b/sets/wifi.nix index 8805b4b..bbf99b5 100644 --- a/sets/wifi.nix +++ b/sets/wifi.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ networking.networkmanager = { enable = true; wifi.macAddress = "stable"; diff --git a/sets/workstation.nix b/sets/workstation.nix index 04ddeb6..63611a5 100644 --- a/sets/workstation.nix +++ b/sets/workstation.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, inputs, ... }@args: +{ + pkgs, + lib, + inputs, + ... +}@args: { imports = [ diff --git a/system/gallus/boot-config.nix b/system/gallus/boot-config.nix index 1ffd2db..bd6a413 100644 --- a/system/gallus/boot-config.nix +++ b/system/gallus/boot-config.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; diff --git a/system/gallus/default.nix b/system/gallus/default.nix index d782724..38b21e9 100644 --- a/system/gallus/default.nix +++ b/system/gallus/default.nix @@ -1,4 +1,9 @@ -{ inputs, pkgs, lib, ... }@args: +{ + inputs, + pkgs, + lib, + ... +}@args: { imports = [ diff --git a/system/gallus/hardware-configuration.nix b/system/gallus/hardware-configuration.nix index 6d836cf..0c88a4c 100644 --- a/system/gallus/hardware-configuration.nix +++ b/system/gallus/hardware-configuration.nix @@ -1,7 +1,13 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -29,8 +35,7 @@ fsType = "vfat"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/6cdcaab1-a216-4615-89e7-75e99c1339bb"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/6cdcaab1-a216-4615-89e7-75e99c1339bb"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -41,6 +46,5 @@ # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/system/mistmane/default.nix b/system/mistmane/default.nix index c443f39..71a666f 100644 --- a/system/mistmane/default.nix +++ b/system/mistmane/default.nix @@ -1,4 +1,9 @@ -{ config, lib, inputs, ... }: +{ + config, + lib, + inputs, + ... +}: { imports = [ diff --git a/system/mistmane/hardware-configuration.nix b/system/mistmane/hardware-configuration.nix index aa5709f..4133e94 100644 --- a/system/mistmane/hardware-configuration.nix +++ b/system/mistmane/hardware-configuration.nix @@ -1,7 +1,13 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -21,8 +27,7 @@ fsType = "vfat"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/1114039c-3329-4551-a56d-fccde77a31a7"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/1114039c-3329-4551-a56d-fccde77a31a7"; } ]; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } diff --git a/system/rainbowdash/default.nix b/system/rainbowdash/default.nix index 0eb06d4..f10c243 100644 --- a/system/rainbowdash/default.nix +++ b/system/rainbowdash/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, inputs, ... }: +{ + config, + pkgs, + inputs, + ... +}: { imports = [ @@ -17,7 +22,6 @@ inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call inputs.nixos-hardware.nixosModules.common-pc-ssd - ]; boot.supportedFilesystems = [ "nfs4" ]; @@ -34,10 +38,12 @@ middle_emulation = "enabled"; click_method = "clickfinger"; }; - startup = [{ - command = "swayidle -w before-sleep 'light -O' after-resume 'light -I'"; - always = true; - }]; + startup = [ + { + command = "swayidle -w before-sleep 'light -O' after-resume 'light -I'"; + always = true; + } + ]; }; xdg.configFile."rustybar/config.toml".text = '' [[tile]] diff --git a/system/rainbowdash/hardware-configuration.nix b/system/rainbowdash/hardware-configuration.nix index e35b6d3..77a27e4 100644 --- a/system/rainbowdash/hardware-configuration.nix +++ b/system/rainbowdash/hardware-configuration.nix @@ -1,13 +1,24 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -29,11 +40,9 @@ fsType = "vfat"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/289be8e5-6547-41d4-a6ba-309141f9fccd"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/289be8e5-6547-41d4-a6ba-309141f9fccd"; } ]; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; # High-DPI console - console.font = - lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; } diff --git a/system/smolder/boot-config.nix b/system/smolder/boot-config.nix index 01bc29d..c29a472 100644 --- a/system/smolder/boot-config.nix +++ b/system/smolder/boot-config.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ hardware.deviceTree.filter = "rk3588-rock-5b.dtb"; boot = { diff --git a/system/smolder/default.nix b/system/smolder/default.nix index b15a5ab..aac26ad 100644 --- a/system/smolder/default.nix +++ b/system/smolder/default.nix @@ -12,4 +12,3 @@ networking.hostName = "smolder"; system.stateVersion = "23.11"; } - diff --git a/system/smolder/hardware-configuration.nix b/system/smolder/hardware-configuration.nix index b5371ac..b0466cd 100644 --- a/system/smolder/hardware-configuration.nix +++ b/system/smolder/hardware-configuration.nix @@ -1,7 +1,13 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -21,8 +27,7 @@ fsType = "ext4"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/30f73056-e5c0-4349-bc85-b9a842f4458e"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/30f73056-e5c0-4349-bc85-b9a842f4458e"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/system/spike/boot-config.nix b/system/spike/boot-config.nix index 75522f9..68b2680 100644 --- a/system/spike/boot-config.nix +++ b/system/spike/boot-config.nix @@ -8,15 +8,17 @@ initrd.systemd.enable = true; }; - swapDevices = lib.mkForce [{ - device = "/dev/disk/by-uuid/addae2e4-d7d7-4fcd-b2cb-7635c794d652"; - encrypted = { - enable = true; - label = "swap"; - blkDev = "/dev/disk/by-uuid/e5381f7c-fb90-4762-8a27-aa05429893e7"; - keyFile = "/sysroot/var/lib/private/swap_key"; - }; - }]; + swapDevices = lib.mkForce [ + { + device = "/dev/disk/by-uuid/addae2e4-d7d7-4fcd-b2cb-7635c794d652"; + encrypted = { + enable = true; + label = "swap"; + blkDev = "/dev/disk/by-uuid/e5381f7c-fb90-4762-8a27-aa05429893e7"; + keyFile = "/sysroot/var/lib/private/swap_key"; + }; + } + ]; fileSystems."/media/µsd".encrypted = { enable = true; diff --git a/system/spike/hardware-configuration.nix b/system/spike/hardware-configuration.nix index 70f957b..e963952 100644 --- a/system/spike/hardware-configuration.nix +++ b/system/spike/hardware-configuration.nix @@ -1,13 +1,26 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "bcache" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + "bcache" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -37,6 +50,5 @@ # networking.interfaces.eno1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/system/starlight/boot-config.nix b/system/starlight/boot-config.nix index 6afd56d..a8d13a7 100644 --- a/system/starlight/boot-config.nix +++ b/system/starlight/boot-config.nix @@ -7,7 +7,8 @@ let "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; -in { +in +{ boot = { kernelPackages = pkgs.linuxPackages_latest; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; @@ -38,6 +39,9 @@ in { services.btrfs.autoScrub = { enable = true; - fileSystems = [ "/" "/media/data" ]; + fileSystems = [ + "/" + "/media/data" + ]; }; } diff --git a/system/starlight/default.nix b/system/starlight/default.nix index f6be916..390db16 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: { imports = [ @@ -40,7 +46,9 @@ interfaces = { lan10g0 = { }; lan10g1 = { }; - lan1g0 = { vlan = 4; }; + lan1g0 = { + vlan = 4; + }; "vs0.4" = { vlan = 4; type = "internal"; @@ -49,10 +57,12 @@ }; networking.interfaces."vs0" = { useDHCP = true; - ipv6.addresses = [{ - address = "2001:470:8b04:6900:6969:1454:7749:e591"; - prefixLength = 128; - }]; + ipv6.addresses = [ + { + address = "2001:470:8b04:6900:6969:1454:7749:e591"; + prefixLength = 128; + } + ]; }; services.openssh.extraConfig = '' @@ -62,7 +72,10 @@ # Filesystems services.btrfs.autoScrub = { enable = true; - fileSystems = [ "/" "/media/data" ]; + fileSystems = [ + "/" + "/media/data" + ]; }; # Skye user for luna @@ -77,21 +90,22 @@ services.printing.drivers = [ pkgs.cups-dymo - (pkgs.brlaser.overrideAttrs (old: { - version = "unstable-2023-02-20"; - src = pkgs.fetchFromGitHub { - owner = "pdewacht"; - repo = "brlaser"; - rev = "2a49e3287c70c254e7e3ac9dabe9d6a07218c3fa"; - sha256 = "sha256-1fvO9F7ifbYQHAy54mOx052XutfKXSK6iT/zj4Mhbww="; - }; - })) + (pkgs.brlaser.overrideAttrs ( + old: { + version = "unstable-2023-02-20"; + src = pkgs.fetchFromGitHub { + owner = "pdewacht"; + repo = "brlaser"; + rev = "2a49e3287c70c254e7e3ac9dabe9d6a07218c3fa"; + sha256 = "sha256-1fvO9F7ifbYQHAy54mOx052XutfKXSK6iT/zj4Mhbww="; + }; + } + )) ]; # Home home-manager.users.artemis = { - programs.git.signing.key = - lib.mkForce "3D2BB230F9FAF0C5183246DD4FDC96F161E7BA8A"; + programs.git.signing.key = lib.mkForce "3D2BB230F9FAF0C5183246DD4FDC96F161E7BA8A"; programs.mpv.defaultProfiles = [ "gpu-hq" ]; wayland.windowManager.sway.config.output = { "DP-1" = { diff --git a/system/starlight/hardware-configuration.nix b/system/starlight/hardware-configuration.nix index a4f23fa..0ebac23 100644 --- a/system/starlight/hardware-configuration.nix +++ b/system/starlight/hardware-configuration.nix @@ -1,13 +1,25 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; @@ -76,7 +88,5 @@ fsType = "nfs4"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/b134fecf-719f-45af-b317-001e413f06c4"; }]; - + swapDevices = [ { device = "/dev/disk/by-uuid/b134fecf-719f-45af-b317-001e413f06c4"; } ]; } diff --git a/system/starlight/scripts.nix b/system/starlight/scripts.nix index d3bbb09..3a75a6c 100644 --- a/system/starlight/scripts.nix +++ b/system/starlight/scripts.nix @@ -4,7 +4,8 @@ let #! ${pkgs.runtimeShell} PATH=${pkgs.sway}/bin ''; -in { +in +{ home-manager.users.artemis.home.packages = [ (pkgs.writeScriptBin "work" '' ${swayPrelude}