From 45494079c54978a04699e9fdebff6e0160be4ada Mon Sep 17 00:00:00 2001 From: Jo Date: Mon, 26 May 2025 18:06:37 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Run=20nixfmt-rfc-style=20on=20repos?= =?UTF-8?q?itory=20and=20add=20it=20to=20Zed=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 24 ++--- flake.nix | 7 +- homes/x86_64-linux/cyn/default.nix | 3 +- .../x86_64-linux/jo/apps/discord/default.nix | 6 +- .../jo/apps/youtube-music/default.nix | 6 +- homes/x86_64-linux/jo/default.nix | 3 +- lib/module/default.nix | 35 ++++--- modules/flake/lib.nix | 70 ++++++++------ modules/flake/modules.nix | 3 +- modules/flake/systems.nix | 3 +- modules/home/apps/zed/default.nix | 16 +++- modules/home/desktop/gnome/default.nix | 86 +++++++++++------ modules/home/security/sops/default.nix | 3 +- modules/home/themes/catppuccin/default.nix | 14 ++- .../home/themes/catppuccin/gtk/default.nix | 18 ++-- modules/nixos/archetypes/laptop/default.nix | 6 +- modules/nixos/archetypes/server/default.nix | 6 +- .../nixos/archetypes/workstation/default.nix | 6 +- modules/nixos/desktop/gnome/default.nix | 6 +- modules/nixos/services/atticd/default.nix | 16 ++-- modules/nixos/services/default.nix | 10 +- modules/nixos/services/docker/default.nix | 6 +- modules/nixos/services/duckdns/default.nix | 6 +- .../nixos/services/home-manager/default.nix | 3 +- modules/nixos/services/homepage/default.nix | 20 ++-- modules/nixos/services/traefik/default.nix | 18 ++-- .../nixos/services/vaultwarden/default.nix | 20 ++-- modules/nixos/system/audio/default.nix | 6 +- modules/nixos/system/bluetooth/default.nix | 8 +- modules/nixos/system/fonts/default.nix | 13 ++- modules/nixos/system/grub/default.nix | 8 +- modules/nixos/system/kernel/default.nix | 10 +- modules/nixos/system/locale/default.nix | 6 +- modules/nixos/system/networking/default.nix | 6 +- modules/nixos/system/nix/default.nix | 15 ++- modules/nixos/system/shell/default.nix | 8 +- modules/nixos/users/default.nix | 93 ++++++++++++------- .../x86_64-nixos/absolutesolver/default.nix | 10 +- .../x86_64-nixos/absolutesolver/hardware.nix | 26 ++++-- systems/x86_64-nixos/puzzlevision/default.nix | 5 +- .../x86_64-nixos/puzzlevision/hardware.nix | 47 ++++++---- 41 files changed, 441 insertions(+), 240 deletions(-) diff --git a/flake.lock b/flake.lock index 21c0b0a..87de884 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1747519437, - "narHash": "sha256-uv9Wv59d+mckS2CkorOF484wp2G5TNGijdoBZ5RkAk0=", + "lastModified": 1748080874, + "narHash": "sha256-sUebEzAkrY8Aq5G0GHFyRddmRNGP/a2iTtV7ISNvi/c=", "owner": "catppuccin", "repo": "nix", - "rev": "3ba714046ee32373e88166e6e9474d6ae6a5b734", + "rev": "0ba11b12be81f0849a89ed17ab635164ea8f0112", "type": "github" }, "original": { @@ -76,11 +76,11 @@ ] }, "locked": { - "lastModified": 1747955385, - "narHash": "sha256-AKoBFaEGN02tGvBlkwVIDOGXouHvrTTfOUcvBDGxkxQ=", + "lastModified": 1748182899, + "narHash": "sha256-r6MHSalDFydlUmjorVTSsyhLjIt8VWNtGc5+mffXvFQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "a868570581f0dbdef7e33c8c9bb34b735dfcbacf", + "rev": "901f8fef7f349cf8a8e97b3230b22fd592df9160", "type": "github" }, "original": { @@ -118,11 +118,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1747878048, - "narHash": "sha256-kAR4Ox+vShPzsUar/1rHarRgUBPpm7hxwi7sIffNYa4=", + "lastModified": 1748137719, + "narHash": "sha256-yBiIy+eb0QxYoIOzOY7QyjqXY5PiLgIoNbFtg4SbUH8=", "owner": "kaylorben", "repo": "nixcord", - "rev": "5f737debf65b8409392604098a7489d997746450", + "rev": "c4d7ccc9ae9fc1c46820bdc5b800b4f66e972ccc", "type": "github" }, "original": { @@ -149,11 +149,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9a17351..dc8e0f4 100644 --- a/flake.nix +++ b/flake.nix @@ -48,13 +48,14 @@ }; }; - outputs = {flake-parts, ...} @ inputs: - flake-parts.lib.mkFlake {inherit inputs;} { + outputs = + { flake-parts, ... }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { imports = [ ./modules/flake ]; - systems = ["x86_64-linux"]; + systems = [ "x86_64-linux" ]; flake = { # Exposing the flake namespace namespace = "puzzlevision"; diff --git a/homes/x86_64-linux/cyn/default.nix b/homes/x86_64-linux/cyn/default.nix index f2b8274..7caf5cd 100644 --- a/homes/x86_64-linux/cyn/default.nix +++ b/homes/x86_64-linux/cyn/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ ### Tools git diff --git a/homes/x86_64-linux/jo/apps/discord/default.nix b/homes/x86_64-linux/jo/apps/discord/default.nix index dfa7e9a..a872828 100644 --- a/homes/x86_64-linux/jo/apps/discord/default.nix +++ b/homes/x86_64-linux/jo/apps/discord/default.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let inherit (lib) mkIf; -in { +in +{ # Enable arRPC for discord Rich Presence stuffs services.arrpc.enable = true; diff --git a/homes/x86_64-linux/jo/apps/youtube-music/default.nix b/homes/x86_64-linux/jo/apps/youtube-music/default.nix index 0778d00..19b7b11 100644 --- a/homes/x86_64-linux/jo/apps/youtube-music/default.nix +++ b/homes/x86_64-linux/jo/apps/youtube-music/default.nix @@ -4,9 +4,11 @@ osConfig, namespace, ... -}: let +}: +let inherit (lib) mkIf; -in { +in +{ programs.youtube-music = { enable = true; options = { diff --git a/homes/x86_64-linux/jo/default.nix b/homes/x86_64-linux/jo/default.nix index 6fee357..3d7ccf8 100644 --- a/homes/x86_64-linux/jo/default.nix +++ b/homes/x86_64-linux/jo/default.nix @@ -2,7 +2,8 @@ pkgs, config, ... -}: { +}: +{ imports = [ ./apps/discord ./apps/youtube-music diff --git a/lib/module/default.nix b/lib/module/default.nix index 61c73ae..f0cf18c 100644 --- a/lib/module/default.nix +++ b/lib/module/default.nix @@ -2,30 +2,35 @@ lib, self, ... -}: { +}: +{ # Create a NixOS module option on a single line. - mkOpt = type: default: description: - lib.mkOption {inherit type default description;}; + mkOpt = + type: default: description: + lib.mkOption { inherit type default description; }; # Create a simple bool options - mkBool = default: description: + mkBool = + default: description: lib.mkOption { inherit default description; type = lib.types.bool; }; # Create a module compliant with the NixOS module system. - mkModule = { - name ? "puzzlevision", - class, - modules, - }: { - _class = class; - # Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]" - # Example: "[path-to-flake]/flake.nix#nixosModules.system.audio" - _file = "${self.outPath}/flake.nix#${class}Modules.${name}"; - imports = modules; - }; + mkModule = + { + name ? "puzzlevision", + class, + modules, + }: + { + _class = class; + # Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]" + # Example: "[path-to-flake]/flake.nix#nixosModules.system.audio" + _file = "${self.outPath}/flake.nix#${class}Modules.${name}"; + imports = modules; + }; # TODO: add mkIfElse function } diff --git a/modules/flake/lib.nix b/modules/flake/lib.nix index 88c442a..93bcb54 100644 --- a/modules/flake/lib.nix +++ b/modules/flake/lib.nix @@ -2,48 +2,64 @@ lib, self, ... -}: let +}: +let # Utility function to read a directory and return its contents. readDirectory = directory: builtins.readDir directory; # Utility function to handle each filesystem entity (file or directory). - filesystemEntityToAttrSet = directory: importArgs: name: type: - if type == "directory" - then dirToAttrSet "${directory}/${name}" importArgs - else if name == "default.nix" - then import "${directory}/${name}" importArgs - else {}; + filesystemEntityToAttrSet = + directory: importArgs: name: type: + if type == "directory" then + dirToAttrSet "${directory}/${name}" importArgs + else if name == "default.nix" then + import "${directory}/${name}" importArgs + else + { }; - filesystemEntityToList = directory: name: type: - if type == "directory" - then dirToModuleList "${directory}/${name}" - else if name == "default.nix" - then ["${directory}/${name}"] - else []; + filesystemEntityToList = + directory: name: type: + if type == "directory" then + dirToModuleList "${directory}/${name}" + else if name == "default.nix" then + [ "${directory}/${name}" ] + else + [ ]; - dirToModuleList = directory: let - readDir = readDirectory directory; - in + dirToModuleList = + directory: + let + readDir = readDirectory directory; + in builtins.foldl' ( - acc: name: - acc ++ (filesystemEntityToList directory name (builtins.getAttr name readDir)) - ) [] (builtins.attrNames readDir); + acc: name: acc ++ (filesystemEntityToList directory name (builtins.getAttr name readDir)) + ) [ ] (builtins.attrNames readDir); # Utility function to recursively load modules from a directory. - dirToAttrSet = directory: importArgs: let - # Read provided directory only once at the very start and save the result. - readDir = readDirectory directory; - in + dirToAttrSet = + directory: importArgs: + let + # Read provided directory only once at the very start and save the result. + readDir = readDirectory directory; + in # Iterate over the attr names of a readDir operation. builtins.foldl' ( acc: name: # Merge outputs of handling a filesystem entity (file or directory) into accumulator. # Files return attribute sets with their resulting expressions, directories return the result of multiple file handling operations. - acc // (filesystemEntityToAttrSet directory importArgs name (builtins.getAttr name readDir)) - ) {} (builtins.attrNames readDir); + acc // (filesystemEntityToAttrSet directory importArgs name (builtins.getAttr name readDir)) + ) { } (builtins.attrNames readDir); - puzzlelib = dirToAttrSet ../../lib {inherit lib self;} // {inherit dirToAttrSet dirToModuleList filesystemEntityToList filesystemEntityToAttrSet;}; -in { + puzzlelib = dirToAttrSet ../../lib { inherit lib self; } // { + inherit + dirToAttrSet + dirToModuleList + filesystemEntityToList + filesystemEntityToAttrSet + ; + }; +in +{ # Expose custom library on flake "lib" output flake.lib = puzzlelib; } diff --git a/modules/flake/modules.nix b/modules/flake/modules.nix index 1952945..a9448b8 100644 --- a/modules/flake/modules.nix +++ b/modules/flake/modules.nix @@ -1,4 +1,5 @@ -{self, ...}: { +{ self, ... }: +{ flake = { # TODO: figure out why this isn't working correctly nixosModules.puzzlevision = self.lib.mkModule { diff --git a/modules/flake/systems.nix b/modules/flake/systems.nix index 97be68f..fd0220e 100644 --- a/modules/flake/systems.nix +++ b/modules/flake/systems.nix @@ -3,7 +3,8 @@ self, inputs, ... -}: { +}: +{ imports = [ inputs.easy-hosts.flakeModule ]; diff --git a/modules/home/apps/zed/default.nix b/modules/home/apps/zed/default.nix index 1c948ad..2673203 100644 --- a/modules/home/apps/zed/default.nix +++ b/modules/home/apps/zed/default.nix @@ -4,12 +4,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf mkForce; inherit (self) namespace; cfg = config.${namespace}.apps.zed; -in { +in +{ options.${namespace}.apps.zed = { enable = mkEnableOption "zed, the graphical editor from the future"; }; @@ -67,11 +69,14 @@ in { ### Language specific configurations languages = { Nix = { - language_servers = ["nixd" "!nil"]; + language_servers = [ + "nixd" + "!nil" + ]; formatter = { external = { - command = "alejandra"; - arguments = ["--quiet"]; + command = "nixfmt"; + arguments = [ "--quiet" ]; }; }; }; @@ -123,6 +128,7 @@ in { ### Nix nixd alejandra + nixfmt-rfc-style ### Python python3Packages.python-lsp-server diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index aa5eeae..5c51b55 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -5,24 +5,44 @@ config, osConfig, ... -}: let +}: +let inherit (lib) mkIf mkOption; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.desktop.gnome; -in { +in +{ options.${namespace}.desktop.gnome = with lib.types; { enabled-extensions = mkOption { type = listOf package; - default = with pkgs.gnomeExtensions; [user-themes blur-my-shell appindicator unite color-picker clipboard-history]; - example = [dash-to-dock blur-my-shell]; + default = with pkgs.gnomeExtensions; [ + user-themes + blur-my-shell + appindicator + unite + color-picker + clipboard-history + ]; + example = [ + dash-to-dock + blur-my-shell + ]; description = "Specify gnome extensions to install."; }; favorite-apps = mkOption { type = listOf str; - default = ["org.gnome.Nautilus.desktop" "obsidian.desktop" "firefox.desktop" "dev.zed.Zed.desktop"]; - example = ["org.gnome.Nautilus.desktop" "obsidian.desktop"]; + default = [ + "org.gnome.Nautilus.desktop" + "obsidian.desktop" + "firefox.desktop" + "dev.zed.Zed.desktop" + ]; + example = [ + "org.gnome.Nautilus.desktop" + "obsidian.desktop" + ]; description = "Specify your favorite apps (sorted left to right)."; }; extensions = { @@ -44,7 +64,9 @@ in { enable-blur = mkOpt bool false "Whether to enable blur-my-shell application blur."; }; }; - wallpaper = mkOpt str (builtins.toString ../wallpapers/catppuccin/howard-chen-mao-mao-forest-campsite.jpg) "Specify the path of your prefered Gnome wallpaper."; + wallpaper = + mkOpt str (builtins.toString ../wallpapers/catppuccin/howard-chen-mao-mao-forest-campsite.jpg) + "Specify the path of your prefered Gnome wallpaper."; }; config = mkIf osConfig.${namespace}.desktop.gnome.enable { @@ -54,31 +76,35 @@ in { "org/gnome/shell" = { favorite-apps = cfg.favorite-apps; enabled-extensions = lib.forEach cfg.enabled-extensions (x: x.extensionUuid); - disabled-extensions = []; # Make sure none of our extensions are disabled on system rebuild + disabled-extensions = [ ]; # Make sure none of our extensions are disabled on system rebuild }; - "org/gnome/shell/extensions/unite" = mkIf (builtins.elem pkgs.gnomeExtensions.unite cfg.enabled-extensions) { - show-window-buttons = cfg.extensions.unite.show-window-buttons; - hide-window-titlebars = cfg.extensions.unite.hide-window-titlebars; + "org/gnome/shell/extensions/unite" = + mkIf (builtins.elem pkgs.gnomeExtensions.unite cfg.enabled-extensions) + { + show-window-buttons = cfg.extensions.unite.show-window-buttons; + hide-window-titlebars = cfg.extensions.unite.hide-window-titlebars; - use-activities-text = false; - extend-left-box = false; - reduce-panel-spacing = false; - show-legacy-tray = false; - show-appmenu-button = false; - show-desktop-name = false; - enable-titlebar-actions = false; - restrict-to-primary-screen = false; - hide-activities-button = "never"; - autofocus-windows = true; - notifications-position = "right"; - }; - "org/gnome/shell/extensions/blur-my-shell/applications" = mkIf cfg.extensions.blur-my-shell.enable-blur { - blur = true; - sigma = 30; - opacity = 230; - enable-all = true; - dynamic-opacity = false; - }; + use-activities-text = false; + extend-left-box = false; + reduce-panel-spacing = false; + show-legacy-tray = false; + show-appmenu-button = false; + show-desktop-name = false; + enable-titlebar-actions = false; + restrict-to-primary-screen = false; + hide-activities-button = "never"; + autofocus-windows = true; + notifications-position = "right"; + }; + "org/gnome/shell/extensions/blur-my-shell/applications" = + mkIf cfg.extensions.blur-my-shell.enable-blur + { + blur = true; + sigma = 30; + opacity = 230; + enable-all = true; + dynamic-opacity = false; + }; "org/gnome/desktop/background" = { picture-uri = cfg.wallpaper; picture-uri-dark = cfg.wallpaper; diff --git a/modules/home/security/sops/default.nix b/modules/home/security/sops/default.nix index e5a1245..0ce8af4 100644 --- a/modules/home/security/sops/default.nix +++ b/modules/home/security/sops/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ sops = { age.keyFile = "/home/${config.home.username}/sops-nix/key.txt"; }; diff --git a/modules/home/themes/catppuccin/default.nix b/modules/home/themes/catppuccin/default.nix index 11b0ccf..5701390 100644 --- a/modules/home/themes/catppuccin/default.nix +++ b/modules/home/themes/catppuccin/default.nix @@ -6,19 +6,25 @@ osConfig, namespace, ... -}: let +}: +let inherit (lib) mkEnableOption types mkIf; inherit (self.lib) mkOpt; - palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors; + palette = + (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")) + .${config.catppuccin.flavor}.colors; cfg = config.${namespace}.themes.catppuccin; -in { +in +{ options.${namespace}.themes.catppuccin = { enable = mkEnableOption "the Catppuccin theme, globally."; accent = mkOpt types.str "blue" "The accent colour to use."; flavor = mkOpt types.str "macchiato" "The flavor to use."; - palette = mkOpt (lib.types.attrsOf lib.types.raw) palette "a reference to the current active Catppuccin palette."; + palette = + mkOpt (lib.types.attrsOf lib.types.raw) palette + "a reference to the current active Catppuccin palette."; }; config = mkIf cfg.enable { diff --git a/modules/home/themes/catppuccin/gtk/default.nix b/modules/home/themes/catppuccin/gtk/default.nix index e172ca4..7790892 100644 --- a/modules/home/themes/catppuccin/gtk/default.nix +++ b/modules/home/themes/catppuccin/gtk/default.nix @@ -4,7 +4,8 @@ config, namespace, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; catppuccinCfg = config.${namespace}.themes.catppuccin; @@ -104,16 +105,19 @@ }; cfg = config.${namespace}.themes.catppuccin.gtk; -in { - options.${namespace}.themes.catppuccin.gtk = {enable = mkEnableOption "Enable the Catppuccin theme for GTK";}; +in +{ + options.${namespace}.themes.catppuccin.gtk = { + enable = mkEnableOption "Enable the Catppuccin theme for GTK"; + }; config = mkIf cfg.enable { home.packages = with pkgs; [ (colloid-gtk-theme.override { - themeVariants = ["default"]; - colorVariants = ["dark"]; - sizeVariants = ["standard"]; - tweaks = ["catppuccin"]; + themeVariants = [ "default" ]; + colorVariants = [ "dark" ]; + sizeVariants = [ "standard" ]; + tweaks = [ "catppuccin" ]; }) ]; diff --git a/modules/nixos/archetypes/laptop/default.nix b/modules/nixos/archetypes/laptop/default.nix index 7610b69..4ffa836 100644 --- a/modules/nixos/archetypes/laptop/default.nix +++ b/modules/nixos/archetypes/laptop/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.archetypes.laptop; -in { +in +{ options.${namespace}.archetypes.laptop = { enable = mkEnableOption "the laptop archetype."; }; diff --git a/modules/nixos/archetypes/server/default.nix b/modules/nixos/archetypes/server/default.nix index 4ee1041..a4b35d8 100644 --- a/modules/nixos/archetypes/server/default.nix +++ b/modules/nixos/archetypes/server/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.archetypes.server; -in { +in +{ options.${namespace}.archetypes.server = { enable = mkEnableOption "the server archetype for your current system"; }; diff --git a/modules/nixos/archetypes/workstation/default.nix b/modules/nixos/archetypes/workstation/default.nix index c8985ed..e5db636 100644 --- a/modules/nixos/archetypes/workstation/default.nix +++ b/modules/nixos/archetypes/workstation/default.nix @@ -4,12 +4,14 @@ pkgs, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf mkDefault; inherit (self) namespace; cfg = config.${namespace}.archetypes.workstation; -in { +in +{ options.${namespace}.archetypes.workstation = { enable = mkEnableOption "the workstation archetype."; }; diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index 0cac5cf..c0c3ec2 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -4,12 +4,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.desktop.gnome; -in { +in +{ options.${namespace}.desktop.gnome = { enable = mkEnableOption "the gnome desktop environment"; }; diff --git a/modules/nixos/services/atticd/default.nix b/modules/nixos/services/atticd/default.nix index f4acb99..de11700 100644 --- a/modules/nixos/services/atticd/default.nix +++ b/modules/nixos/services/atticd/default.nix @@ -3,18 +3,22 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.services.atticd; -in { +in +{ options.${namespace}.services.atticd = { enable = mkEnableOption "the attic service, a multi-tenant nix binary cache."; sopsFile = mkOpt types.path null "The location of the sops secret file for the Atticd service."; sopsFormat = mkOpt types.str null "The format of the sops secret file for the Atticd service."; - subdomain = mkOpt types.str "cache" "The subdomain, of the system domain, the service should be exposed on."; + subdomain = + mkOpt types.str "cache" + "The subdomain, of the system domain, the service should be exposed on."; }; config = mkIf cfg.enable { @@ -30,7 +34,7 @@ in { settings = { listen = "[::]:3900"; - jwt = {}; + jwt = { }; chunking = { nar-size-threshold = 64 * 1024; # 64 KiB @@ -50,9 +54,9 @@ in { services.traefik.dynamicConfigOptions = { http = { - services.atticd.loadBalancer.servers = [{url = "http://localhost:3900";}]; + services.atticd.loadBalancer.servers = [ { url = "http://localhost:3900"; } ]; routers.atticd = { - entryPoints = ["websecure"]; + entryPoints = [ "websecure" ]; service = "atticd"; rule = "Host(`${cfg.subdomain}.${config.${namespace}.services.domain}`)"; }; diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 9aa339a..4c62bff 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -2,13 +2,17 @@ lib, self, ... -}: let +}: +let inherit (lib) types; inherit (self) namespace; inherit (self.lib) mkOpt; -in { +in +{ options.${namespace}.services = { domain = mkOpt types.str "thevoid.cafe" "The main system domain, used for exposing services."; - mail = mkOpt types.str "system@thevoid.cafe" "The main system administration E-Mail, used for logs and services."; + mail = + mkOpt types.str "system@thevoid.cafe" + "The main system administration E-Mail, used for logs and services."; }; } diff --git a/modules/nixos/services/docker/default.nix b/modules/nixos/services/docker/default.nix index 346bc08..2d115f1 100644 --- a/modules/nixos/services/docker/default.nix +++ b/modules/nixos/services/docker/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkIf mkEnableOption; inherit (self) namespace; cfg = config.${namespace}.services.docker; -in { +in +{ options.${namespace}.services.docker = { enable = mkEnableOption "the docker service."; }; diff --git a/modules/nixos/services/duckdns/default.nix b/modules/nixos/services/duckdns/default.nix index c419804..fe48ee4 100644 --- a/modules/nixos/services/duckdns/default.nix +++ b/modules/nixos/services/duckdns/default.nix @@ -3,13 +3,15 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.services.duckdns; -in { +in +{ options.${namespace}.services.duckdns = { enable = mkEnableOption "DuckDNS, the dynamic dns service. Will periodically refresh your IP."; sopsFile = mkOpt types.path null "The location of the sops secret file for the DuckDNS service."; diff --git a/modules/nixos/services/home-manager/default.nix b/modules/nixos/services/home-manager/default.nix index 017f26a..81aa8cc 100644 --- a/modules/nixos/services/home-manager/default.nix +++ b/modules/nixos/services/home-manager/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ # Todo: rewrite as recursive operation, based on ${namespace}.users system.userActivationScripts = { removeConflictingHomeManagerBackups = { diff --git a/modules/nixos/services/homepage/default.nix b/modules/nixos/services/homepage/default.nix index b51a220..9c98141 100644 --- a/modules/nixos/services/homepage/default.nix +++ b/modules/nixos/services/homepage/default.nix @@ -3,17 +3,23 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.services.homepage; -in { +in +{ options.${namespace}.services.homepage = { enable = mkEnableOption "Homepage, an intuitive dashboard for your services."; - subdomain = mkOpt types.str "home" "The subdomain, of the system domain, the service should be exposed on."; - configDir = mkOpt types.path null "The config directory, which will be copied to the Homepage directory during compilation."; + subdomain = + mkOpt types.str "home" + "The subdomain, of the system domain, the service should be exposed on."; + configDir = + mkOpt types.path null + "The config directory, which will be copied to the Homepage directory during compilation."; }; config = mkIf cfg.enable { @@ -35,7 +41,9 @@ in { labels = { "traefik.enable" = "true"; "traefik.http.routers.homepage.entrypoints" = "websecure"; - "traefik.http.routers.homepage.rule" = "Host(`${cfg.subdomain}.${config.${namespace}.services.domain}`)"; + "traefik.http.routers.homepage.rule" = "Host(`${cfg.subdomain}.${ + config.${namespace}.services.domain + }`)"; "traefik.http.services.homepage.loadbalancer.server.port" = "3000"; }; volumes = [ @@ -48,7 +56,7 @@ in { environment = { "HOMEPAGE_ALLOWED_HOSTS" = "${cfg.subdomain}.${config.${namespace}.services.domain}"; }; - extraOptions = ["--network=proxy"]; + extraOptions = [ "--network=proxy" ]; }; }; } diff --git a/modules/nixos/services/traefik/default.nix b/modules/nixos/services/traefik/default.nix index 454751e..84a9dbe 100644 --- a/modules/nixos/services/traefik/default.nix +++ b/modules/nixos/services/traefik/default.nix @@ -3,13 +3,15 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.services.traefik; -in { +in +{ options.${namespace}.services.traefik = { enable = mkEnableOption "the Traefik service."; sopsFile = mkOpt types.path null "The location of the sops secret file for the Traefik service."; @@ -17,7 +19,11 @@ in { }; config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = [80 8080 443]; # http, dashboard, https + networking.firewall.allowedTCPPorts = [ + 80 + 8080 + 443 + ]; # http, dashboard, https sops.secrets."services/traefik" = { sopsFile = cfg.sopsFile; @@ -26,7 +32,7 @@ in { systemd.services.traefik = { serviceConfig = { - EnvironmentFile = [config.sops.secrets."services/traefik".path]; + EnvironmentFile = [ config.sops.secrets."services/traefik".path ]; }; }; @@ -84,11 +90,11 @@ in { domains = [ { main = "thevoid.cafe"; - sans = ["*.thevoid.cafe"]; + sans = [ "*.thevoid.cafe" ]; } { main = "rhysbot.co.uk"; - sans = ["*.rhysbot.co.uk"]; + sans = [ "*.rhysbot.co.uk" ]; } ]; }; diff --git a/modules/nixos/services/vaultwarden/default.nix b/modules/nixos/services/vaultwarden/default.nix index 1725ade..858c770 100644 --- a/modules/nixos/services/vaultwarden/default.nix +++ b/modules/nixos/services/vaultwarden/default.nix @@ -3,18 +3,24 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.services.vaultwarden; -in { +in +{ options.${namespace}.services.vaultwarden = { enable = mkEnableOption "Vaultwarden, a self-hostable password manager."; - sopsFile = mkOpt types.path null "The location of the sops secret file for the Vaultwarden service."; + sopsFile = + mkOpt types.path null + "The location of the sops secret file for the Vaultwarden service."; sopsFormat = mkOpt types.str null "The format of the sops secret file for the Vaultwarden service."; - subdomain = mkOpt types.str "vault" "The subdomain, of the system domain, the service should be exposed on."; + subdomain = + mkOpt types.str "vault" + "The subdomain, of the system domain, the service should be exposed on."; }; config = mkIf cfg.enable { @@ -35,7 +41,9 @@ in { labels = { "traefik.enable" = "true"; "traefik.http.routers.vaultwarden.entrypoints" = "websecure"; - "traefik.http.routers.vaultwarden.rule" = "Host(`${cfg.subdomain}.${config.${namespace}.services.domain}`)"; + "traefik.http.routers.vaultwarden.rule" = "Host(`${cfg.subdomain}.${ + config.${namespace}.services.domain + }`)"; }; volumes = [ "/var/lib/containers/vaultwarden/data:/data:rw" @@ -43,7 +51,7 @@ in { environmentFiles = [ config.sops.secrets."services/vaultwarden".path ]; - extraOptions = ["--network=proxy"]; + extraOptions = [ "--network=proxy" ]; }; }; } diff --git a/modules/nixos/system/audio/default.nix b/modules/nixos/system/audio/default.nix index f022058..55859ea 100644 --- a/modules/nixos/system/audio/default.nix +++ b/modules/nixos/system/audio/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.system.audio; -in { +in +{ options.${namespace}.system.audio = { enable = mkEnableOption "system audio support."; }; diff --git a/modules/nixos/system/bluetooth/default.nix b/modules/nixos/system/bluetooth/default.nix index c5f55df..1fc967c 100644 --- a/modules/nixos/system/bluetooth/default.nix +++ b/modules/nixos/system/bluetooth/default.nix @@ -4,18 +4,20 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.system.bluetooth; -in { +in +{ options.${namespace}.system.bluetooth = { enable = mkEnableOption "bluetooth support."; }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [bluez]; + environment.systemPackages = with pkgs; [ bluez ]; hardware.bluetooth = { enable = true; diff --git a/modules/nixos/system/fonts/default.nix b/modules/nixos/system/fonts/default.nix index 256cfa5..2b62601 100644 --- a/modules/nixos/system/fonts/default.nix +++ b/modules/nixos/system/fonts/default.nix @@ -4,12 +4,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf mkOption; inherit (self) namespace; cfg = config.${namespace}.system.fonts; -in { +in +{ options.${namespace}.system.fonts = with lib.types; { enable = mkEnableOption "system font management"; fonts = mkOption { @@ -30,13 +32,16 @@ in { material-icons material-design-icons ]; - example = [noto-fonts noto-fonts-emoji]; + example = [ + noto-fonts + noto-fonts-emoji + ]; description = "Install additional font packages"; }; }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [font-manager]; + environment.systemPackages = with pkgs; [ font-manager ]; fonts.packages = cfg.fonts; }; diff --git a/modules/nixos/system/grub/default.nix b/modules/nixos/system/grub/default.nix index ef2ab0e..f7fea39 100644 --- a/modules/nixos/system/grub/default.nix +++ b/modules/nixos/system/grub/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.system.grub; -in { +in +{ options.${namespace}.system.grub = { enable = mkEnableOption "the grub bootloader."; }; @@ -18,7 +20,7 @@ in { boot.loader.grub = { enable = true; - devices = ["nodev"]; + devices = [ "nodev" ]; efiInstallAsRemovable = true; efiSupport = true; diff --git a/modules/nixos/system/kernel/default.nix b/modules/nixos/system/kernel/default.nix index 521846d..fdb866e 100644 --- a/modules/nixos/system/kernel/default.nix +++ b/modules/nixos/system/kernel/default.nix @@ -4,16 +4,20 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.system.kernel; -in { +in +{ options.${namespace}.system.kernel = { enable = mkEnableOption "Modify the standard kernel settings"; - version = mkOpt lib.types.str "linuxPackages_latest" "Set the kernel version to be used by your system"; + version = + mkOpt lib.types.str "linuxPackages_latest" + "Set the kernel version to be used by your system"; }; config = mkIf cfg.enable { diff --git a/modules/nixos/system/locale/default.nix b/modules/nixos/system/locale/default.nix index bccefd9..8aa9168 100644 --- a/modules/nixos/system/locale/default.nix +++ b/modules/nixos/system/locale/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf mkOption; inherit (self) namespace; cfg = config.${namespace}.system.locale; -in { +in +{ options.${namespace}.system.locale = { enable = mkEnableOption "system locale tweaks."; diff --git a/modules/nixos/system/networking/default.nix b/modules/nixos/system/networking/default.nix index 2130053..6bdba06 100644 --- a/modules/nixos/system/networking/default.nix +++ b/modules/nixos/system/networking/default.nix @@ -3,12 +3,14 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf; inherit (self) namespace; cfg = config.${namespace}.system.networking; -in { +in +{ options.${namespace}.system.networking = { enable = mkEnableOption "networking."; }; diff --git a/modules/nixos/system/nix/default.nix b/modules/nixos/system/nix/default.nix index d1205b5..e11132d 100644 --- a/modules/nixos/system/nix/default.nix +++ b/modules/nixos/system/nix/default.nix @@ -4,18 +4,22 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.system.nix; -in { +in +{ options.${namespace}.system.nix = { enable = mkEnableOption "Nix configuration overrides."; use-lix = mkEnableOption "Lix as an alternative to CppNix."; use-nixld = mkEnableOption "the use of dynamically linked executables on nix based systems."; - trusted-users = mkOpt (types.listOf types.str) ["@wheel"] "List of trusted users for this NixOS system."; + trusted-users = mkOpt (types.listOf types.str) [ + "@wheel" + ] "List of trusted users for this NixOS system."; }; config = mkIf cfg.enable { @@ -23,7 +27,10 @@ in { settings = { auto-optimise-store = true; builders-use-substitutes = true; - experimental-features = ["nix-command" "flakes"]; + experimental-features = [ + "nix-command" + "flakes" + ]; keep-derivations = true; keep-outputs = true; max-jobs = "auto"; diff --git a/modules/nixos/system/shell/default.nix b/modules/nixos/system/shell/default.nix index 0ae1ef6..fc72cd2 100644 --- a/modules/nixos/system/shell/default.nix +++ b/modules/nixos/system/shell/default.nix @@ -4,16 +4,18 @@ self, config, ... -}: let +}: +let inherit (lib) mkEnableOption mkIf types; inherit (self) namespace; inherit (self.lib) mkOpt; cfg = config.${namespace}.system.shell; -in { +in +{ options.${namespace}.system.shell = { enable = mkEnableOption "custom user shells."; - installed = mkOpt (types.listOf types.package) [pkgs.fish] "List of shell packages to install"; + installed = mkOpt (types.listOf types.package) [ pkgs.fish ] "List of shell packages to install"; default = mkOpt types.str "fish" "Set a custom shell as the default for all users."; }; diff --git a/modules/nixos/users/default.nix b/modules/nixos/users/default.nix index 64829f8..b5efd31 100644 --- a/modules/nixos/users/default.nix +++ b/modules/nixos/users/default.nix @@ -5,8 +5,14 @@ config, inputs, ... -}: let - inherit (lib) types mkEnableOption mkOption mkIf; +}: +let + inherit (lib) + types + mkEnableOption + mkOption + mkIf + ; inherit (self) namespace; inherit (self.lib) dirToModuleList; @@ -19,25 +25,38 @@ enable = mkEnableOption "this user."; isNormalUser = self.lib.mkBool true "Whether this user is considered a normal user."; isSystemUser = self.lib.mkBool false "Whether this user is considered a system user."; - initialPassword = self.lib.mkOpt (types.nullOr types.str) null "Plaintext insecure initial user password, only recommended for testing."; - password = self.lib.mkOpt (types.nullOr types.str) null "Plaintext insecure user password, only recommended for testing."; - hashedPasswordFile = self.lib.mkOpt (types.nullOr types.str) null "Secure, hashed user password stored in a separate file, recommended for production."; - hashedPassword = self.lib.mkOpt (types.nullOr types.str) null "Secure, hashed password, stored in plaintext, fine to use."; - extraGroups = self.lib.mkOpt (types.listOf types.str) [] "List of additional groups this user belongs to."; + initialPassword = + self.lib.mkOpt (types.nullOr types.str) null + "Plaintext insecure initial user password, only recommended for testing."; + password = + self.lib.mkOpt (types.nullOr types.str) null + "Plaintext insecure user password, only recommended for testing."; + hashedPasswordFile = + self.lib.mkOpt (types.nullOr types.str) null + "Secure, hashed user password stored in a separate file, recommended for production."; + hashedPassword = + self.lib.mkOpt (types.nullOr types.str) null + "Secure, hashed password, stored in plaintext, fine to use."; + extraGroups = + self.lib.mkOpt (types.listOf types.str) [ ] + "List of additional groups this user belongs to."; }; }; getHomeConfigPath = username: "${self.outPath}/homes/${system}/${username}"; - homeConfigExists = username: let - path = getHomeConfigPath username; - in + homeConfigExists = + username: + let + path = getHomeConfigPath username; + in builtins.pathExists "${path}/default.nix"; homeModules = dirToModuleList "${self.outPath}/modules/home"; -in { +in +{ options.${namespace}.users = mkOption { type = types.attrsOf userSubmodule; - default = {}; + default = { }; description = "List of users to create. Also handles home configurations, placed in self.outPath/homes/[x86_64-linux, aarch64-linux, etc...], through home-manager."; }; @@ -47,12 +66,21 @@ in { # Manage users declaratively and map userConfig to users.users by name; users.mutableUsers = false; - users.users = lib.mapAttrs (username: userConfig: + users.users = lib.mapAttrs ( + username: userConfig: mkIf userConfig.enable { name = username; - inherit (userConfig) isNormalUser isSystemUser initialPassword hashedPasswordFile hashedPassword password extraGroups; - }) - cfg; + inherit (userConfig) + isNormalUser + isSystemUser + initialPassword + hashedPasswordFile + hashedPassword + password + extraGroups + ; + } + ) cfg; home-manager = { useGlobalPkgs = true; @@ -63,25 +91,24 @@ in { namespace = self.namespace; }; - users = - lib.mapAttrs ( - username: userConfig: - mkIf (userConfig.enable && homeConfigExists username) ( - {osConfig, ...}: { - # Import user home configuration and general home modules - imports = [ - (getHomeConfigPath username) - inputs.sops-nix.homeManagerModules.sops - inputs.catppuccin.homeModules.default - inputs.nixcord.homeModules.nixcord - inputs.youtube-music.homeManagerModules.default - ] ++ homeModules; + users = lib.mapAttrs ( + username: userConfig: + mkIf (userConfig.enable && homeConfigExists username) ( + { osConfig, ... }: + { + # Import user home configuration and general home modules + imports = [ + (getHomeConfigPath username) + inputs.sops-nix.homeManagerModules.sops + inputs.catppuccin.homeModules.default + inputs.nixcord.homeModules.nixcord + inputs.youtube-music.homeManagerModules.default + ] ++ homeModules; - home.stateVersion = lib.mkDefault osConfig.system.stateVersion; - } - ) + home.stateVersion = lib.mkDefault osConfig.system.stateVersion; + } ) - cfg; + ) cfg; }; }; } diff --git a/systems/x86_64-nixos/absolutesolver/default.nix b/systems/x86_64-nixos/absolutesolver/default.nix index 77dcc0d..4dbbb31 100644 --- a/systems/x86_64-nixos/absolutesolver/default.nix +++ b/systems/x86_64-nixos/absolutesolver/default.nix @@ -1,10 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./hardware.nix ]; # Setup Sops - sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.generateKey = true; @@ -12,7 +13,10 @@ users.cyn = { enable = true; hashedPassword = "$6$mvK9bT756Aok54Vt$vBRnT66Vb3HL0Y5rEMJlHvKkvzVQ.KUciInTmW3FCBFT00IuFMpz3q9RhXPLTLMRPho65bTg9hMnFPb84I774."; - extraGroups = ["wheel" "docker"]; + extraGroups = [ + "wheel" + "docker" + ]; }; archetypes.server.enable = true; diff --git a/systems/x86_64-nixos/absolutesolver/hardware.nix b/systems/x86_64-nixos/absolutesolver/hardware.nix index 82651b8..699f2a4 100644 --- a/systems/x86_64-nixos/absolutesolver/hardware.nix +++ b/systems/x86_64-nixos/absolutesolver/hardware.nix @@ -6,26 +6,36 @@ lib, modulesPath, ... -}: { +}: +{ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "uas" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usbhid" + "uas" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/5d4f9f57-085f-44a0-b987-bad24ff58769"; fsType = "btrfs"; - options = ["subvol=@"]; + options = [ "subvol=@" ]; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/8D0F-2821"; fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; + options = [ + "fmask=0077" + "dmask=0077" + ]; }; fileSystems."/mnt/storage" = { @@ -34,7 +44,7 @@ }; swapDevices = [ - {device = "/dev/disk/by-uuid/42fc926f-f066-48e8-8c07-3627b2ba3cd4";} + { device = "/dev/disk/by-uuid/42fc926f-f066-48e8-8c07-3627b2ba3cd4"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/systems/x86_64-nixos/puzzlevision/default.nix b/systems/x86_64-nixos/puzzlevision/default.nix index 1203d1d..818ba2e 100644 --- a/systems/x86_64-nixos/puzzlevision/default.nix +++ b/systems/x86_64-nixos/puzzlevision/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./hardware.nix ]; @@ -12,7 +13,7 @@ users.jo = { enable = true; hashedPassword = "$6$mvK9bT756Aok54Vt$vBRnT66Vb3HL0Y5rEMJlHvKkvzVQ.KUciInTmW3FCBFT00IuFMpz3q9RhXPLTLMRPho65bTg9hMnFPb84I774."; - extraGroups = ["wheel"]; + extraGroups = [ "wheel" ]; }; archetypes.laptop.enable = true; diff --git a/systems/x86_64-nixos/puzzlevision/hardware.nix b/systems/x86_64-nixos/puzzlevision/hardware.nix index 62a959f..581f52d 100644 --- a/systems/x86_64-nixos/puzzlevision/hardware.nix +++ b/systems/x86_64-nixos/puzzlevision/hardware.nix @@ -1,31 +1,46 @@ # 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, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "vmd" + "nvme" + "usbhid" + "rtsx_pci_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/864b1287-89fd-4cc0-98a5-40a3caf804c6"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/864b1287-89fd-4cc0-98a5-40a3caf804c6"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; - boot.initrd.luks.devices."luks-5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc".device = "/dev/disk/by-uuid/5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc"; + boot.initrd.luks.devices."luks-5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc".device = + "/dev/disk/by-uuid/5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2429-4141"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2429-4141"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; swapDevices = [ ];