From c00134da1c2df1960aaecd7ae7c0ce5c3c752dc1 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 27 Jul 2024 01:07:07 +0200 Subject: [PATCH] Run alejandra --- home/default.nix | 14 +- home/impermanence/default.nix | 33 +++-- home/packages/cli/desktop.nix | 2 +- home/packages/cli/scripts/default.nix | 22 ++- .../packages/cli/scripts/packages/bitcoin.nix | 3 +- .../cli/scripts/packages/cheatsh/default.nix | 3 +- .../scripts/packages/colors256/default.nix | 4 +- .../packages/cli/scripts/packages/default.nix | 6 +- .../scripts/packages/gh-notify/default.nix | 5 +- .../cli/scripts/packages/unix/default.nix | 5 +- home/packages/gui/wayland/swappy.nix | 3 +- home/packages/gui/wayland/wlogout.nix | 5 +- home/programs/graphical/apps/obs.nix | 3 - .../programs/graphical/apps/qalculate-gtk.nix | 2 +- home/programs/graphical/apps/qbittorrent.nix | 1 - home/programs/graphical/apps/stremio.nix | 1 - .../graphical/apps/vesktop/default.nix | 8 +- .../graphical/apps/webcord/default.nix | 9 +- home/programs/graphical/bars/eww/default.nix | 18 +-- .../graphical/browsers/chromium/default.nix | 9 +- home/programs/graphical/browsers/default.nix | 1 - .../graphical/browsers/schizofox/default.nix | 78 +++++------ .../file-managers/pcmanfm-qt/default.nix | 4 +- .../graphical/games/prismlauncher.nix | 2 +- .../graphical/launchers/walker/default.nix | 12 +- .../wms/hyprland/config/gestures.nix | 1 - .../graphical/wms/hyprland/config/input.nix | 6 +- .../wms/hyprland/config/keybinds.nix | 11 +- .../graphical/wms/hyprland/config/layout.nix | 2 +- .../graphical/wms/hyprland/config/misc.nix | 2 +- .../graphical/wms/hyprland/config/style.nix | 22 +-- .../wms/hyprland/config/window_rules.nix | 1 - .../graphical/wms/hyprland/default.nix | 4 +- .../hyprland/packages/brightness/default.nix | 6 +- .../wms/hyprland/packages/default.nix | 5 +- .../packages/hyprland-move-window/default.nix | 7 +- .../packages/quick-record/default.nix | 1 - .../toggle-fake-fullscreen/default.nix | 2 - .../packages/toggle-notifications/default.nix | 3 - .../terminal/coding/python/ipython.nix | 2 +- home/programs/terminal/coding/python/mypy.nix | 2 +- .../terminal/coding/python/pyright.nix | 2 +- home/programs/terminal/coding/python/ruff.nix | 132 +++++++++--------- home/programs/terminal/coding/python/rye.nix | 4 +- home/programs/terminal/emulators/default.nix | 4 +- home/programs/terminal/emulators/foot.nix | 6 +- home/programs/terminal/emulators/kitty.nix | 1 - .../terminal/file-managers/default.nix | 3 +- .../terminal/file-managers/ranger.nix | 1 - .../terminal/file-managers/xplr/default.nix | 1 - .../terminal/file-managers/xplr/plugins.nix | 1 - .../terminal/file-managers/yazi/default.nix | 1 - .../file-managers/yazi/theme/icons.nix | 1 - .../file-managers/yazi/theme/manager.nix | 1 - .../file-managers/yazi/theme/status.nix | 1 - home/programs/terminal/shell/zsh/aliases.nix | 11 +- home/programs/terminal/shell/zsh/default.nix | 6 +- home/programs/terminal/shell/zsh/init.nix | 11 +- home/programs/terminal/shell/zsh/plugins.nix | 10 +- home/programs/terminal/tools/direnv.nix | 2 +- home/programs/terminal/tools/fastfetch.nix | 1 - home/programs/terminal/tools/git/aliases.nix | 10 +- .../git/bin/better-git-branch/default.nix | 6 +- .../terminal/tools/git/bin/default.nix | 5 +- home/programs/terminal/tools/git/default.nix | 10 +- home/programs/terminal/tools/git/gh.nix | 2 +- home/programs/terminal/tools/gpg.nix | 2 +- home/programs/terminal/tools/iamb.nix | 12 +- .../terminal/tools/newsboat/default.nix | 8 +- .../programs/terminal/tools/newsboat/urls.nix | 1 - home/programs/terminal/tools/nix-index.nix | 2 +- home/programs/terminal/tools/ssh.nix | 1 - home/programs/xdg/config-files.nix | 7 +- home/programs/xdg/default.nix | 8 +- home/programs/xdg/mime-apps.nix | 7 +- home/programs/xdg/user-dirs.nix | 2 +- home/services/default.nix | 2 +- home/services/hyprpaper.nix | 7 +- home/themes/cursor.nix | 5 +- home/themes/gtk.nix | 6 +- home/themes/qt.nix | 5 +- hosts/default.nix | 38 ++--- hosts/herugrim/default.nix | 9 +- hosts/herugrim/hardware-configuration.nix | 90 ++++++------ hosts/voyager/default.nix | 52 +++---- hosts/voyager/hardware-configuration.nix | 90 ++++++------ options/device/hardware.nix | 9 +- options/device/roles.nix | 6 +- options/home/default.nix | 7 +- options/home/git.nix | 6 +- options/home/preferences.nix | 29 ++-- options/home/programs/default.nix | 6 +- options/home/programs/iamb.nix | 6 +- options/home/services.nix | 7 +- options/home/theme.nix | 12 +- options/home/wms.nix | 1 - options/security/auditd.nix | 11 +- options/system/boot/default.nix | 29 ++-- options/system/boot/plymouth.nix | 6 +- options/system/boot/secure-boot.nix | 10 +- options/system/default.nix | 6 +- options/system/impermanence.nix | 28 ++-- options/workstation/default.nix | 10 +- shells/default.nix | 2 +- system/roles/laptop/power/acpi.nix | 10 +- system/roles/laptop/power/default.nix | 9 +- .../power/power-profiles-daemon/default.nix | 7 +- system/roles/laptop/power/upower.nix | 8 +- system/roles/laptop/touchpad.nix | 6 +- .../workstation/display/login/greetd.nix | 3 +- .../roles/workstation/display/login/pam.nix | 6 +- .../workstation/display/wayland/services.nix | 2 +- .../display/wayland/xdg-portals.nix | 7 +- system/roles/workstation/fonts.nix | 55 +++++--- system/roles/workstation/programs/misc.nix | 6 +- .../roles/workstation/programs/physlock.nix | 6 +- system/roles/workstation/programs/steam.nix | 1 - system/roles/workstation/programs/thunar.nix | 11 +- .../roles/workstation/programs/virtualbox.nix | 2 +- system/roles/workstation/services/default.nix | 1 - .../roles/workstation/services/earlyoom.nix | 7 +- .../workstation/services/gnome-keyring.nix | 9 +- system/roles/workstation/services/logind.nix | 6 +- system/roles/workstation/services/mount.nix | 6 +- system/shared/boot/generic.nix | 12 +- system/shared/boot/loaders/systemd-boot.nix | 6 +- system/shared/boot/numlock.nix | 8 +- system/shared/boot/plymouth.nix | 30 ++-- system/shared/boot/secure-boot.nix | 9 +- system/shared/hardware/bluetooth.nix | 2 +- system/shared/hardware/cpu/amd.nix | 10 +- system/shared/hardware/cpu/intel.nix | 10 +- system/shared/hardware/generic.nix | 1 - system/shared/hardware/gpu/amd.nix | 21 +-- system/shared/hardware/gpu/default.nix | 1 - system/shared/hardware/gpu/nvidia.nix | 17 ++- system/shared/hardware/tpm.nix | 9 +- system/shared/impermanence/autowipe.nix | 30 ++-- system/shared/impermanence/default.nix | 3 +- system/shared/impermanence/root.nix | 37 +++-- system/shared/network.nix | 3 +- system/shared/nix/default.nix | 12 +- system/shared/programs.nix | 1 - system/shared/security/apparmor.nix | 6 +- system/shared/security/auditd.nix | 6 +- system/shared/security/polkit.nix | 6 +- system/shared/services/fstrim.nix | 6 +- system/shared/services/fwupd.nix | 2 +- system/shared/services/logrotate.nix | 6 +- system/shared/services/oomd.nix | 2 +- system/shared/services/ssh.nix | 3 +- system/shared/system.nix | 13 +- 152 files changed, 827 insertions(+), 721 deletions(-) diff --git a/home/default.nix b/home/default.nix index 90c64a0..0ea3853 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,9 +1,13 @@ -{ config, lib, inputs, self, ... }: -let +{ + config, + lib, + inputs, + self, + ... +}: let myHmConf = config.myOptions.home-manager; username = config.myOptions.system.username; -in -{ +in { home-manager = lib.mkIf myHmConf.enable { # Use verbose mode for home-manager verbose = true; @@ -23,7 +27,7 @@ in backupFileExtension = "hm.old"; # These will be passed to all hm modules - extraSpecialArgs = { inherit inputs self; }; + extraSpecialArgs = {inherit inputs self;}; users.${username} = { # These imports will be scoped under this key so all settings diff --git a/home/impermanence/default.nix b/home/impermanence/default.nix index 998659c..98b026c 100644 --- a/home/impermanence/default.nix +++ b/home/impermanence/default.nix @@ -7,18 +7,21 @@ inherit (lib) mkIf; cfg = osConfig.myOptions.system.impermanence.home; in { - imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ]; + imports = [inputs.impermanence.nixosModules.home-manager.impermanence]; config = mkIf cfg.enable { home.persistence."${cfg.persistentMountPoint}" = { - directories = [ - ".cache/nix" - ".cache/nix-index" - ] ++ cfg.extraDirectories; + directories = + [ + ".cache/nix" + ".cache/nix-index" + ] + ++ cfg.extraDirectories; - files = [ - - ] ++ cfg.extraFiles; + files = + [ + ] + ++ cfg.extraFiles; # Allow other users (such as root), to access files through the bind # mounted directories listed in `directories`. Useful for `sudo` operations, @@ -27,13 +30,15 @@ in { }; home.persistence."${cfg.persistentDataMountPoint}" = { - directories = [ + directories = + [ + ] + ++ cfg.extraDataDirectories; - ] ++ cfg.extraDataDirectories; - - files = [ - - ] ++ cfg.extraDataFiles; + files = + [ + ] + ++ cfg.extraDataFiles; # See comment for this above allowOther = true; diff --git a/home/packages/cli/desktop.nix b/home/packages/cli/desktop.nix index 731345d..6c44aba 100644 --- a/home/packages/cli/desktop.nix +++ b/home/packages/cli/desktop.nix @@ -7,7 +7,7 @@ inherit (lib) mkIf; devType = osConfig.myOptions.device.roles.type; - acceptedTypes = [ "laptop" "desktop" ]; + acceptedTypes = ["laptop" "desktop"]; in { config = mkIf (builtins.elem devType acceptedTypes) { home.packages = with pkgs; [ diff --git a/home/packages/cli/scripts/default.nix b/home/packages/cli/scripts/default.nix index 1149e67..852942f 100644 --- a/home/packages/cli/scripts/default.nix +++ b/home/packages/cli/scripts/default.nix @@ -1,15 +1,11 @@ -{ - pkgs, - ... -}: let - - scriptPkgs = (import ./packages {inherit pkgs;}); +{pkgs, ...}: let + scriptPkgs = import ./packages {inherit pkgs;}; in { - home.packages = with scriptPkgs; [ - bitcoin - cheatsh - colors256 - unix - gh-notify - ]; + home.packages = with scriptPkgs; [ + bitcoin + cheatsh + colors256 + unix + gh-notify + ]; } diff --git a/home/packages/cli/scripts/packages/bitcoin.nix b/home/packages/cli/scripts/packages/bitcoin.nix index 737e0d4..e13f49d 100644 --- a/home/packages/cli/scripts/packages/bitcoin.nix +++ b/home/packages/cli/scripts/packages/bitcoin.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: -(pkgs.writeShellApplication { +{pkgs, ...}: (pkgs.writeShellApplication { name = "bitcoin"; runtimeInputs = with pkgs; [coreutils curl jq]; text = '' diff --git a/home/packages/cli/scripts/packages/cheatsh/default.nix b/home/packages/cli/scripts/packages/cheatsh/default.nix index d210476..a6841ed 100644 --- a/home/packages/cli/scripts/packages/cheatsh/default.nix +++ b/home/packages/cli/scripts/packages/cheatsh/default.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: -(pkgs.writeShellApplication { +{pkgs, ...}: (pkgs.writeShellApplication { name = "cheat.sh"; runtimeInputs = with pkgs; [coreutils curl jq gnugrep fzf]; text = '' diff --git a/home/packages/cli/scripts/packages/colors256/default.nix b/home/packages/cli/scripts/packages/colors256/default.nix index ef40b74..6a99d2c 100644 --- a/home/packages/cli/scripts/packages/colors256/default.nix +++ b/home/packages/cli/scripts/packages/colors256/default.nix @@ -1,9 +1,7 @@ -{pkgs, ...}: -(pkgs.writeShellApplication { +{pkgs, ...}: (pkgs.writeShellApplication { name = "colors-256"; runtimeInputs = with pkgs; [coreutils]; text = '' ${builtins.readFile ./colors-256.sh} ''; }) - diff --git a/home/packages/cli/scripts/packages/default.nix b/home/packages/cli/scripts/packages/default.nix index d4c4f7f..51639e6 100644 --- a/home/packages/cli/scripts/packages/default.nix +++ b/home/packages/cli/scripts/packages/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: let +{pkgs, ...}: let packages = { bitcoin = pkgs.callPackage ./bitcoin.nix {}; cheatsh = pkgs.callPackage ./cheatsh {}; @@ -11,4 +8,3 @@ }; in packages - diff --git a/home/packages/cli/scripts/packages/gh-notify/default.nix b/home/packages/cli/scripts/packages/gh-notify/default.nix index cd35398..81471c7 100644 --- a/home/packages/cli/scripts/packages/gh-notify/default.nix +++ b/home/packages/cli/scripts/packages/gh-notify/default.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: -(pkgs.writeShellApplication { +{pkgs, ...}: (pkgs.writeShellApplication { name = "gh-notify"; runtimeInputs = with pkgs; [ coreutils @@ -12,5 +11,3 @@ ${builtins.readFile ./gh-notify.sh} ''; }) - - diff --git a/home/packages/cli/scripts/packages/unix/default.nix b/home/packages/cli/scripts/packages/unix/default.nix index 1788100..fdd4353 100644 --- a/home/packages/cli/scripts/packages/unix/default.nix +++ b/home/packages/cli/scripts/packages/unix/default.nix @@ -1,10 +1,7 @@ -{pkgs, ...}: -(pkgs.writeShellApplication { +{pkgs, ...}: (pkgs.writeShellApplication { name = "unix"; runtimeInputs = with pkgs; [coreutils]; text = '' ${builtins.readFile ./unix.sh} ''; }) - - diff --git a/home/packages/gui/wayland/swappy.nix b/home/packages/gui/wayland/swappy.nix index 6f32ec1..245e48e 100644 --- a/home/packages/gui/wayland/swappy.nix +++ b/home/packages/gui/wayland/swappy.nix @@ -7,10 +7,9 @@ ... }: let inherit (lib) mkIf; - in { config = mkIf osConfig.myOptions.home-manager.wms.isWayland { - home.packages = with pkgs; [ swappy ]; + home.packages = with pkgs; [swappy]; xdg.configFile."swappy/config".text = lib.generators.toINI {} { Default = { diff --git a/home/packages/gui/wayland/wlogout.nix b/home/packages/gui/wayland/wlogout.nix index 4a47ec5..c2c7d28 100644 --- a/home/packages/gui/wayland/wlogout.nix +++ b/home/packages/gui/wayland/wlogout.nix @@ -5,11 +5,8 @@ ... }: let inherit (lib) mkIf; - in { config = mkIf osConfig.myOptions.home-manager.wms.isWayland { - home.packages = with pkgs; [ wlogout ]; + home.packages = with pkgs; [wlogout]; }; } - - diff --git a/home/programs/graphical/apps/obs.nix b/home/programs/graphical/apps/obs.nix index 202d7df..0c514ad 100644 --- a/home/programs/graphical/apps/obs.nix +++ b/home/programs/graphical/apps/obs.nix @@ -16,6 +16,3 @@ in { ]; }; } - - - diff --git a/home/programs/graphical/apps/qalculate-gtk.nix b/home/programs/graphical/apps/qalculate-gtk.nix index a7ff8f8..019cf30 100644 --- a/home/programs/graphical/apps/qalculate-gtk.nix +++ b/home/programs/graphical/apps/qalculate-gtk.nix @@ -9,6 +9,6 @@ cfg = osConfig.myOptions.home-manager.programs.applications.qalculate-gtk; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ qalculate-gtk ]; + home.packages = with pkgs; [qalculate-gtk]; }; } diff --git a/home/programs/graphical/apps/qbittorrent.nix b/home/programs/graphical/apps/qbittorrent.nix index 2275b25..ceceecf 100644 --- a/home/programs/graphical/apps/qbittorrent.nix +++ b/home/programs/graphical/apps/qbittorrent.nix @@ -14,4 +14,3 @@ in { ]; }; } - diff --git a/home/programs/graphical/apps/stremio.nix b/home/programs/graphical/apps/stremio.nix index 4147642..f1dbf80 100644 --- a/home/programs/graphical/apps/stremio.nix +++ b/home/programs/graphical/apps/stremio.nix @@ -14,4 +14,3 @@ in { ]; }; } - diff --git a/home/programs/graphical/apps/vesktop/default.nix b/home/programs/graphical/apps/vesktop/default.nix index 87f563e..2338aad 100644 --- a/home/programs/graphical/apps/vesktop/default.nix +++ b/home/programs/graphical/apps/vesktop/default.nix @@ -9,13 +9,13 @@ cfg = osConfig.myOptions.home-manager.programs.applications.vesktop; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ vesktop ]; + home.packages = with pkgs; [vesktop]; systemd.user.services."vesktop" = mkIf cfg.autoStart { Unit = { Description = "Vesktop (An alternate client for Discord with Vencord built-in)"; - After = [ "graphical-session.target" ]; - PartOf = [ "graphical-session.target" ]; + After = ["graphical-session.target"]; + PartOf = ["graphical-session.target"]; }; Service = { @@ -24,7 +24,7 @@ in { ExecStart = "${pkgs.vesktop}/bin/vesktop"; }; - Install.WantedBy = [ "graphical-session.target" ]; + Install.WantedBy = ["graphical-session.target"]; }; }; } diff --git a/home/programs/graphical/apps/webcord/default.nix b/home/programs/graphical/apps/webcord/default.nix index dad3236..6828feb 100644 --- a/home/programs/graphical/apps/webcord/default.nix +++ b/home/programs/graphical/apps/webcord/default.nix @@ -9,7 +9,7 @@ cfg = osConfig.myOptions.home-manager.programs.applications.webcord; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = with pkgs; [ # Webcord with vencord extension installed webcord-vencord ]; @@ -17,8 +17,8 @@ in { systemd.user.services."webcord" = mkIf cfg.autoStart { Unit = { Description = "Webcord (An electron-based Discord client implemented without Discord API with Vencord built-in)"; - After = [ "graphical-session.target" ]; - PartOf = [ "graphical-session.target" ]; + After = ["graphical-session.target"]; + PartOf = ["graphical-session.target"]; }; Service = { @@ -27,8 +27,7 @@ in { ExecStart = "${pkgs.webcord-vencord}/bin/webcord"; }; - Install.WantedBy = [ "graphical-session.target" ]; + Install.WantedBy = ["graphical-session.target"]; }; }; } - diff --git a/home/programs/graphical/bars/eww/default.nix b/home/programs/graphical/bars/eww/default.nix index a6a680f..f10dd02 100644 --- a/home/programs/graphical/bars/eww/default.nix +++ b/home/programs/graphical/bars/eww/default.nix @@ -1,4 +1,4 @@ -{ +{ lib, pkgs, osConfig, @@ -6,7 +6,7 @@ }: let inherit (lib) mkIf; - scriptPkgs = (import ../../../../packages/cli/scripts/packages {inherit pkgs;}); + scriptPkgs = import ../../../../packages/cli/scripts/packages {inherit pkgs;}; cfg = osConfig.myOptions.home-manager.programs.bars.eww; in { @@ -17,7 +17,7 @@ in { }; systemd.user.services = { - "eww" = let + "eww" = let # All dependencies required for eww and for the scripts/widgets it uses dependencies = with pkgs; [ python3 @@ -44,8 +44,8 @@ in { in { Unit = { Description = "ElKowar's Wacky Widgets (eww) daemon"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; + After = ["graphical-session-pre.target"]; + PartOf = ["graphical-session.target"]; }; Service = { @@ -63,14 +63,14 @@ in { Nice = 19; }; - Install.WantedBy = [ "graphical-session.target" ]; + Install.WantedBy = ["graphical-session.target"]; }; "eww-window-bar0" = { Unit = { Description = "Open bar0 eww (ElKowar's Wacky Widgets) window"; - After = [ "eww.service" ]; - PartOf = [ "graphical-session.target" "eww.service" ]; + After = ["eww.service"]; + PartOf = ["graphical-session.target" "eww.service"]; }; Service = { @@ -82,7 +82,7 @@ in { Restart = "on-failure"; }; - Install.WantedBy = [ "graphical-session.target" ]; + Install.WantedBy = ["graphical-session.target"]; }; }; }; diff --git a/home/programs/graphical/browsers/chromium/default.nix b/home/programs/graphical/browsers/chromium/default.nix index dae25da..e428076 100644 --- a/home/programs/graphical/browsers/chromium/default.nix +++ b/home/programs/graphical/browsers/chromium/default.nix @@ -14,7 +14,8 @@ in { enable = true; package = pkgs.ungoogled-chromium.override { - commandLineArgs = [ + commandLineArgs = + [ # Ungoogled features "--disable-search-engine-collection" "--extension-mime-request-handling=always-prompt-for-install" @@ -60,12 +61,12 @@ in { "--disable-sync" "--disable-speech-api" "--disable-speech-synthesis-api" - ] ++ optionals isWayland [ + ] + ++ optionals isWayland [ "--ozone-platform=wayland" "--enable-features=UseOzonePlatform" - ]; + ]; }; }; }; } - diff --git a/home/programs/graphical/browsers/default.nix b/home/programs/graphical/browsers/default.nix index 23b88ae..d38399c 100644 --- a/home/programs/graphical/browsers/default.nix +++ b/home/programs/graphical/browsers/default.nix @@ -6,4 +6,3 @@ _: { ./firefox ]; } - diff --git a/home/programs/graphical/browsers/schizofox/default.nix b/home/programs/graphical/browsers/schizofox/default.nix index 82c93a1..0582a72 100644 --- a/home/programs/graphical/browsers/schizofox/default.nix +++ b/home/programs/graphical/browsers/schizofox/default.nix @@ -34,7 +34,7 @@ in { search = { defaultSearchEngine = "Brave"; - removeEngines = [ "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect" ]; + removeEngines = ["Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect"]; searxUrl = "https://searx.be"; searxQuery = "https://searx.be/search?q={searchTerms}&categories=general"; @@ -47,32 +47,32 @@ in { URLTemplate = "https://search.brave.com/search?q={searchTerms}"; } { - Name = "NixOS Packages"; - Description = "NixOS Unstable package search"; - Alias = "!np"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; + Name = "NixOS Packages"; + Description = "NixOS Unstable package search"; + Alias = "!np"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; } { - Name = "NixOS Options"; - Description = "NixOS Unstable option search"; - Alias = "!no"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; + Name = "NixOS Options"; + Description = "NixOS Unstable option search"; + Alias = "!no"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; } { - Name = "NixOS Wiki"; - Description = "NixOS Wiki search"; - Alias = "!nw"; - Method = "GET"; - URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; + Name = "NixOS Wiki"; + Description = "NixOS Wiki search"; + Alias = "!nw"; + Method = "GET"; + URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; } { - Name = "Home Manager Options"; - Description = "Home Manager option search"; - Alias = "!hm"; - Method = "GET"; - URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; + Name = "Home Manager Options"; + Description = "Home Manager option search"; + Alias = "!hm"; + Method = "GET"; + URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; } { Name = "MyNixOS"; @@ -82,25 +82,25 @@ in { URLTemplate = "https://mynixos.com/search?q={searchTerms}"; } { - Name = "Arch Wiki"; - Description = "Arch Wiki search"; - Alias = "!aw"; - Method = "GET"; - URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + Name = "Arch Wiki"; + Description = "Arch Wiki search"; + Alias = "!aw"; + Method = "GET"; + URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } { - Name = "Gentoo Wiki"; - Description = "Gentoo Wiki search"; - Alias = "!gw"; - Method = "GET"; - URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; + Name = "Gentoo Wiki"; + Description = "Gentoo Wiki search"; + Alias = "!gw"; + Method = "GET"; + URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; } { - Name = "Debian Wiki"; - Description = "Debian Wiki search"; - Alias = "!dw"; - Method = "GET"; - URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; + Name = "Debian Wiki"; + Description = "Debian Wiki search"; + Alias = "!dw"; + Method = "GET"; + URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; } ]; }; @@ -142,10 +142,10 @@ in { } ]; - extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = { install_url = mkUrl ext.name;};}) {} extensions; - in extraExtensions; + extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = {install_url = mkUrl ext.name;};}) {} extensions; + in + extraExtensions; }; }; }; } - diff --git a/home/programs/graphical/file-managers/pcmanfm-qt/default.nix b/home/programs/graphical/file-managers/pcmanfm-qt/default.nix index 5aa35da..b2973e0 100644 --- a/home/programs/graphical/file-managers/pcmanfm-qt/default.nix +++ b/home/programs/graphical/file-managers/pcmanfm-qt/default.nix @@ -10,7 +10,7 @@ cfgPreferences = osConfig.myOptions.home-manager.preferences; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ lxqt.pcmanfm-qt ]; + home.packages = with pkgs; [lxqt.pcmanfm-qt]; xdg.configFile."pcmanfm-qt/default/settings.conf".text = lib.generators.toINI {} { Behavior = { @@ -109,7 +109,7 @@ in { Thumbnail = { MaxExternalThumbnailFileSize = -1; - MaxThumbnailFileSize = 40960; # 40 MB + MaxThumbnailFileSize = 40960; # 40 MB ShowThumbnails = true; ThumbnailLocalFilesOnly = true; }; diff --git a/home/programs/graphical/games/prismlauncher.nix b/home/programs/graphical/games/prismlauncher.nix index ce39cb8..6fb6856 100644 --- a/home/programs/graphical/games/prismlauncher.nix +++ b/home/programs/graphical/games/prismlauncher.nix @@ -9,6 +9,6 @@ cfg = osConfig.myOptions.home-manager.programs.games.prismlauncher; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ prismlauncher ]; + home.packages = with pkgs; [prismlauncher]; }; } diff --git a/home/programs/graphical/launchers/walker/default.nix b/home/programs/graphical/launchers/walker/default.nix index 091daad..c96f0b2 100644 --- a/home/programs/graphical/launchers/walker/default.nix +++ b/home/programs/graphical/launchers/walker/default.nix @@ -8,7 +8,7 @@ inherit (lib) mkIf; cfg = osConfig.myOptions.home-manager.programs.launchers.walker; in { - imports = [ inputs.walker.homeManagerModules.walker ]; + imports = [inputs.walker.homeManagerModules.walker]; config = mkIf cfg.enable { programs.walker = { enable = true; @@ -25,13 +25,13 @@ in { fullscreen = false; scrollbar_policy = "automatic"; websearch = { - engines = ["google" "duckduckgo"]; + engines = ["google" "duckduckgo"]; }; hyprland = { context_aware_history = false; }; applications = { - enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically + enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically }; # Mode for picking the entry with keyboard using labels @@ -48,7 +48,7 @@ in { hide_spinner = false; }; runner = { - excludes = ["rm"]; # commands to be excluded from the runner + excludes = ["rm"]; # commands to be excluded from the runner }; clipboard = { max_entries = 10; @@ -82,7 +82,7 @@ in { }; orientation = "vertical"; icons = { - theme = ""; # GTK Icon theme (default) + theme = ""; # GTK Icon theme (default) hide = false; size = 28; image_height = 200; @@ -127,7 +127,7 @@ in { switcher_exclusive = true; } { - name = "websearch"; # uses google + name = "websearch"; # uses google prefix = ""; switcher_exclusive = true; } diff --git a/home/programs/graphical/wms/hyprland/config/gestures.nix b/home/programs/graphical/wms/hyprland/config/gestures.nix index 7c3923d..81d4ac0 100644 --- a/home/programs/graphical/wms/hyprland/config/gestures.nix +++ b/home/programs/graphical/wms/hyprland/config/gestures.nix @@ -10,4 +10,3 @@ }; }; } - diff --git a/home/programs/graphical/wms/hyprland/config/input.nix b/home/programs/graphical/wms/hyprland/config/input.nix index e5a49b4..31ca064 100644 --- a/home/programs/graphical/wms/hyprland/config/input.nix +++ b/home/programs/graphical/wms/hyprland/config/input.nix @@ -1,7 +1,4 @@ -{ - osConfig, - ... -}: let +{osConfig, ...}: let cfg = osConfig.myOptions.home-manager.wms.hyprland; in { wayland.windowManager.hyprland.settings = { @@ -29,4 +26,3 @@ in { monitor = cfg.monitor; }; } - diff --git a/home/programs/graphical/wms/hyprland/config/keybinds.nix b/home/programs/graphical/wms/hyprland/config/keybinds.nix index cfa21d1..e1f632e 100644 --- a/home/programs/graphical/wms/hyprland/config/keybinds.nix +++ b/home/programs/graphical/wms/hyprland/config/keybinds.nix @@ -1,4 +1,8 @@ -{ config, osConfig, ... }: let +{ + config, + osConfig, + ... +}: let cfgPreferences = osConfig.myOptions.home-manager.preferences; in { wayland.windowManager.hyprland = { @@ -15,13 +19,13 @@ in { "$SCREENSHOT_DELAY" = "2000"; bind = [ - # + # # Active window # "SUPER, W, killactive," "SUPER, F, togglefloating," "SUPER, Space, fullscreen, 0" - "SUPER_SHIFT, Space, fullscreen, 1" # maximize + "SUPER_SHIFT, Space, fullscreen, 1" # maximize "CTRL_SHIFT, Space, exec, toggle-fake-fullscreen" # fake fullscreen + custom border "SUPER_SHIFT, S, layoutmsg, togglesplit" @@ -191,7 +195,6 @@ in { # Global keybinds (passing keys to other programs) # "CTRL, F10, pass, ^(com\.obsproject\.Studio)$" - ]; # Mouse bindings diff --git a/home/programs/graphical/wms/hyprland/config/layout.nix b/home/programs/graphical/wms/hyprland/config/layout.nix index a35c564..93b3c2d 100644 --- a/home/programs/graphical/wms/hyprland/config/layout.nix +++ b/home/programs/graphical/wms/hyprland/config/layout.nix @@ -1,6 +1,6 @@ { wayland.windowManager.hyprland.settings = { - general.layout = "dwindle"; + general.layout = "dwindle"; dwindle = { # Don't change the split (side/top) regardless of what happens to the container diff --git a/home/programs/graphical/wms/hyprland/config/misc.nix b/home/programs/graphical/wms/hyprland/config/misc.nix index b101754..1deeff8 100644 --- a/home/programs/graphical/wms/hyprland/config/misc.nix +++ b/home/programs/graphical/wms/hyprland/config/misc.nix @@ -9,7 +9,7 @@ focus_on_activate = true; # Auto-reload is unnecessary on NixOS, config is readonly - disable_autoreload = true; + disable_autoreload = true; # Enable DPMS on these actions mouse_move_enables_dpms = true; diff --git a/home/programs/graphical/wms/hyprland/config/style.nix b/home/programs/graphical/wms/hyprland/config/style.nix index d3cdedf..a29ad00 100644 --- a/home/programs/graphical/wms/hyprland/config/style.nix +++ b/home/programs/graphical/wms/hyprland/config/style.nix @@ -1,10 +1,5 @@ -{ - config, - ... -}: -{ +{config, ...}: { wayland.windowManager.hyprland.settings = { - # # Window gaps # @@ -34,12 +29,12 @@ group = { # Groupped windows - "col.border_active" = "rgba(00A500FF)"; # green - "col.border_inactive" = "rgba(5AA500FF)"; # transparent green + "col.border_active" = "rgba(00A500FF)"; # green + "col.border_inactive" = "rgba(5AA500FF)"; # transparent green # Locked groupped windows - "col.border_locked_active" = "rgba(A0A500FF)"; # yellow - "col.border_locked_inactive" = "rgba(A0A500AA)"; # transparent yellow + "col.border_locked_active" = "rgba(A0A500FF)"; # yellow + "col.border_locked_inactive" = "rgba(A0A500AA)"; # transparent yellow }; # @@ -52,7 +47,7 @@ render_titles = false; # disable, looks kinda bad font_family = "Monaspace Krypton"; font_size = 11; - text_color = "rgba(FFFFFFFF)"; # white + text_color = "rgba(FFFFFFFF)"; # white # Gradients should be enabled only if title rendering is also enabled # on their own, they look really bad @@ -81,7 +76,6 @@ "col.shadow_inactive" = "rgba(0F0F0F99)"; }; - # # Window Blur # @@ -92,7 +86,6 @@ passes = 1; }; - # # Dim inactive windows # @@ -107,7 +100,7 @@ # # Animation # - + animations = { enabled = true; first_launch_animation = true; # fade in on first launch @@ -124,4 +117,3 @@ misc.animate_manual_resizes = true; }; } - diff --git a/home/programs/graphical/wms/hyprland/config/window_rules.nix b/home/programs/graphical/wms/hyprland/config/window_rules.nix index a1eca99..c242816 100644 --- a/home/programs/graphical/wms/hyprland/config/window_rules.nix +++ b/home/programs/graphical/wms/hyprland/config/window_rules.nix @@ -109,4 +109,3 @@ ]; }; } - diff --git a/home/programs/graphical/wms/hyprland/default.nix b/home/programs/graphical/wms/hyprland/default.nix index 3c6f834..a17cde1 100644 --- a/home/programs/graphical/wms/hyprland/default.nix +++ b/home/programs/graphical/wms/hyprland/default.nix @@ -6,7 +6,7 @@ }: let inherit (lib) mkIf; - hyprPkgs = (import ./packages {inherit pkgs;}); + hyprPkgs = import ./packages {inherit pkgs;}; # TODO: Switch to flake hyprlandPkg = pkgs.hyprland; @@ -15,7 +15,7 @@ cfg = osConfig.myOptions.home-manager.wms.hyprland; in { imports = [ - ./config + ./config ]; config = mkIf cfg.enable { diff --git a/home/programs/graphical/wms/hyprland/packages/brightness/default.nix b/home/programs/graphical/wms/hyprland/packages/brightness/default.nix index 609c6ff..e06b956 100644 --- a/home/programs/graphical/wms/hyprland/packages/brightness/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/brightness/default.nix @@ -1,4 +1,4 @@ {pkgs, ...}: - pkgs.writeShellScriptBin "brightness" '' - ${builtins.readFile ./brightness.sh} - '' +pkgs.writeShellScriptBin "brightness" '' + ${builtins.readFile ./brightness.sh} +'' diff --git a/home/programs/graphical/wms/hyprland/packages/default.nix b/home/programs/graphical/wms/hyprland/packages/default.nix index 715d5f4..32f5cf4 100644 --- a/home/programs/graphical/wms/hyprland/packages/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: let +{pkgs, ...}: let packages = { hyprland-move-window = pkgs.callPackage ./hyprland-move-window {}; brightness = pkgs.callPackage ./brightness {}; diff --git a/home/programs/graphical/wms/hyprland/packages/hyprland-move-window/default.nix b/home/programs/graphical/wms/hyprland/packages/hyprland-move-window/default.nix index 1bcd3a6..12748e6 100644 --- a/home/programs/graphical/wms/hyprland/packages/hyprland-move-window/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/hyprland-move-window/default.nix @@ -1,5 +1,4 @@ {pkgs, ...}: - pkgs.writeShellScriptBin "hyprland-move-window" '' - ${builtins.readFile ./hyprland-move-window.sh} - '' - +pkgs.writeShellScriptBin "hyprland-move-window" '' + ${builtins.readFile ./hyprland-move-window.sh} +'' diff --git a/home/programs/graphical/wms/hyprland/packages/quick-record/default.nix b/home/programs/graphical/wms/hyprland/packages/quick-record/default.nix index 7d85224..3b145ba 100644 --- a/home/programs/graphical/wms/hyprland/packages/quick-record/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/quick-record/default.nix @@ -13,4 +13,3 @@ pkgs.writeShellApplication { ${builtins.readFile ./quick-record.sh} ''; } - diff --git a/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/default.nix b/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/default.nix index 27f8303..071f1ce 100644 --- a/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/default.nix @@ -10,5 +10,3 @@ pkgs.writeShellApplication { ${builtins.readFile ./toggle-fake-fullscreen.sh} ''; } - - diff --git a/home/programs/graphical/wms/hyprland/packages/toggle-notifications/default.nix b/home/programs/graphical/wms/hyprland/packages/toggle-notifications/default.nix index bf909f0..81f688c 100644 --- a/home/programs/graphical/wms/hyprland/packages/toggle-notifications/default.nix +++ b/home/programs/graphical/wms/hyprland/packages/toggle-notifications/default.nix @@ -10,6 +10,3 @@ pkgs.writeShellApplication { ${builtins.readFile ./toggle-notifications.sh} ''; } - - - diff --git a/home/programs/terminal/coding/python/ipython.nix b/home/programs/terminal/coding/python/ipython.nix index 13c3b22..a82d0b0 100644 --- a/home/programs/terminal/coding/python/ipython.nix +++ b/home/programs/terminal/coding/python/ipython.nix @@ -9,6 +9,6 @@ cfg = osConfig.myOptions.home-manager.programs.coding.python; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ python312Packages.ipython ]; + home.packages = with pkgs; [python312Packages.ipython]; }; } diff --git a/home/programs/terminal/coding/python/mypy.nix b/home/programs/terminal/coding/python/mypy.nix index 1d086f5..b56d9b4 100644 --- a/home/programs/terminal/coding/python/mypy.nix +++ b/home/programs/terminal/coding/python/mypy.nix @@ -9,6 +9,6 @@ cfg = osConfig.myOptions.home-manager.programs.coding.python; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ python312Packages.mypy ]; + home.packages = with pkgs; [python312Packages.mypy]; }; } diff --git a/home/programs/terminal/coding/python/pyright.nix b/home/programs/terminal/coding/python/pyright.nix index 58c884a..b709147 100644 --- a/home/programs/terminal/coding/python/pyright.nix +++ b/home/programs/terminal/coding/python/pyright.nix @@ -9,6 +9,6 @@ cfg = osConfig.myOptions.home-manager.programs.coding.python; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ pyright ]; + home.packages = with pkgs; [pyright]; }; } diff --git a/home/programs/terminal/coding/python/ruff.nix b/home/programs/terminal/coding/python/ruff.nix index 0ed47be..cd0d49f 100644 --- a/home/programs/terminal/coding/python/ruff.nix +++ b/home/programs/terminal/coding/python/ruff.nix @@ -15,52 +15,52 @@ in { line-length = 119; lint = { select = [ - "F" # Pyflakes - "E" # Pycodestyle (errors) - "W" # Pycodestyle (warnigns) - "N" # pep8-naming - "D" # pydocstyle - "UP" # pyupgrade - "YTT" # flake8-2020 - "ANN" # flake8-annotations + "F" # Pyflakes + "E" # Pycodestyle (errors) + "W" # Pycodestyle (warnigns) + "N" # pep8-naming + "D" # pydocstyle + "UP" # pyupgrade + "YTT" # flake8-2020 + "ANN" # flake8-annotations "ASYNC" # flake8-async - "S" # flake8-bandit - "BLE" # flake8-blind-except - "B" # flake8-bugbear - "A" # flake8-builtins - "COM" # flake8-commas - "C4" # flake8-comprehensions - "DTZ" # flake8-datetimez - "T10" # flake8-debugger - "EM" # flake8-errmsg - "EXE" # flake8-executable - "FA" # flake8-future-annotations - "ISC" # flake8-implicit-str-concat - "ICN" # flake8-import-conventions - "LOG" # flake8-logging - "G" # flake8-logging-format - "INP" # flake8-no-pep420 - "PIE" # flake8-pie - "T20" # flake8-print - "PYI" # flake8-pyi - "PT" # flake8-pytest-style - "Q" # flake8-quotes - "RSE" # flake8-raise - "RET" # flake8-return - "SLOT" # flake8-slots - "SIM" # flake8-simplify - "TID" # flake8-tidy-imports - "TCH" # flake8-type-checking - "INT" # flake8-gettext - "PTH" # flake8-use-pathlib - "TD" # flake8-todos - "ERA" # flake8-eradicate - "PGH" # pygrep-hooks - "PL" # pylint - "TRY" # tryceratops - "FLY" # flynt - "PERF" # perflint - "RUF" # ruff-specific rules + "S" # flake8-bandit + "BLE" # flake8-blind-except + "B" # flake8-bugbear + "A" # flake8-builtins + "COM" # flake8-commas + "C4" # flake8-comprehensions + "DTZ" # flake8-datetimez + "T10" # flake8-debugger + "EM" # flake8-errmsg + "EXE" # flake8-executable + "FA" # flake8-future-annotations + "ISC" # flake8-implicit-str-concat + "ICN" # flake8-import-conventions + "LOG" # flake8-logging + "G" # flake8-logging-format + "INP" # flake8-no-pep420 + "PIE" # flake8-pie + "T20" # flake8-print + "PYI" # flake8-pyi + "PT" # flake8-pytest-style + "Q" # flake8-quotes + "RSE" # flake8-raise + "RET" # flake8-return + "SLOT" # flake8-slots + "SIM" # flake8-simplify + "TID" # flake8-tidy-imports + "TCH" # flake8-type-checking + "INT" # flake8-gettext + "PTH" # flake8-use-pathlib + "TD" # flake8-todos + "ERA" # flake8-eradicate + "PGH" # pygrep-hooks + "PL" # pylint + "TRY" # tryceratops + "FLY" # flynt + "PERF" # perflint + "RUF" # ruff-specific rules ]; ignore = [ "D100" # Missing docstring in public module @@ -100,25 +100,25 @@ in { "TD002" # Missing author in TODO "TD003" # Missing issue link on the line following this TODO - "PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this - "TRY003" # No f-strings in raise statements - "EM101" # No string literals in exception init - "EM102" # No f-strings in exception init - "UP024" # Using errors that alias OSError + "PT011" # pytest.raises without match parameter is too broad # TODO: Unignore this + "TRY003" # No f-strings in raise statements + "EM101" # No string literals in exception init + "EM102" # No f-strings in exception init + "UP024" # Using errors that alias OSError "PLR2004" # Using unnamed numerical constants - "PGH003" # Using specific rule codes in type ignores - "E731" # Don't asign a lambda expression, use a def + "PGH003" # Using specific rule codes in type ignores + "E731" # Don't asign a lambda expression, use a def # Redundant rules with ruff-format: - "E111" # Indentation of a non-multiple of 4 spaces - "E114" # Comment with indentation of a non-multiple of 4 spaces - "E117" # Cheks for over-indented code - "D206" # Checks for docstrings indented with tabs - "D300" # Checks for docstring that use ''' instead of """ - "Q000" # Checks of inline strings that use wrong quotes (' instead of ") - "Q001" # Multiline string that use wrong quotes (''' instead of """) - "Q002" # Checks for docstrings that use wrong quotes (''' instead of """) - "Q003" # Checks for avoidable escaped quotes ("\"" -> '"') + "E111" # Indentation of a non-multiple of 4 spaces + "E114" # Comment with indentation of a non-multiple of 4 spaces + "E117" # Cheks for over-indented code + "D206" # Checks for docstrings indented with tabs + "D300" # Checks for docstring that use ''' instead of """ + "Q000" # Checks of inline strings that use wrong quotes (' instead of ") + "Q001" # Multiline string that use wrong quotes (''' instead of """) + "Q002" # Checks for docstrings that use wrong quotes (''' instead of """) + "Q003" # Checks for avoidable escaped quotes ("\"" -> '"') "COM812" # Missing trailing comma (in multi-line lists/tuples/...) "COM819" # Prohibited trailing comma (in single-line lists/tuples/...) "ISC001" # Single line implicit string concatenation ("hi" "hey" -> "hihey") @@ -126,7 +126,7 @@ in { ]; extend-per-file-ignores = { "tests/*" = [ - "ANN" # flake8-annotations + "ANN" # flake8-annotations "S101" # Use of assert ]; "docs/conf.py" = [ @@ -139,10 +139,10 @@ in { combine-as-imports = true; # Redundant rules with ruff-format - force-single-line = false; # forces all imports to appear on their own line - force-wrap-aliases = false; # Split imports with multiple members and at least one alias - lines-after-imports = -1; # The number of blank lines to place after imports - lines-between-types = 0; # Number of lines to place between "direct" and import from imports + force-single-line = false; # forces all imports to appear on their own line + force-wrap-aliases = false; # Split imports with multiple members and at least one alias + lines-after-imports = -1; # The number of blank lines to place after imports + lines-between-types = 0; # Number of lines to place between "direct" and import from imports split-on-trailing-comma = false; # if last member of multiline import has a comma, don't fold it to single line }; pylint = { diff --git a/home/programs/terminal/coding/python/rye.nix b/home/programs/terminal/coding/python/rye.nix index 3ac8e9a..8dae6fa 100644 --- a/home/programs/terminal/coding/python/rye.nix +++ b/home/programs/terminal/coding/python/rye.nix @@ -13,7 +13,7 @@ in { config = mkIf cfg.enable { home = { - packages = with pkgs; [ rye ]; + packages = with pkgs; [rye]; sessionVariables = { RYE_HOME = "${config.xdg.configHome}/rye"; @@ -32,7 +32,7 @@ in { # see: xdg.configFile."rye/config.toml".source = toTOML "config.toml" { default.license = "GPL-3.0-or-later"; - behavior.global-python=true; + behavior.global-python = true; }; }; } diff --git a/home/programs/terminal/emulators/default.nix b/home/programs/terminal/emulators/default.nix index 6be43fd..9655557 100644 --- a/home/programs/terminal/emulators/default.nix +++ b/home/programs/terminal/emulators/default.nix @@ -1,4 +1,4 @@ -# Note: Pretty much all of these configurations were copied from +# Note: Pretty much all of these configurations were copied from # https://git.notashelf.dev/NotAShelf/nyx, there may be some small # adjustments made to them but the majority of the credit goes to # notashelf. @@ -8,5 +8,3 @@ _: { ./kitty.nix ]; } - - diff --git a/home/programs/terminal/emulators/foot.nix b/home/programs/terminal/emulators/foot.nix index f780e38..f57cafc 100644 --- a/home/programs/terminal/emulators/foot.nix +++ b/home/programs/terminal/emulators/foot.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = with pkgs; [ libsixel # for displaying images ]; @@ -62,4 +59,3 @@ }; }; } - diff --git a/home/programs/terminal/emulators/kitty.nix b/home/programs/terminal/emulators/kitty.nix index 98e1389..9fec6fb 100644 --- a/home/programs/terminal/emulators/kitty.nix +++ b/home/programs/terminal/emulators/kitty.nix @@ -92,4 +92,3 @@ in { }; }; } - diff --git a/home/programs/terminal/file-managers/default.nix b/home/programs/terminal/file-managers/default.nix index da5226a..aacd692 100644 --- a/home/programs/terminal/file-managers/default.nix +++ b/home/programs/terminal/file-managers/default.nix @@ -1,4 +1,4 @@ -# Note: Pretty much all of these configurations were copied from +# Note: Pretty much all of these configurations were copied from # https://git.notashelf.dev/NotAShelf/nyx, there may be some small # adjustments made to them but the majority of the credit goes to # notashelf. @@ -9,4 +9,3 @@ _: { ./ranger.nix ]; } - diff --git a/home/programs/terminal/file-managers/ranger.nix b/home/programs/terminal/file-managers/ranger.nix index 5013ee7..21be2e7 100644 --- a/home/programs/terminal/file-managers/ranger.nix +++ b/home/programs/terminal/file-managers/ranger.nix @@ -16,4 +16,3 @@ in { ${(optionalString config.programs.kitty.enable "set preview_images_method kitty")} ''; } - diff --git a/home/programs/terminal/file-managers/xplr/default.nix b/home/programs/terminal/file-managers/xplr/default.nix index 271714f..94f6109 100644 --- a/home/programs/terminal/file-managers/xplr/default.nix +++ b/home/programs/terminal/file-managers/xplr/default.nix @@ -49,4 +49,3 @@ } ''; } - diff --git a/home/programs/terminal/file-managers/xplr/plugins.nix b/home/programs/terminal/file-managers/xplr/plugins.nix index e299b24..8a7687f 100644 --- a/home/programs/terminal/file-managers/xplr/plugins.nix +++ b/home/programs/terminal/file-managers/xplr/plugins.nix @@ -12,4 +12,3 @@ pkgs: { hash = "sha256-k/yre9SYNPYBM2W1DPpL6Ypt3w3EMO9dznHwa+fw/n0="; }; } - diff --git a/home/programs/terminal/file-managers/yazi/default.nix b/home/programs/terminal/file-managers/yazi/default.nix index e9c6e2a..d61ccb5 100644 --- a/home/programs/terminal/file-managers/yazi/default.nix +++ b/home/programs/terminal/file-managers/yazi/default.nix @@ -38,4 +38,3 @@ }; }; } - diff --git a/home/programs/terminal/file-managers/yazi/theme/icons.nix b/home/programs/terminal/file-managers/yazi/theme/icons.nix index fb46856..987527a 100644 --- a/home/programs/terminal/file-managers/yazi/theme/icons.nix +++ b/home/programs/terminal/file-managers/yazi/theme/icons.nix @@ -144,4 +144,3 @@ "*.pkg" = ""; }; } - diff --git a/home/programs/terminal/file-managers/yazi/theme/manager.nix b/home/programs/terminal/file-managers/yazi/theme/manager.nix index 13acca3..53e67a7 100644 --- a/home/programs/terminal/file-managers/yazi/theme/manager.nix +++ b/home/programs/terminal/file-managers/yazi/theme/manager.nix @@ -61,4 +61,3 @@ syntect_theme = ""; }; } - diff --git a/home/programs/terminal/file-managers/yazi/theme/status.nix b/home/programs/terminal/file-managers/yazi/theme/status.nix index 8393f1a..878deb7 100644 --- a/home/programs/terminal/file-managers/yazi/theme/status.nix +++ b/home/programs/terminal/file-managers/yazi/theme/status.nix @@ -43,4 +43,3 @@ permissions_s = {fg = "darkgray";}; }; } - diff --git a/home/programs/terminal/shell/zsh/aliases.nix b/home/programs/terminal/shell/zsh/aliases.nix index 2abf7c9..ac03bf3 100644 --- a/home/programs/terminal/shell/zsh/aliases.nix +++ b/home/programs/terminal/shell/zsh/aliases.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, ... }: -let - nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; -in { + config, + pkgs, + lib, + ... +}: let + nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; +in { programs.zsh.shellAliases = { # I'm not the greatest typist sl = "ls"; diff --git a/home/programs/terminal/shell/zsh/default.nix b/home/programs/terminal/shell/zsh/default.nix index 7d6094f..48743cb 100644 --- a/home/programs/terminal/shell/zsh/default.nix +++ b/home/programs/terminal/shell/zsh/default.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { imports = [ ./plugins.nix ./aliases.nix diff --git a/home/programs/terminal/shell/zsh/init.nix b/home/programs/terminal/shell/zsh/init.nix index 6d81346..e9759b1 100644 --- a/home/programs/terminal/shell/zsh/init.nix +++ b/home/programs/terminal/shell/zsh/init.nix @@ -1,12 +1,9 @@ -_: -let +_: let inherit (builtins) readFile; -in -{ - - # I prefer having the rc files split across multiple files in my system rather +in { + # I prefer having the rc files split across multiple files in my system rather # than just using readFile and putting them all into the generated zshrc - # this also allows me to source them individually if I need to + # this also allows me to source them individually if I need to # (like in the anonymize function with my prompt) home.file = { # TODO: Load these dynamically, by going over all files in ./rc diff --git a/home/programs/terminal/shell/zsh/plugins.nix b/home/programs/terminal/shell/zsh/plugins.nix index 8f0c72a..80201c0 100644 --- a/home/programs/terminal/shell/zsh/plugins.nix +++ b/home/programs/terminal/shell/zsh/plugins.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: -let - inherit (pkgs) fetchFromGitHub; -in { + config, + pkgs, + ... +}: let + inherit (pkgs) fetchFromGitHub; +in { programs.zsh.plugins = [ { name = "zsh-nix-shell"; diff --git a/home/programs/terminal/tools/direnv.nix b/home/programs/terminal/tools/direnv.nix index 03abe16..212361d 100644 --- a/home/programs/terminal/tools/direnv.nix +++ b/home/programs/terminal/tools/direnv.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { home.sessionVariables = { - DIRENV_LOG_FORMAT=""; + DIRENV_LOG_FORMAT = ""; }; programs.direnv = { enable = true; diff --git a/home/programs/terminal/tools/fastfetch.nix b/home/programs/terminal/tools/fastfetch.nix index ae82717..5cb26c1 100644 --- a/home/programs/terminal/tools/fastfetch.nix +++ b/home/programs/terminal/tools/fastfetch.nix @@ -11,4 +11,3 @@ in { programs.fastfetch.enable = true; }; } - diff --git a/home/programs/terminal/tools/git/aliases.nix b/home/programs/terminal/tools/git/aliases.nix index 7972a97..ea2ea75 100644 --- a/home/programs/terminal/tools/git/aliases.nix +++ b/home/programs/terminal/tools/git/aliases.nix @@ -1,9 +1,5 @@ -{ - pkgs, - ... -}: let - - scriptPkgs = (import ./bin {inherit pkgs;}); +{pkgs, ...}: let + scriptPkgs = import ./bin {inherit pkgs;}; in { programs.git = { aliases = { @@ -70,6 +66,8 @@ in { set-upstream = "!git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`"; + fixup-picker = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"; + staash = "stash --all"; stash-staged = "!sh -c 'git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}'"; diff --git a/home/programs/terminal/tools/git/bin/better-git-branch/default.nix b/home/programs/terminal/tools/git/bin/better-git-branch/default.nix index 80b4517..0dd693c 100644 --- a/home/programs/terminal/tools/git/bin/better-git-branch/default.nix +++ b/home/programs/terminal/tools/git/bin/better-git-branch/default.nix @@ -1,4 +1,4 @@ {pkgs, ...}: - pkgs.writeShellScriptBin "better-git-branch" '' - ${builtins.readFile ./better-git-branch.sh} - '' +pkgs.writeShellScriptBin "better-git-branch" '' + ${builtins.readFile ./better-git-branch.sh} +'' diff --git a/home/programs/terminal/tools/git/bin/default.nix b/home/programs/terminal/tools/git/bin/default.nix index 8cf9cb0..5952aac 100644 --- a/home/programs/terminal/tools/git/bin/default.nix +++ b/home/programs/terminal/tools/git/bin/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: let +{pkgs, ...}: let packages = { better-git-branch = pkgs.callPackage ./better-git-branch {}; }; diff --git a/home/programs/terminal/tools/git/default.nix b/home/programs/terminal/tools/git/default.nix index 2bb104d..df6e673 100644 --- a/home/programs/terminal/tools/git/default.nix +++ b/home/programs/terminal/tools/git/default.nix @@ -1,8 +1,10 @@ -{ osConfig, pkgs, ... }: -let - myGitConf = osConfig.myOptions.home-manager.git; -in { + osConfig, + pkgs, + ... +}: let + myGitConf = osConfig.myOptions.home-manager.git; +in { imports = [ ./gh.nix ./ignores.nix diff --git a/home/programs/terminal/tools/git/gh.nix b/home/programs/terminal/tools/git/gh.nix index 05e2e69..b8c8f3d 100644 --- a/home/programs/terminal/tools/git/gh.nix +++ b/home/programs/terminal/tools/git/gh.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.gh = { enable = true; gitCredentialHelper.enable = false; diff --git a/home/programs/terminal/tools/gpg.nix b/home/programs/terminal/tools/gpg.nix index eb75a87..4650756 100644 --- a/home/programs/terminal/tools/gpg.nix +++ b/home/programs/terminal/tools/gpg.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{config, ...}: { programs = { gpg = { enable = true; diff --git a/home/programs/terminal/tools/iamb.nix b/home/programs/terminal/tools/iamb.nix index 31ad96d..1e10f95 100644 --- a/home/programs/terminal/tools/iamb.nix +++ b/home/programs/terminal/tools/iamb.nix @@ -10,7 +10,7 @@ cfg = osConfig.myOptions.home-manager.programs.applications.iamb; in { config = mkIf cfg.enable { - home.packages = with pkgs; [ iamb ]; + home.packages = with pkgs; [iamb]; xdg.configFile."iamb/config.json".text = builtins.toJSON { settings = { @@ -33,10 +33,12 @@ in { }; default_profile = cfg.defaultProfile; - profiles = lib.mapAttrs (name: profile: { - user_id = profile.userId; - url = profile.homeServer; - }) cfg.profiles; + profiles = + lib.mapAttrs (name: profile: { + user_id = profile.userId; + url = profile.homeServer; + }) + cfg.profiles; dirs = { cache = "${config.xdg.cacheHome}/iamb/"; diff --git a/home/programs/terminal/tools/newsboat/default.nix b/home/programs/terminal/tools/newsboat/default.nix index 9b538b6..3075475 100644 --- a/home/programs/terminal/tools/newsboat/default.nix +++ b/home/programs/terminal/tools/newsboat/default.nix @@ -1,5 +1,9 @@ # Config copied from https://git.notashelf.dev/NotAShelf/nyx -{ pkgs, lib, ... }: let +{ + pkgs, + lib, + ... +}: let inherit (lib) getExe; mpv = "${getExe pkgs.mpv}"; @@ -69,5 +73,5 @@ in { macro v set browser "${mpv} %u" ; open-in-browser ; set browser "firefox %u" -- "Open video on mpv" macro , open-in-browser ''; - }; + }; } diff --git a/home/programs/terminal/tools/newsboat/urls.nix b/home/programs/terminal/tools/newsboat/urls.nix index 5164589..0b93e3c 100644 --- a/home/programs/terminal/tools/newsboat/urls.nix +++ b/home/programs/terminal/tools/newsboat/urls.nix @@ -57,4 +57,3 @@ {url = "https://kiszamolo.hu/feed";} ]; } - diff --git a/home/programs/terminal/tools/nix-index.nix b/home/programs/terminal/tools/nix-index.nix index 5b4df13..6d6eca9 100644 --- a/home/programs/terminal/tools/nix-index.nix +++ b/home/programs/terminal/tools/nix-index.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{config, ...}: { programs = { # nix-index is a file database for nixpkgs # this provides `nix-locate` command. diff --git a/home/programs/terminal/tools/ssh.nix b/home/programs/terminal/tools/ssh.nix index 76864dd..281ebfe 100644 --- a/home/programs/terminal/tools/ssh.nix +++ b/home/programs/terminal/tools/ssh.nix @@ -1,7 +1,6 @@ { programs = { ssh = { - # TODO: Enable this after figuring out how to add protected/encrypted blocks here. # I don't like the idea of expising IPs/hostnames in the config. # For now, I just persist the .ssh directory, managing stuff manually. diff --git a/home/programs/xdg/config-files.nix b/home/programs/xdg/config-files.nix index 18c1abf..6810d97 100644 --- a/home/programs/xdg/config-files.nix +++ b/home/programs/xdg/config-files.nix @@ -1,5 +1,5 @@ # Attribute set of files to link into the user's XDG directories -{ config, ... }: let +{config, ...}: let XDG_CACHE_HOME = config.xdg.cacheHome; XDG_CONFIG_HOME = config.xdg.configHome; XDG_DATA_HOME = config.xdg.dataHome; @@ -7,7 +7,6 @@ XDG_RUNTIME_DIR = config.home.sessionVariables.XDG_RUNTIME_DIR; XDG_BIN_HOME = config.home.sessionVariables.XDG_BIN_HOME; in { - # Variables set to force apps into the XDG base directories # These will get set at login # Defined in /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh @@ -47,7 +46,7 @@ in { }; # Create the following files in XDG_CONFIG_HOME, for purposes of - # forcing apps to use the XDG base directories + # forcing apps to use the XDG base directories xdg.configFile = { "npm/npmrc".text = '' prefix=${XDG_DATA_HOME}/npm @@ -77,7 +76,7 @@ in { # https://github.com/python/cpython/issues/105694 if not history.is_file(): - readline.write_history_file(str(history)) # breaks on macos + python3 without this. + readline.write_history_file(str(history)) # breaks on macos + python3 without this. readline.read_history_file(str(history)) atexit.register(readline.write_history_file, str(history)) diff --git a/home/programs/xdg/default.nix b/home/programs/xdg/default.nix index 9365821..b98884d 100644 --- a/home/programs/xdg/default.nix +++ b/home/programs/xdg/default.nix @@ -1,4 +1,8 @@ -{config, pkgs, ...}: { +{ + config, + pkgs, + ... +}: { imports = [ ./mime-apps.nix ./user-dirs.nix @@ -23,5 +27,5 @@ # xdg-ninja is a CLI tool that checks $HOME for unwanted # files/dirs and shows how to move them to XDG dirs - home.packages = [ pkgs.xdg-ninja ]; + home.packages = [pkgs.xdg-ninja]; } diff --git a/home/programs/xdg/mime-apps.nix b/home/programs/xdg/mime-apps.nix index a61b17c..47ca574 100644 --- a/home/programs/xdg/mime-apps.nix +++ b/home/programs/xdg/mime-apps.nix @@ -1,11 +1,8 @@ # Manage $XDG_CONFIG_HOME/mimeapps.list -{ - osConfig, - ... -}: let +{osConfig, ...}: let cfgPreferences = osConfig.myOptions.home-manager.preferences; in { - xdg.mimeApps = let + xdg.mimeApps = let browser = cfgPreferences.browser.desktop; textEditor = cfgPreferences.textEditor.desktop; emailClient = cfgPreferences.emailClient.desktop; diff --git a/home/programs/xdg/user-dirs.nix b/home/programs/xdg/user-dirs.nix index e7af269..8ea584d 100644 --- a/home/programs/xdg/user-dirs.nix +++ b/home/programs/xdg/user-dirs.nix @@ -1,5 +1,5 @@ # Manage $XDG_CONFIG_HOME/user-dirs.dirs -{ config, ... }: { +{config, ...}: { xdg.userDirs = { enable = true; createDirectories = true; diff --git a/home/services/default.nix b/home/services/default.nix index fa9f89a..ce60b8e 100644 --- a/home/services/default.nix +++ b/home/services/default.nix @@ -1,5 +1,5 @@ _: { - imports = [ + imports = [ ./dunst.nix ./hyprpaper.nix ]; diff --git a/home/services/hyprpaper.nix b/home/services/hyprpaper.nix index aad3a6a..ce14050 100644 --- a/home/services/hyprpaper.nix +++ b/home/services/hyprpaper.nix @@ -12,11 +12,11 @@ in { config = mkIf (cfg.enable && cfgIsWayland) { systemd.user.services.hyprpaper = { - Install.WantedBy = [ "hyprland-session.target" ]; + Install.WantedBy = ["hyprland-session.target"]; Unit = { Description = "Hyprpaper (Hyprland wallpaper daemon)"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; }; Service = { Type = "simple"; @@ -31,4 +31,3 @@ in { ''; }; } - diff --git a/home/themes/cursor.nix b/home/themes/cursor.nix index 265bdd2..cb85e04 100644 --- a/home/themes/cursor.nix +++ b/home/themes/cursor.nix @@ -1,7 +1,4 @@ -{ - osConfig, - ... -}: let +{osConfig, ...}: let cfg = osConfig.myOptions.home-manager.theme.cursor; in { home = { diff --git a/home/themes/gtk.nix b/home/themes/gtk.nix index 9c882c6..3905fa0 100644 --- a/home/themes/gtk.nix +++ b/home/themes/gtk.nix @@ -18,7 +18,11 @@ in { GTK_THEME = "${cfg.theme.name}"; # gtk applications should use filepickers specified by xdg - GTK_USE_PORTAL = "${toString (if cfg.usePortal then 1 else 0)}"; + GTK_USE_PORTAL = "${toString ( + if cfg.usePortal + then 1 + else 0 + )}"; }; }; diff --git a/home/themes/qt.nix b/home/themes/qt.nix index fadc173..6d4c007 100644 --- a/home/themes/qt.nix +++ b/home/themes/qt.nix @@ -11,8 +11,8 @@ in { qt = { enable = true; # just an override for QT_QPA_PLATFORMTHEME, takes "gtk", "gnome", "qtct" or "kde" - platformTheme.name = - if cfg.forceGtk + platformTheme.name = + if cfg.forceGtk then "gtk" else "qtct"; style = mkIf (!cfg.forceGtk) { @@ -80,7 +80,6 @@ in { }; "Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}"; - # Set icon theme using qtct "qt5ct/qt5ct.conf".text = lib.generators.toINI {} { Appearance = { diff --git a/hosts/default.nix b/hosts/default.nix index 084916d..ae296c6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -let +{inputs, ...}: let inherit (inputs) self; inherit (inputs.nixpkgs) lib; @@ -9,27 +8,30 @@ let ../home ../options ]; -in -{ +in { herugrim = lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit lib inputs self; }; - modules = [ - ./herugrim - inputs.home-manager.nixosModules.home-manager - inputs.impermanence.nixosModules.impermanence - inputs.lanzaboote.nixosModules.lanzaboote - ] ++ shared; + specialArgs = {inherit lib inputs self;}; + modules = + [ + ./herugrim + inputs.home-manager.nixosModules.home-manager + inputs.impermanence.nixosModules.impermanence + inputs.lanzaboote.nixosModules.lanzaboote + ] + ++ shared; }; voyager = lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit lib inputs self; }; - modules = [ - ./voyager - inputs.home-manager.nixosModules.home-manager - inputs.impermanence.nixosModules.impermanence - inputs.lanzaboote.nixosModules.lanzaboote - ] ++ shared; + specialArgs = {inherit lib inputs self;}; + modules = + [ + ./voyager + inputs.home-manager.nixosModules.home-manager + inputs.impermanence.nixosModules.impermanence + inputs.lanzaboote.nixosModules.lanzaboote + ] + ++ shared; }; } diff --git a/hosts/herugrim/default.nix b/hosts/herugrim/default.nix index 894c92d..2a83745 100644 --- a/hosts/herugrim/default.nix +++ b/hosts/herugrim/default.nix @@ -1,10 +1,13 @@ -{ lib, pkgs, ... }: { + lib, + pkgs, + ... +}: { imports = [ ./hardware-configuration.nix ]; - boot.supportedFilesystems = [ "btrfs" ]; + boot.supportedFilesystems = ["btrfs"]; # My flake disables this by default for security reasons. However, # with an encrypted setup, which requires entering password before @@ -42,7 +45,7 @@ # Configure automatic root subvolume wiping on boot from initrd autoWipeBtrfs = { enable = true; - devices."/dev/disk/by-label/NIXROOT".subvolumes = [ "root" ]; + devices."/dev/disk/by-label/NIXROOT".subvolumes = ["root"]; }; }; diff --git a/hosts/herugrim/hardware-configuration.nix b/hosts/herugrim/hardware-configuration.nix index 28065df..147a539 100644 --- a/hosts/herugrim/hardware-configuration.nix +++ b/hosts/herugrim/hardware-configuration.nix @@ -1,60 +1,64 @@ # 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, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXCRYPTROOT"; - fileSystems."/" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "btrfs"; - options = [ "subvol=root" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = ["subvol=root" "noatime" "compress=zstd:3"]; + }; - fileSystems."/home" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "btrfs"; - options = [ "subvol=home" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/home" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = ["subvol=home" "noatime" "compress=zstd:3"]; + }; - fileSystems."/nix" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "btrfs"; - options = [ "subvol=nix" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = ["subvol=nix" "noatime" "compress=zstd:3"]; + }; - fileSystems."/var/log" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "btrfs"; - options = [ "subvol=log" "noatime" "compress=zstd:3" ]; - neededForBoot = true; - }; + fileSystems."/var/log" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = ["subvol=log" "noatime" "compress=zstd:3"]; + neededForBoot = true; + }; - fileSystems."/persist" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "btrfs"; - options = [ "subvol=persist" "noatime" "compress=zstd:3" ]; - neededForBoot = true; - }; + fileSystems."/persist" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = ["subvol=persist" "noatime" "compress=zstd:3"]; + neededForBoot = true; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-label/NIXBOOT"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-label/SWAP"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-label/SWAP";} + ]; # 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/hosts/voyager/default.nix b/hosts/voyager/default.nix index c41e0bd..f7b668e 100644 --- a/hosts/voyager/default.nix +++ b/hosts/voyager/default.nix @@ -1,16 +1,18 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + lib, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; - boot.supportedFilesystems = [ "btrfs" ]; + boot.supportedFilesystems = ["btrfs"]; hardware.enableAllFirmware = true; # My flake disables this by default for security reasons. However, with an encrypted setup, @@ -120,7 +122,7 @@ # Configure automatic root subvolume wiping on boot from initrd autoWipeBtrfs = { enable = true; - devices."/dev/disk/by-label/NIXOS-FS".subvolumes = [ "root" ]; + devices."/dev/disk/by-label/NIXOS-FS".subvolumes = ["root"]; }; }; @@ -133,7 +135,7 @@ device = { roles = { type = "laptop"; - virtual-machine = false; + virtual-machine = false; }; cpu.type = "amd"; gpu.type = "amd"; @@ -144,7 +146,7 @@ security = { auditd = { enable = true; - autoPrune.enable = true; + autoPrune.enable = true; }; }; @@ -161,28 +163,28 @@ git = { userName = "ItsDrike"; - userEmail = "itsdrike@protonmail.com"; - signing = { - enable = true; + userEmail = "itsdrike@protonmail.com"; + signing = { + enable = true; key = "FA2745890B7048C0"; - }; + }; }; wms.hyprland = { enable = true; - monitor = [ - # Primary / laptop display - "eDP-1, 1920x1200@60, 0x1080, 1" + monitor = [ + # Primary / laptop display + "eDP-1, 1920x1200@60, 0x1080, 1" # HDMI-A-1 above primary - "HDMI-A-1, 1920x1080@60, 0x0, 1" + "HDMI-A-1, 1920x1080@60, 0x0, 1" - # HDMI-A-1 left to primary - #"HDMI-A-1, 1920x1080@60, 1920x1080, 1" + # HDMI-A-1 left to primary + #"HDMI-A-1, 1920x1080@60, 1920x1080, 1" - # Mirror the primary (laptop) monitor on externals - ", preferred, auto, 1, mirror, eDP-1" - ]; + # Mirror the primary (laptop) monitor on externals + ", preferred, auto, 1, mirror, eDP-1" + ]; }; programs = { @@ -205,7 +207,7 @@ }; webcord.enable = true; mpv.enable = true; - nomacs.enable = true; # TODO: probably disable + nomacs.enable = true; # TODO: probably disable qimgv.enable = true; qbittorrent.enable = true; obs.enable = true; diff --git a/hosts/voyager/hardware-configuration.nix b/hosts/voyager/hardware-configuration.nix index 9edebd4..53c3cf4 100644 --- a/hosts/voyager/hardware-configuration.nix +++ b/hosts/voyager/hardware-configuration.nix @@ -1,60 +1,64 @@ # 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, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; boot.initrd.luks.devices."cryptfs".device = "/dev/disk/by-label/NIXOS-CRYPTFS"; - fileSystems."/" = - { device = "/dev/disk/by-label/NIXOS-FS"; - fsType = "btrfs"; - options = [ "subvol=root" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = ["subvol=root" "noatime" "compress=zstd:3"]; + }; - fileSystems."/nix" = - { device = "/dev/disk/by-label/NIXOS-FS"; - fsType = "btrfs"; - options = [ "subvol=nix" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = ["subvol=nix" "noatime" "compress=zstd:3"]; + }; - fileSystems."/persist" = - { device = "/dev/disk/by-label/NIXOS-FS"; - fsType = "btrfs"; - options = [ "subvol=persist" "noatime" "compress=zstd:3" ]; - neededForBoot = true; - }; + fileSystems."/persist" = { + device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = ["subvol=persist" "noatime" "compress=zstd:3"]; + neededForBoot = true; + }; - fileSystems."/data" = - { device = "/dev/disk/by-label/NIXOS-FS"; - fsType = "btrfs"; - options = [ "subvol=data" "noatime" "compress=zstd:3" ]; - }; + fileSystems."/data" = { + device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = ["subvol=data" "noatime" "compress=zstd:3"]; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-label/EFI"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-label/EFI"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; - fileSystems."/.btrfs" = - { device = "/dev/disk/by-label/NIXOS-FS"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd:3" ]; - }; + fileSystems."/.btrfs" = { + device = "/dev/disk/by-label/NIXOS-FS"; + fsType = "btrfs"; + options = ["noatime" "compress=zstd:3"]; + }; - swapDevices = - [ { device = "/dev/disk/by-label/SWAP"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-label/SWAP";} + ]; # 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/options/device/hardware.nix b/options/device/hardware.nix index c097978..3d62397 100644 --- a/options/device/hardware.nix +++ b/options/device/hardware.nix @@ -1,10 +1,9 @@ -{ lib, ... }: let +{lib, ...}: let inherit (lib) mkOption mkEnableOption types; -in -{ +in { options.myOptions.device = { cpu.type = mkOption { - type = with types; nullOr (enum [ "intel" "amd" ]); + type = with types; nullOr (enum ["intel" "amd"]); default = null; description = '' The manifaturer/type of the primary system CPU. @@ -16,7 +15,7 @@ in }; gpu.type = mkOption { - type = with types; nullOr (enum [ "nvidia" "amd" "intel" "hybrid-nvidia" "hybrid-amd" ]); + type = with types; nullOr (enum ["nvidia" "amd" "intel" "hybrid-nvidia" "hybrid-amd"]); default = null; description = '' The manifaturer/type of the primary system GPU. diff --git a/options/device/roles.nix b/options/device/roles.nix index 834ed42..9554a7e 100644 --- a/options/device/roles.nix +++ b/options/device/roles.nix @@ -1,4 +1,8 @@ -{ lib, config, ... }: let +{ + lib, + config, + ... +}: let inherit (lib) mkOption types; cfg = config.myOptions.device.roles; diff --git a/options/home/default.nix b/options/home/default.nix index eb6ff70..e7ca437 100644 --- a/options/home/default.nix +++ b/options/home/default.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption mkOption; -in -{ +in { imports = [ ./programs ./git.nix @@ -21,4 +21,3 @@ in }; }; } - diff --git a/options/home/git.nix b/options/home/git.nix index b9f148a..288b493 100644 --- a/options/home/git.nix +++ b/options/home/git.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption mkOption; -in -{ +in { options.myOptions.home-manager.git = { userName = mkOption { type = types.str; diff --git a/options/home/preferences.nix b/options/home/preferences.nix index 0e899cf..3da13c4 100644 --- a/options/home/preferences.nix +++ b/options/home/preferences.nix @@ -1,24 +1,25 @@ -{ lib, ... }: let +{lib, ...}: let inherit (lib) mkOption types; - mkPreferenceCmdOption = name: commandDefault: mkOption { - type = types.str; - description = "The command to start your preferred ${name}."; - default = commandDefault; - }; + mkPreferenceCmdOption = name: commandDefault: + mkOption { + type = types.str; + description = "The command to start your preferred ${name}."; + default = commandDefault; + }; - mkPreferenceDesktopOption = name: desktopDefault: mkOption { - type = types.str; - description = "The desktop (application) file for your preferred ${name}."; - default = desktopDefault; - }; + mkPreferenceDesktopOption = name: desktopDefault: + mkOption { + type = types.str; + description = "The desktop (application) file for your preferred ${name}."; + default = desktopDefault; + }; mkPreferenceOptions = name: commandDefault: desktopDefault: { - command = mkPreferenceCmdOption name commandDefault; + command = mkPreferenceCmdOption name commandDefault; desktop = mkPreferenceDesktopOption name desktopDefault; }; -in -{ +in { options.myOptions.home-manager.preferences = { browser = mkPreferenceOptions "browser" "firefox" "firefox.desktop"; terminalEmulator = mkPreferenceOptions "terminal emulator" "kitty" "kitty.desktop"; diff --git a/options/home/programs/default.nix b/options/home/programs/default.nix index 4490585..9bd7d60 100644 --- a/options/home/programs/default.nix +++ b/options/home/programs/default.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption mkOption types; -in -{ +in { imports = [ ./iamb.nix ]; diff --git a/options/home/programs/iamb.nix b/options/home/programs/iamb.nix index fc99bd3..adeabc9 100644 --- a/options/home/programs/iamb.nix +++ b/options/home/programs/iamb.nix @@ -1,4 +1,4 @@ -{ +{ lib, config, ... @@ -6,8 +6,7 @@ inherit (lib) mkEnableOption mkOption types mkIf; cfg = config.myOptions.home-manager.programs.applications.iamb; -in -{ +in { options.myOptions.home-manager.programs.applications.iamb = { enable = mkEnableOption "iamb (vim-inspired terminal Matrix client)"; defaultProfile = mkOption { @@ -48,4 +47,3 @@ in ]; }; } - diff --git a/options/home/services.nix b/options/home/services.nix index bd2ec2c..4488fc6 100644 --- a/options/home/services.nix +++ b/options/home/services.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption mkOption types; -in -{ +in { options.myOptions.home-manager.services = { dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)"; hyprpaper = { @@ -14,4 +14,3 @@ in }; }; } - diff --git a/options/home/theme.nix b/options/home/theme.nix index 1503539..21fc1db 100644 --- a/options/home/theme.nix +++ b/options/home/theme.nix @@ -1,7 +1,10 @@ -{ lib, pkgs, ... }: let - inherit (lib) mkEnableOption mkOption types; -in { + lib, + pkgs, + ... +}: let + inherit (lib) mkEnableOption mkOption types; +in { options.myOptions.home-manager.theme = { gtk = { enable = mkEnableOption "GTK theming optionss"; @@ -48,7 +51,7 @@ in size = mkOption { type = types.int; description = "The size of the font"; - default = 10; # 10 + default = 10; # 10 }; }; }; @@ -141,6 +144,5 @@ in description = "The size of the cursor"; }; }; - }; } diff --git a/options/home/wms.nix b/options/home/wms.nix index 67407ff..6807cd5 100644 --- a/options/home/wms.nix +++ b/options/home/wms.nix @@ -11,7 +11,6 @@ in { Hyprland wayland compositor. ''; - monitor = mkOption { type = types.listOf types.str; default = []; diff --git a/options/security/auditd.nix b/options/security/auditd.nix index fccb222..c381707 100644 --- a/options/security/auditd.nix +++ b/options/security/auditd.nix @@ -1,7 +1,11 @@ -{ lib, config, ... }: with lib; let - inherit (lib) mkEnableOption mkOption literalExpression types; -in { + lib, + config, + ... +}: +with lib; let + inherit (lib) mkEnableOption mkOption literalExpression types; +in { options.myOptions.security.auditd = { enable = mkEnableOption "the audit daemon."; autoPrune = { @@ -58,4 +62,3 @@ in }; }; } - diff --git a/options/system/boot/default.nix b/options/system/boot/default.nix index 50b82d9..a110de1 100644 --- a/options/system/boot/default.nix +++ b/options/system/boot/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ...}: let +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkOption mkEnableOption literalExpression; cfg = config.myOptions.system.boot; @@ -16,17 +21,17 @@ in { description = "The kernel to use for the system."; }; - tmpOnTmpfs = + tmpOnTmpfs = mkEnableOption '' + `/tmp` living on tmpfs. false means it will be cleared manually on each reboot + + This option defaults to `true` if the host provides patches to the kernel package in + `boot.kernelPatches` + ''; + + silentBoot = mkEnableOption '' - `/tmp` living on tmpfs. false means it will be cleared manually on each reboot - - This option defaults to `true` if the host provides patches to the kernel package in - `boot.kernelPatches` - ''; - - silentBoot = mkEnableOption '' - almost entirely silent boot process through `quiet` kernel parameter - '' - // { default = cfg.plymouth.enable; }; + almost entirely silent boot process through `quiet` kernel parameter + '' + // {default = cfg.plymouth.enable;}; }; } diff --git a/options/system/boot/plymouth.nix b/options/system/boot/plymouth.nix index e4bad4d..66c0a5a 100644 --- a/options/system/boot/plymouth.nix +++ b/options/system/boot/plymouth.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption mkOption types; -in -{ +in { options.myOptions.system.boot.plymouth = { enable = mkEnableOption '' Plymouth boot splash. diff --git a/options/system/boot/secure-boot.nix b/options/system/boot/secure-boot.nix index 489a632..1f24c52 100644 --- a/options/system/boot/secure-boot.nix +++ b/options/system/boot/secure-boot.nix @@ -1,9 +1,9 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkEnableOption; -in -{ +in { options.myOptions.system.boot.secure-boot = { - enable = mkEnableOption '' + enable = mkEnableOption '' secure-boot using lanzaboote. Note that you will need to have UEFI firmware, and the rebuild @@ -18,6 +18,6 @@ in sudo sbctl enroll-keys -m ``` Then reboot, and secure-boot should be enabled. - ''; + ''; }; } diff --git a/options/system/default.nix b/options/system/default.nix index eed9bcf..2b66816 100644 --- a/options/system/default.nix +++ b/options/system/default.nix @@ -1,7 +1,7 @@ -{ lib, ... }: with lib; let +{lib, ...}: +with lib; let inherit (lib) mkOption; -in -{ +in { imports = [ ./boot ./impermanence.nix diff --git a/options/system/impermanence.nix b/options/system/impermanence.nix index a5fe4ff..f29b113 100644 --- a/options/system/impermanence.nix +++ b/options/system/impermanence.nix @@ -1,9 +1,13 @@ -{ lib, config, ... }: with lib; let +{ + lib, + config, + ... +}: +with lib; let inherit (lib) mkEnableOption mkOption literalExpression types; cfg = config.myOptions.system.impermanence; -in -{ +in { options.myOptions.system.impermanence = { root = { enable = mkEnableOption '' @@ -88,7 +92,7 @@ in This does not create any subdirectories, all of the persistent home files fill be put directly in here. The user should be the owner of this directory. - If you don't wish to distinguish between data and system / configuration files, + If you don't wish to distinguish between data and system / configuration files, you can point this to the same location. ''; }; @@ -129,16 +133,16 @@ in }; in { enable = mkEnableOption '' - automatic wiping of specified BTRFS subvolumes from initrd. + automatic wiping of specified BTRFS subvolumes from initrd. - If you're using BTRFS, you will generally want to enable this, however - with a non-BTRFS system, or in case you wish to set up some custom handling - which this module doesn't support, you will need to write your own logic - for automatic root wiping. + If you're using BTRFS, you will generally want to enable this, however + with a non-BTRFS system, or in case you wish to set up some custom handling + which this module doesn't support, you will need to write your own logic + for automatic root wiping. - One option is is to simply have your root get mounted from tmpfs, making it - live in RAM. This does however require dedicating a concrete chunk of RAM. - ''; + One option is is to simply have your root get mounted from tmpfs, making it + live in RAM. This does however require dedicating a concrete chunk of RAM. + ''; devices = mkOption { default = {}; diff --git a/options/workstation/default.nix b/options/workstation/default.nix index d47b613..e6d10c1 100644 --- a/options/workstation/default.nix +++ b/options/workstation/default.nix @@ -1,9 +1,13 @@ -{ lib, config, ... }: with lib; let +{ + lib, + config, + ... +}: +with lib; let inherit (lib) mkEnableOption mkOption literalExpression types; cfg = config.myOptions.workstation; -in -{ +in { options.myOptions.workstation = { printing = { enable = mkEnableOption '' diff --git a/shells/default.nix b/shells/default.nix index 5934283..7fd5694 100644 --- a/shells/default.nix +++ b/shells/default.nix @@ -1,4 +1,4 @@ -{inputs, ...}: let +{inputs, ...}: let inherit (inputs) nixpkgs; system = "x86_64-linux"; diff --git a/system/roles/laptop/power/acpi.nix b/system/roles/laptop/power/acpi.nix index 795cb57..c4924bc 100644 --- a/system/roles/laptop/power/acpi.nix +++ b/system/roles/laptop/power/acpi.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop"]; @@ -6,7 +11,7 @@ in { config = mkIf (builtins.elem deviceType acceptedTypes) { hardware.acpilight.enable = true; - environment.systemPackages = with pkgs; [ acpi ]; + environment.systemPackages = with pkgs; [acpi]; # handle ACPI events services.acpid.enable = true; @@ -20,4 +25,3 @@ in { }; }; } - diff --git a/system/roles/laptop/power/default.nix b/system/roles/laptop/power/default.nix index 6ffaf07..673e56a 100644 --- a/system/roles/laptop/power/default.nix +++ b/system/roles/laptop/power/default.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop"]; @@ -10,6 +15,6 @@ in { ]; config = mkIf (builtins.elem deviceType acceptedTypes) { - environment.systemPackages = with pkgs; [ powertop ]; + environment.systemPackages = with pkgs; [powertop]; }; } diff --git a/system/roles/laptop/power/power-profiles-daemon/default.nix b/system/roles/laptop/power/power-profiles-daemon/default.nix index 89c7371..bc74e65 100644 --- a/system/roles/laptop/power/power-profiles-daemon/default.nix +++ b/system/roles/laptop/power/power-profiles-daemon/default.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; inherit (lib.modules) mkForce; inherit (lib.strings) makeBinPath; diff --git a/system/roles/laptop/power/upower.nix b/system/roles/laptop/power/upower.nix index 2e59b30..0f0c1d5 100644 --- a/system/roles/laptop/power/upower.nix +++ b/system/roles/laptop/power/upower.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop"]; @@ -16,4 +21,3 @@ in { }; }; } - diff --git a/system/roles/laptop/touchpad.nix b/system/roles/laptop/touchpad.nix index aa05640..9bb8a99 100644 --- a/system/roles/laptop/touchpad.nix +++ b/system/roles/laptop/touchpad.nix @@ -1,4 +1,8 @@ -{ lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop"]; diff --git a/system/roles/workstation/display/login/greetd.nix b/system/roles/workstation/display/login/greetd.nix index c2671c2..22d9157 100644 --- a/system/roles/workstation/display/login/greetd.nix +++ b/system/roles/workstation/display/login/greetd.nix @@ -7,7 +7,6 @@ inherit (lib) mkIf getExe; inherit (lib.strings) concatStringsSep; - deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; @@ -74,6 +73,6 @@ in { }; # Persist info about previous session & user - myOptions.system.impermanence.root.extraDirectories = [ "/var/cache/tuigreet" ]; + myOptions.system.impermanence.root.extraDirectories = ["/var/cache/tuigreet"]; }; } diff --git a/system/roles/workstation/display/login/pam.nix b/system/roles/workstation/display/login/pam.nix index 7848f9a..16b4e77 100644 --- a/system/roles/workstation/display/login/pam.nix +++ b/system/roles/workstation/display/login/pam.nix @@ -1,4 +1,8 @@ -{lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/roles/workstation/display/wayland/services.nix b/system/roles/workstation/display/wayland/services.nix index 0cf06e4..be2afce 100644 --- a/system/roles/workstation/display/wayland/services.nix +++ b/system/roles/workstation/display/wayland/services.nix @@ -11,7 +11,7 @@ in { config = mkIf cfgEnabled { systemd.services = { # Seat management daemon - # (Takes care of mediating access to shared devices (graphics, input), without requiring + # (Takes care of mediating access to shared devices (graphics, input), without requiring # applications like Wayland compositors being granted root privileges) seatd = { enable = true; diff --git a/system/roles/workstation/display/wayland/xdg-portals.nix b/system/roles/workstation/display/wayland/xdg-portals.nix index 864b220..4284129 100644 --- a/system/roles/workstation/display/wayland/xdg-portals.nix +++ b/system/roles/workstation/display/wayland/xdg-portals.nix @@ -19,11 +19,14 @@ in { # Specify which portals should be used by the individual interfaces # see: - config.common = let + config.common = let # Note: this assumes a wlroots based compositor if it's not hyprland # which may not always actually be the case, however, I can't be bothered to handle # everything here and I don't plan on moving WMs any time soon. - portal = if cfgHyprlandEnabled then "hyprland" else "wlr"; + portal = + if cfgHyprlandEnabled + then "hyprland" + else "wlr"; in { # Use this portal for every interface, unless a specific override is present default = ["gtk"]; diff --git a/system/roles/workstation/fonts.nix b/system/roles/workstation/fonts.nix index 4d2a0b6..03b5586 100644 --- a/system/roles/workstation/fonts.nix +++ b/system/roles/workstation/fonts.nix @@ -1,4 +1,9 @@ -{pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; @@ -15,29 +20,33 @@ in { "Noto Color Emoji" ]; in { - monospace = [ - "Monaspace Krypton" - "Source Code Pro Medium" - "Source Han Mono" - ] - ++ common; + monospace = + [ + "Monaspace Krypton" + "Source Code Pro Medium" + "Source Han Mono" + ] + ++ common; - sansSerif = [ - "Noto Sans" - "Jost" - "Lexend" - ] - ++ common; + sansSerif = + [ + "Noto Sans" + "Jost" + "Lexend" + ] + ++ common; - serif = [ - "Noto Serif" - ] - ++ common; + serif = + [ + "Noto Serif" + ] + ++ common; - emoji = [ - "Noto Color Emoji" - ] - ++ common; + emoji = + [ + "Noto Color Emoji" + ] + ++ common; }; }; @@ -103,8 +112,8 @@ in { }; environment.systemPackages = with pkgs; [ - # Tool for searching and previewing installed fonts - font-manager + # Tool for searching and previewing installed fonts + font-manager ]; }; } diff --git a/system/roles/workstation/programs/misc.nix b/system/roles/workstation/programs/misc.nix index db97a18..2348696 100644 --- a/system/roles/workstation/programs/misc.nix +++ b/system/roles/workstation/programs/misc.nix @@ -1,4 +1,8 @@ -{ lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/roles/workstation/programs/physlock.nix b/system/roles/workstation/programs/physlock.nix index 574ec41..00f3c6d 100644 --- a/system/roles/workstation/programs/physlock.nix +++ b/system/roles/workstation/programs/physlock.nix @@ -1,4 +1,8 @@ -{ lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/roles/workstation/programs/steam.nix b/system/roles/workstation/programs/steam.nix index 02843ff..c976970 100644 --- a/system/roles/workstation/programs/steam.nix +++ b/system/roles/workstation/programs/steam.nix @@ -16,4 +16,3 @@ in { }; }; } - diff --git a/system/roles/workstation/programs/thunar.nix b/system/roles/workstation/programs/thunar.nix index 513b2ec..820df05 100644 --- a/system/roles/workstation/programs/thunar.nix +++ b/system/roles/workstation/programs/thunar.nix @@ -1,7 +1,7 @@ -{ - lib, - pkgs, - config, +{ + lib, + pkgs, + config, ... }: let inherit (lib) mkIf; @@ -9,7 +9,7 @@ acceptedTypes = ["laptop" "desktop"]; in { config = mkIf (builtins.elem deviceType acceptedTypes) { - # Unconditionally enable thunar file manager here as a relatively + # Unconditionally enable thunar file manager here as a relatively # lightweight fallback option for my default file manager. programs.thunar = { enable = true; @@ -34,4 +34,3 @@ in { services.tumbler.enable = true; }; } - diff --git a/system/roles/workstation/programs/virtualbox.nix b/system/roles/workstation/programs/virtualbox.nix index a890e84..d764732 100644 --- a/system/roles/workstation/programs/virtualbox.nix +++ b/system/roles/workstation/programs/virtualbox.nix @@ -18,6 +18,6 @@ in { headless = true; }; - users.extraGroups.vboxusers.members = [ "${cfgUser}" ]; + users.extraGroups.vboxusers.members = ["${cfgUser}"]; }; } diff --git a/system/roles/workstation/services/default.nix b/system/roles/workstation/services/default.nix index ec9cd53..f84bb73 100644 --- a/system/roles/workstation/services/default.nix +++ b/system/roles/workstation/services/default.nix @@ -8,4 +8,3 @@ ./gnome-keyring.nix ]; } - diff --git a/system/roles/workstation/services/earlyoom.nix b/system/roles/workstation/services/earlyoom.nix index b2f2c05..8972be7 100644 --- a/system/roles/workstation/services/earlyoom.nix +++ b/system/roles/workstation/services/earlyoom.nix @@ -1,4 +1,9 @@ -{pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/roles/workstation/services/gnome-keyring.nix b/system/roles/workstation/services/gnome-keyring.nix index 23d8589..4d7a6a5 100644 --- a/system/roles/workstation/services/gnome-keyring.nix +++ b/system/roles/workstation/services/gnome-keyring.nix @@ -1,4 +1,9 @@ -{pkgs, lib, config, ...}: let +{ + pkgs, + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; @@ -14,7 +19,7 @@ in { programs.seahorse.enable = true; xdg.portal.config.common = { - "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; }; }; } diff --git a/system/roles/workstation/services/logind.nix b/system/roles/workstation/services/logind.nix index 86f778b..b86731a 100644 --- a/system/roles/workstation/services/logind.nix +++ b/system/roles/workstation/services/logind.nix @@ -1,4 +1,8 @@ -{lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/roles/workstation/services/mount.nix b/system/roles/workstation/services/mount.nix index d4bfe65..0f77780 100644 --- a/system/roles/workstation/services/mount.nix +++ b/system/roles/workstation/services/mount.nix @@ -1,4 +1,8 @@ -{ lib, config, ...}: let +{ + lib, + config, + ... +}: let inherit (lib) mkIf; deviceType = config.myOptions.device.roles.type; acceptedTypes = ["laptop" "desktop"]; diff --git a/system/shared/boot/generic.nix b/system/shared/boot/generic.nix index 7efa56a..e4560cb 100644 --- a/system/shared/boot/generic.nix +++ b/system/shared/boot/generic.nix @@ -1,4 +1,8 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let inherit (lib) mkDefault optionals; cfg = config.myOptions.system.boot; @@ -25,7 +29,7 @@ in { tmp = { # /tmp on tmpfs, lets it live on your ram - # it defaults to false, which means you will use disk space instead of ram + # it defaults to false, which means you will use disk space instead of ram # enable tmpfs tmp on anything where you have ram to spare useTmpfs = cfg.tmpOnTmpfs; @@ -39,7 +43,7 @@ in { tmpfsSize = mkDefault "50%"; }; - kernelParams = (optionals cfg.silentBoot [ + kernelParams = optionals cfg.silentBoot [ # tell the kernel to not be verbose "quiet" @@ -53,6 +57,6 @@ in { # disable systemd status messages "systemd.show_status=auto" "rd.systemd.show_status=auto" - ]); + ]; }; } diff --git a/system/shared/boot/loaders/systemd-boot.nix b/system/shared/boot/loaders/systemd-boot.nix index 68c406b..c6bc965 100644 --- a/system/shared/boot/loaders/systemd-boot.nix +++ b/system/shared/boot/loaders/systemd-boot.nix @@ -1,4 +1,8 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let cfg = config.myOptions.system.boot; in { boot.loader.systemd-boot = { diff --git a/system/shared/boot/numlock.nix b/system/shared/boot/numlock.nix index 64bb6e7..26df48a 100644 --- a/system/shared/boot/numlock.nix +++ b/system/shared/boot/numlock.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { boot.initrd.systemd = { # Include setleds binary in the initrd # (the nix store doesn't exists in there yet, so we need to include @@ -12,12 +12,12 @@ services."numlock" = { enable = true; description = "Activate Numlock"; - wantedBy = [ "initrd.target" ]; + wantedBy = ["initrd.target"]; # Delay disk decryption until this unit is started - before = [ "systemd-cryptsetup@cryptfs.service" ]; + before = ["systemd-cryptsetup@cryptfs.service"]; unitConfig.DefaultDependencies = "no"; serviceConfig.Type = "oneshot"; - # This is essentially runs the same code as present in the + # This is essentially runs the same code as present in the # mkinitcpio-numlock hook on Arch Linux (AUR). script = '' #!/bin/bash diff --git a/system/shared/boot/plymouth.nix b/system/shared/boot/plymouth.nix index ad6041c..0fea4e7 100644 --- a/system/shared/boot/plymouth.nix +++ b/system/shared/boot/plymouth.nix @@ -1,20 +1,26 @@ -{ config, lib, pkgs, ...}: let +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkIf; cfg = config.myOptions.system.boot.plymouth; in { config = mkIf cfg.enable { boot = { - plymouth = { - enable = true; - theme = cfg.selectedTheme; - } - // lib.optionalAttrs cfg.withThemes { - themePackages = [ - (pkgs.adi1090x-plymouth-themes.override { - selected_themes = [ cfg.selectedTheme ]; - }) - ]; - }; + plymouth = + { + enable = true; + theme = cfg.selectedTheme; + } + // lib.optionalAttrs cfg.withThemes { + themePackages = [ + (pkgs.adi1090x-plymouth-themes.override { + selected_themes = [cfg.selectedTheme]; + }) + ]; + }; kernelParams = ["splash"]; }; diff --git a/system/shared/boot/secure-boot.nix b/system/shared/boot/secure-boot.nix index 5dc1e34..627a525 100644 --- a/system/shared/boot/secure-boot.nix +++ b/system/shared/boot/secure-boot.nix @@ -1,11 +1,16 @@ -{ config, pkgs, lib, ... }: let +{ + config, + pkgs, + lib, + ... +}: let inherit (lib) mkIf; cfg = config.myOptions.system.boot.secure-boot; in { config = mkIf cfg.enable { # Secure Boot Key Manager - environment.systemPackages = [ pkgs.sbctl ]; + environment.systemPackages = [pkgs.sbctl]; # Persist the secure boot keys (for impermanence) myOptions.system.impermanence.root.extraDirectories = [ diff --git a/system/shared/hardware/bluetooth.nix b/system/shared/hardware/bluetooth.nix index a4ef4d1..3dbf379 100644 --- a/system/shared/hardware/bluetooth.nix +++ b/system/shared/hardware/bluetooth.nix @@ -12,7 +12,7 @@ in { hardware.bluetooth = { enable = true; package = pkgs.bluez5-experimental; - powerOnBoot = cfg.powerOnBoot; + powerOnBoot = cfg.powerOnBoot; #hsphfpd.enable = true; disabledPlugins = ["sap"]; settings = { diff --git a/system/shared/hardware/cpu/amd.nix b/system/shared/hardware/cpu/amd.nix index 6ef2db0..9f5a7f3 100644 --- a/system/shared/hardware/cpu/amd.nix +++ b/system/shared/hardware/cpu/amd.nix @@ -1,8 +1,10 @@ -{ config, lib, ... }: -let - dev = config.myOptions.device; -in { + config, + lib, + ... +}: let + dev = config.myOptions.device; +in { config = lib.mkIf (dev.cpu.type == "amd") { hardware.cpu.amd.updateMicrocode = true; }; diff --git a/system/shared/hardware/cpu/intel.nix b/system/shared/hardware/cpu/intel.nix index 9fd113b..9cf4c55 100644 --- a/system/shared/hardware/cpu/intel.nix +++ b/system/shared/hardware/cpu/intel.nix @@ -1,8 +1,10 @@ -{ config, lib, ... }: -let - dev = config.myOptions.device; -in { + config, + lib, + ... +}: let + dev = config.myOptions.device; +in { config = lib.mkIf (dev.cpu.type == "intel") { hardware.cpu.intel.updateMicrocode = true; }; diff --git a/system/shared/hardware/generic.nix b/system/shared/hardware/generic.nix index 9e34b69..85fd8d6 100644 --- a/system/shared/hardware/generic.nix +++ b/system/shared/hardware/generic.nix @@ -6,4 +6,3 @@ # Without this, it defaults to `config.hardware.enableAllFirmware`. hardware.enableRedistributableFirmware = lib.mkDefault true; } - diff --git a/system/shared/hardware/gpu/amd.nix b/system/shared/hardware/gpu/amd.nix index 173d886..05d6d63 100644 --- a/system/shared/hardware/gpu/amd.nix +++ b/system/shared/hardware/gpu/amd.nix @@ -1,15 +1,18 @@ -# WARNING: This file is currently untested +# WARNING: This file is currently untested # (I didn't yet run this NixOS config on any AMD GPU systems) -{ config, lib, pkgs, ... }: -let - dev = config.myOptions.device; -in { + config, + lib, + pkgs, + ... +}: let + dev = config.myOptions.device; +in { config = lib.mkIf (dev.gpu.type == "amd") { services.xserver.videoDrivers = lib.mkDefault ["modesetting" "amdgpu"]; boot = { - initrd.kernelModules = ["amdgpu"]; # load amdgpu kernel module as early as initrd + initrd.kernelModules = ["amdgpu"]; # load amdgpu kernel module as early as initrd kernelModules = ["amdgpu"]; # if loading somehow fails during initrd but the boot continues, try again later }; @@ -26,7 +29,7 @@ in graphics = { enable = true; - extraPackages = with pkgs; [ + extraPackages = with pkgs; [ # Enable AMDVLK (AMD's open-source Vulkan driver) amdvlk @@ -35,14 +38,14 @@ in rocmPackages.clr.icd ]; # AMDVLK for 32-bit applications - extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + extraPackages32 = with pkgs; [driversi686Linux.amdvlk]; }; }; # HIP (SDK that allows running CUDA code on AMD GPUs) # Most software has the paths hard-coded systemd.tmpfiles.rules = [ - "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; }; } diff --git a/system/shared/hardware/gpu/default.nix b/system/shared/hardware/gpu/default.nix index 4a57cf9..35f8693 100644 --- a/system/shared/hardware/gpu/default.nix +++ b/system/shared/hardware/gpu/default.nix @@ -4,4 +4,3 @@ _: { ./nvidia.nix ]; } - diff --git a/system/shared/hardware/gpu/nvidia.nix b/system/shared/hardware/gpu/nvidia.nix index 8480875..1f2107c 100644 --- a/system/shared/hardware/gpu/nvidia.nix +++ b/system/shared/hardware/gpu/nvidia.nix @@ -1,11 +1,14 @@ -{ config, lib, pkgs, ... }: -let +{ + config, + lib, + pkgs, + ... +}: let dev = config.myOptions.device; isWayland = config.myOptions.home-manager.wms.isWayland; inherit (lib) mkIf mkDefault mkMerge; -in -{ +in { config = mkIf (builtins.elem dev.gpu.type ["nvidia" "hybrid-nvidia"]) { # Nvidia drivers are unfree software nixpkgs.config.allowUnfree = true; @@ -35,9 +38,9 @@ in # Use the NVidia open source kernel module (not to be confused with the # independent third-party "nouveau" open source driver). # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # supported GPUs is at: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # - # Enable this by default, hosts may override this option if their gpu is not + # Enable this by default, hosts may override this option if their gpu is not # supported by the open source drivers open = mkDefault true; @@ -88,7 +91,7 @@ in ]; sessionVariables = mkMerge [ - { LIBVA_DRIVER_NAME = "nvidia"; } + {LIBVA_DRIVER_NAME = "nvidia";} (mkIf isWayland { WLR_NO_HARDWARE_CURSORS = "1"; diff --git a/system/shared/hardware/tpm.nix b/system/shared/hardware/tpm.nix index d6ae3e6..d918470 100644 --- a/system/shared/hardware/tpm.nix +++ b/system/shared/hardware/tpm.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: let +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkIf mkDefault; enabled = config.myOptions.device.hasTPM; @@ -21,6 +26,6 @@ in { pkcs11.enable = mkDefault false; }; - environment.systemPackages = with pkgs; [ tpm2-tss tpm2-tools ]; + environment.systemPackages = with pkgs; [tpm2-tss tpm2-tools]; }; } diff --git a/system/shared/impermanence/autowipe.nix b/system/shared/impermanence/autowipe.nix index 71618d5..b261f6d 100644 --- a/system/shared/impermanence/autowipe.nix +++ b/system/shared/impermanence/autowipe.nix @@ -1,8 +1,11 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let inherit (lib) mkIf concatStringsSep flatten mapAttrsToList; cfg = config.myOptions.system.impermanence.autoWipeBtrfs; -in -{ +in { config = mkIf cfg.enable { boot.initrd.systemd = { enable = true; # This enables systemd support in stage 1 - required for below setup @@ -10,11 +13,11 @@ in services.rollback = { description = "Rollback BTRFS subvolumes to a pristine state"; enable = true; - wantedBy = [ "initrd.target" ]; + wantedBy = ["initrd.target"]; # Make sure it's done after decryption (i.e. LUKS/TPM process) - after = [ "systemd-cryptsetup@cryptfs.service" ]; + after = ["systemd-cryptsetup@cryptfs.service"]; # mount the root fs before clearing - before = [ "sysroot.mount" ]; + before = ["sysroot.mount"]; unitConfig.DefaultDependencies = "no"; serviceConfig.Type = "oneshot"; script = let @@ -31,9 +34,10 @@ in # Recreate each specified subvolume ${concatStringsSep "\n" (map (subvolume: '' - delete_subvolume_recursively "/mnt/${subvolume}" - btrfs subvolume create "/mnt/${subvolume}" - '') subvolumes)} + delete_subvolume_recursively "/mnt/${subvolume}" + btrfs subvolume create "/mnt/${subvolume}" + '') + subvolumes)} # Cleanup: unmount the device echo "Unmounting BTRFS root from ${devicePath}" @@ -62,9 +66,11 @@ in btrfs subvolume delete "$1" } - ${concatStringsSep "\n" (mapAttrsToList (devicePath: deviceOpts: - wipeScript devicePath deviceOpts.subvolumes - ) cfg.devices)} + ${concatStringsSep "\n" (mapAttrsToList ( + devicePath: deviceOpts: + wipeScript devicePath deviceOpts.subvolumes + ) + cfg.devices)} ''; }; }; diff --git a/system/shared/impermanence/default.nix b/system/shared/impermanence/default.nix index e09594e..24f42fd 100644 --- a/system/shared/impermanence/default.nix +++ b/system/shared/impermanence/default.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ +{inputs, ...}: { imports = [ ./root.nix ./autowipe.nix diff --git a/system/shared/impermanence/root.nix b/system/shared/impermanence/root.nix index 4633728..6adbfc3 100644 --- a/system/shared/impermanence/root.nix +++ b/system/shared/impermanence/root.nix @@ -1,10 +1,13 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let inherit (lib) mkIf mkForce; cfgSystem = config.myOptions.system; cfg = config.myOptions.system.impermanence.root; -in -{ +in { config = mkIf cfg.enable { users = { # This option makes it that users are not mutable outside of our configuration. @@ -28,19 +31,23 @@ in environment.persistence."${cfg.persistentMountPoint}/system" = { hideMounts = true; - directories = [ - "/etc/nixos" # NixOS configuration source - "/etc/NetworkManager/system-connections" # saved network connections - "/var/db/sudo" # keeps track of who got the sudo lecture already - # "/var/log" # I sometimes use a subvolume for this, added manually if not - "/var/lib/nixos" - "/var/lib/bluetooth" - "/var/lib/systemd/coredump" # captured coredumps - ] ++ cfg.extraDirectories; + directories = + [ + "/etc/nixos" # NixOS configuration source + "/etc/NetworkManager/system-connections" # saved network connections + "/var/db/sudo" # keeps track of who got the sudo lecture already + # "/var/log" # I sometimes use a subvolume for this, added manually if not + "/var/lib/nixos" + "/var/lib/bluetooth" + "/var/lib/systemd/coredump" # captured coredumps + ] + ++ cfg.extraDirectories; - files = [ - "/etc/machine-id" - ] ++ cfg.extraFiles; + files = + [ + "/etc/machine-id" + ] + ++ cfg.extraFiles; }; # For some reason, NetworkManager needs this instead of the impermanence mode diff --git a/system/shared/network.nix b/system/shared/network.nix index 3065391..6bc0e9e 100644 --- a/system/shared/network.nix +++ b/system/shared/network.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{lib, ...}: { networking = { firewall.enable = false; diff --git a/system/shared/nix/default.nix b/system/shared/nix/default.nix index bac6426..dbabd38 100644 --- a/system/shared/nix/default.nix +++ b/system/shared/nix/default.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: -{ - +{pkgs, ...}: { imports = [ ./cachix.nix ./gc.nix @@ -11,7 +9,7 @@ nix = { settings = { # enable flakes support - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; # Keep the built outputs of derivations in Nix store, even if the package is no longer needed # - prevents the need to rebuild/redownload if it becomes a dependency again @@ -25,13 +23,13 @@ # Give these users/groups additional rights when connecting to the Nix daemon # like specifying extra binary caches - trusted-users = [ "root" "@wheel" ]; + trusted-users = ["root" "@wheel"]; # Tell nix to use xdg base directories # If you're just setting this, you will need to move the directories # manually, nix won't do it for you: # - mv "$HOME/.nix-defexpr" "$XDG_STATE_HOME/nix/defexpr" - # - mv "$HOME/.nix-profile" "$XDG_STATE_HOME/nix/profile" + # - mv "$HOME/.nix-profile" "$XDG_STATE_HOME/nix/profile" use-xdg-base-directories = true; }; }; @@ -39,5 +37,5 @@ nixpkgs.config.allowUnfree = true; # Git is needed for flakes - environment.systemPackages = [ pkgs.git ]; + environment.systemPackages = [pkgs.git]; } diff --git a/system/shared/programs.nix b/system/shared/programs.nix index 9e00d59..7ae924a 100644 --- a/system/shared/programs.nix +++ b/system/shared/programs.nix @@ -1,7 +1,6 @@ {lib, ...}: let inherit (lib) mkForce; in { - programs = { # Explicitly disable nano, it sucks and I don't want it nano.enable = mkForce false; diff --git a/system/shared/security/apparmor.nix b/system/shared/security/apparmor.nix index 716c4c4..7c2b902 100644 --- a/system/shared/security/apparmor.nix +++ b/system/shared/security/apparmor.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { services.dbus.apparmor = "enabled"; environment.systemPackages = with pkgs; [ diff --git a/system/shared/security/auditd.nix b/system/shared/security/auditd.nix index 3691d6f..4c58db0 100644 --- a/system/shared/security/auditd.nix +++ b/system/shared/security/auditd.nix @@ -1,4 +1,8 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let inherit (lib) mkIf; cfg = config.myOptions.security.auditd; diff --git a/system/shared/security/polkit.nix b/system/shared/security/polkit.nix index ac8d279..21d7dd8 100644 --- a/system/shared/security/polkit.nix +++ b/system/shared/security/polkit.nix @@ -1,4 +1,8 @@ -{ config, lib, ... }: { +{ + config, + lib, + ... +}: { security.polkit = { enable = true; debug = lib.mkDefault true; diff --git a/system/shared/services/fstrim.nix b/system/shared/services/fstrim.nix index 01bda11..746b545 100644 --- a/system/shared/services/fstrim.nix +++ b/system/shared/services/fstrim.nix @@ -1,4 +1,8 @@ -{ config, lib, ... }: let +{ + config, + lib, + ... +}: let inherit (lib.modules) mkIf; in { # if lvm is enabled, then tell it to issue discards diff --git a/system/shared/services/fwupd.nix b/system/shared/services/fwupd.nix index 6178ecc..120ba77 100644 --- a/system/shared/services/fwupd.nix +++ b/system/shared/services/fwupd.nix @@ -2,6 +2,6 @@ # firmware updater for machine hardware services.fwupd = { enable = true; - daemonSettings.EspLocation = config.boot.loader.efi.efiSysMountPoint; + daemonSettings.EspLocation = config.boot.loader.efi.efiSysMountPoint; }; } diff --git a/system/shared/services/logrotate.nix b/system/shared/services/logrotate.nix index b31d870..9212ab4 100644 --- a/system/shared/services/logrotate.nix +++ b/system/shared/services/logrotate.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, ... }: { +{ + pkgs, + lib, + ... +}: { services.logrotate.settings.header = { # general global = true; diff --git a/system/shared/services/oomd.nix b/system/shared/services/oomd.nix index 717382f..605589d 100644 --- a/system/shared/services/oomd.nix +++ b/system/shared/services/oomd.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{lib, ...}: { systemd = { # OOMd: Out Of Memory daemon # By default, this will only kill cgroups. So either systemd services diff --git a/system/shared/services/ssh.nix b/system/shared/services/ssh.nix index 535827c..01f5a31 100644 --- a/system/shared/services/ssh.nix +++ b/system/shared/services/ssh.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { # TODO: This really shouldn't be a default service in system/ services.openssh = { enable = true; @@ -9,4 +9,3 @@ }; }; } - diff --git a/system/shared/system.nix b/system/shared/system.nix index 28e4c9e..b91da9d 100644 --- a/system/shared/system.nix +++ b/system/shared/system.nix @@ -1,7 +1,12 @@ -{ config, lib, pkgs, ... }: with lib; let - cfg = config.myOptions.system; -in { + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.myOptions.system; +in { networking.hostName = cfg.hostname; # Default shell for the user @@ -10,7 +15,7 @@ in users = { users.${cfg.username} = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = ["wheel"]; shell = pkgs.zsh; }; };