diff --git a/common/cifs-client.nix b/common/cifs-client.nix index 8ddcb4e..acd187d 100644 --- a/common/cifs-client.nix +++ b/common/cifs-client.nix @@ -13,18 +13,22 @@ fileSystems."/data/media" = { device = "//fractal/media"; fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; + options = + let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + in + [ "${automount_opts},credentials=/etc/nixos/smb-secrets" ]; }; fileSystems."/data/shared" = { device = "//fractal/shared"; fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; + options = + let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + in + [ "${automount_opts},credentials=/etc/nixos/smb-secrets" ]; }; } diff --git a/common/consul.nix b/common/consul.nix index d47fe25..0f751ed 100644 --- a/common/consul.nix +++ b/common/consul.nix @@ -1,6 +1,10 @@ { pkgs, config, ... }: let - servers = [ "c1" "c2" "c3" ]; + servers = [ + "c1" + "c2" + "c3" + ]; server_enabled = builtins.elem config.networking.hostName servers; in { @@ -21,12 +25,20 @@ in }; }; - environment.persistence."/persist".directories = [ - "/var/lib/consul" - ]; + environment.persistence."/persist".directories = [ "/var/lib/consul" ]; networking.firewall = { - allowedTCPPorts = [ 8600 8500 8301 8302 8300 ]; - allowedUDPPorts = [ 8600 8301 8302 ]; + allowedTCPPorts = [ + 8600 + 8500 + 8301 + 8302 + 8300 + ]; + allowedUDPPorts = [ + 8600 + 8301 + 8302 + ]; }; } diff --git a/common/docker.nix b/common/docker.nix index a878015..e515048 100644 --- a/common/docker.nix +++ b/common/docker.nix @@ -1,3 +1 @@ -{ - virtualisation.docker.enable = true; -} +{ virtualisation.docker.enable = true; } diff --git a/common/encrypted-btrfs-layout.nix b/common/encrypted-btrfs-layout.nix index a4c646b..e4b4002 100644 --- a/common/encrypted-btrfs-layout.nix +++ b/common/encrypted-btrfs-layout.nix @@ -32,7 +32,7 @@ in format = "vfat"; mountpoint = "/boot"; mountOptions = [ - "umask=0077" # to avoid the random seed being world readable + "umask=0077" # to avoid the random seed being world readable ]; }; }; diff --git a/common/global/cpufreq.nix b/common/global/cpufreq.nix index 1f33b57..037a395 100644 --- a/common/global/cpufreq.nix +++ b/common/global/cpufreq.nix @@ -1,3 +1 @@ -{ - powerManagement.cpuFreqGovernor = "ondemand"; -} +{ powerManagement.cpuFreqGovernor = "ondemand"; } diff --git a/common/global/flakes.nix b/common/global/flakes.nix index dd970f4..d74f5a2 100644 --- a/common/global/flakes.nix +++ b/common/global/flakes.nix @@ -1,3 +1,6 @@ { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; } diff --git a/common/global/locale.nix b/common/global/locale.nix index f75953d..34ec504 100644 --- a/common/global/locale.nix +++ b/common/global/locale.nix @@ -1,3 +1 @@ -{ - time.timeZone = "Europe/Lisbon"; -} +{ time.timeZone = "Europe/Lisbon"; } diff --git a/common/global/network.nix b/common/global/network.nix index d315455..b4e8460 100644 --- a/common/global/network.nix +++ b/common/global/network.nix @@ -10,8 +10,6 @@ }; environment.persistence."/persist" = { - directories = [ - "/var/db/dhcpcd" - ]; + directories = [ "/var/db/dhcpcd" ]; }; } diff --git a/common/global/nix.nix b/common/global/nix.nix index 4a52908..3261422 100644 --- a/common/global/nix.nix +++ b/common/global/nix.nix @@ -1,5 +1,8 @@ { - nix.settings.trusted-users = [ "root" "@wheel" ]; + nix.settings.trusted-users = [ + "root" + "@wheel" + ]; nix.gc = { automatic = true; dates = "weekly"; diff --git a/common/global/show-changelog.nix b/common/global/show-changelog.nix index a0143fa..1647245 100644 --- a/common/global/show-changelog.nix +++ b/common/global/show-changelog.nix @@ -1,10 +1,15 @@ -{ pkgs, config, lib, ... }: +{ + pkgs, + config, + lib, + ... +}: { system.activationScripts.show-update-changelog = '' - if [[ -e /run/current-system ]]; then - echo "[show-update-changelog] System Changelog" - ${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" - fi + if [[ -e /run/current-system ]]; then + echo "[show-update-changelog] System Changelog" + ${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" + fi ''; } diff --git a/common/global/tailscale.nix b/common/global/tailscale.nix index c44612f..9eb0793 100644 --- a/common/global/tailscale.nix +++ b/common/global/tailscale.nix @@ -8,7 +8,5 @@ in services.tailscale.package = pkgs.unstable.tailscale; - environment.persistence."/persist".directories = [ - "/var/lib/tailscale" - ]; + environment.persistence."/persist".directories = [ "/var/lib/tailscale" ]; } diff --git a/common/global/tailscale_lib.nix b/common/global/tailscale_lib.nix index 83cbfea..cc36d51 100644 --- a/common/global/tailscale_lib.nix +++ b/common/global/tailscale_lib.nix @@ -1,8 +1,15 @@ # https://guekka.github.io/nixos-server-2/ -{ config, lib, pkgs, ... }: -with lib; let - cfg = config.services.tailscaleAutoconnect; -in { +{ + config, + lib, + pkgs, + ... +}: +with lib; +let + cfg = config.services.tailscaleAutoconnect; +in +{ options.services.tailscaleAutoconnect = { enable = mkEnableOption "tailscaleAutoconnect"; @@ -56,9 +63,15 @@ in { description = "Automatic connection to Tailscale"; # make sure tailscale is running before trying to connect to tailscale - after = ["network-pre.target" "tailscale.service"]; - wants = ["network-pre.target" "tailscale.service"]; - wantedBy = ["multi-user.target"]; + after = [ + "network-pre.target" + "tailscale.service" + ]; + wants = [ + "network-pre.target" + "tailscale.service" + ]; + wantedBy = [ "multi-user.target" ]; serviceConfig.Type = "oneshot"; diff --git a/common/glusterfs.nix b/common/glusterfs.nix index f7be77b..5de1f40 100644 --- a/common/glusterfs.nix +++ b/common/glusterfs.nix @@ -1,13 +1,24 @@ -{ pkgs, config, lib, ... }: +{ + pkgs, + config, + lib, + ... +}: { services.glusterfs = { enable = true; }; - environment.persistence."/persist".directories = [ - "/var/lib/glusterd" - ]; + environment.persistence."/persist".directories = [ "/var/lib/glusterd" ]; # TODO: each volume needs its own port starting at 49152 - networking.firewall.allowedTCPPorts = [ 24007 24008 24009 49152 49153 49154 49155 ]; + networking.firewall.allowedTCPPorts = [ + 24007 + 24008 + 24009 + 49152 + 49153 + 49154 + 49155 + ]; } diff --git a/common/impermanence.nix b/common/impermanence.nix index ea49111..115b9f3 100644 --- a/common/impermanence.nix +++ b/common/impermanence.nix @@ -1,13 +1,9 @@ { pkgs, inputs, ... }: { - imports = [ - inputs.impermanence.nixosModules.impermanence - ]; + imports = [ inputs.impermanence.nixosModules.impermanence ]; environment.persistence."/persist" = { - directories = [ - "/var/lib/nixos" - ]; + directories = [ "/var/lib/nixos" ]; files = [ "/etc/machine-id" "/etc/ssh/ssh_host_ed25519_key" @@ -17,11 +13,23 @@ ]; }; - fileSystems."/".options = ["compress=zstd" "noatime" ]; - fileSystems."/nix".options = ["compress=zstd" "noatime" ]; - fileSystems."/persist".options = ["compress=zstd" "noatime" ]; + fileSystems."/".options = [ + "compress=zstd" + "noatime" + ]; + fileSystems."/nix".options = [ + "compress=zstd" + "noatime" + ]; + fileSystems."/persist".options = [ + "compress=zstd" + "noatime" + ]; fileSystems."/persist".neededForBoot = true; - fileSystems."/var/log".options = ["compress=zstd" "noatime" ]; + fileSystems."/var/log".options = [ + "compress=zstd" + "noatime" + ]; fileSystems."/var/log".neededForBoot = true; users.mutableUsers = false; @@ -58,4 +66,3 @@ umount /mnt ''; } - diff --git a/common/nomad.nix b/common/nomad.nix index e702b9b..c31a716 100644 --- a/common/nomad.nix +++ b/common/nomad.nix @@ -1,7 +1,11 @@ # inspiration: https://github.com/astro/skyflake/blob/main/nixos-modules/nomad.nix { pkgs, config, ... }: let - servers = [ "c1" "c2" "c3" ]; + servers = [ + "c1" + "c2" + "c3" + ]; server_enabled = builtins.elem config.networking.hostName servers; in { @@ -58,7 +62,7 @@ in allow_privileged = true; # for keepalived, though only really needing "NET_ADMIN","NET_BROADCAST","NET_RAW" on top of default # TODO: trim this down - allow_caps = ["all"]; + allow_caps = [ "all" ]; volumes.enabled = true; extra_labels = [ "job_name" @@ -83,7 +87,15 @@ in ]; networking.firewall = { - allowedTCPPorts = if server_enabled then [ 4646 4647 4648 ] else [ 4646 ]; - allowedUDPPorts = if server_enabled then [ 4648 ] else []; + allowedTCPPorts = + if server_enabled then + [ + 4646 + 4647 + 4648 + ] + else + [ 4646 ]; + allowedUDPPorts = if server_enabled then [ 4648 ] else [ ]; }; } diff --git a/common/syncthing-data.nix b/common/syncthing-data.nix index d3d44f2..5cff3ea 100644 --- a/common/syncthing-data.nix +++ b/common/syncthing-data.nix @@ -5,9 +5,7 @@ # This could list the owner user but I'm not sure if it's already created at # the time impermanence setup runs. # Note: chown syncthing:syncthing /data/sync && chmod 700 /data/sync also seems to work - environment.persistence."/persist".directories = [ - "/data/sync" - ]; + environment.persistence."/persist".directories = [ "/data/sync" ]; services.syncthing = { enable = true; @@ -18,10 +16,18 @@ overrideFolders = true; settings = { devices = { - "c1" = { id = "53JGRHQ-VGBYIGH-7IT6Z5S-3IMRY2I-LJZAE3B-QUDH3QF-4F4QKVC-VBWPJQ4"; }; - "c2" = { id = "Z3D476N-PUV6WAD-DSJWVBO-TWEOD4I-KDDMNRB-QEBOP6T-BYPGYTX-RAAYGAW"; }; - "c3" = { id = "D3C3YII-A3QGUNF-LHOGZNX-GJ4ZF3X-VVLMNY5-BBKF3BO-KNHKJMD-EA5QYQJ"; }; - "zippy" = { id = "WXDYZWN-JG2OBQH-CC42RMM-LPJGTS6-Y2BV37J-TYSLHL4-VHGYL5M-URI42QJ"; }; + "c1" = { + id = "53JGRHQ-VGBYIGH-7IT6Z5S-3IMRY2I-LJZAE3B-QUDH3QF-4F4QKVC-VBWPJQ4"; + }; + "c2" = { + id = "Z3D476N-PUV6WAD-DSJWVBO-TWEOD4I-KDDMNRB-QEBOP6T-BYPGYTX-RAAYGAW"; + }; + "c3" = { + id = "D3C3YII-A3QGUNF-LHOGZNX-GJ4ZF3X-VVLMNY5-BBKF3BO-KNHKJMD-EA5QYQJ"; + }; + "zippy" = { + id = "WXDYZWN-JG2OBQH-CC42RMM-LPJGTS6-Y2BV37J-TYSLHL4-VHGYL5M-URI42QJ"; + }; }; folders = { "wordpress" = { diff --git a/common/unattended-encryption.nix b/common/unattended-encryption.nix index 633aa87..8101855 100644 --- a/common/unattended-encryption.nix +++ b/common/unattended-encryption.nix @@ -1,8 +1,8 @@ { boot.initrd.kernelModules = [ "usb_storage" ]; boot.initrd.luks.devices."luksroot" = { - allowDiscards = true; - bypassWorkqueues = true; - keyFileSize = 4096; + allowDiscards = true; + bypassWorkqueues = true; + keyFileSize = 4096; }; } diff --git a/flake.nix b/flake.nix index a23b4d0..d9d5f88 100644 --- a/flake.nix +++ b/flake.nix @@ -20,63 +20,82 @@ }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, deploy-rs, disko, ... }@inputs: + outputs = + { + self, + nixpkgs, + nixpkgs-unstable, + deploy-rs, + disko, + ... + }@inputs: let inherit (self); - overlay-unstable = final: prev: { - unstable = nixpkgs-unstable.legacyPackages.${prev.system}; - }; + overlay-unstable = final: prev: { unstable = nixpkgs-unstable.legacyPackages.${prev.system}; }; - mkNixos = system: modules: nixpkgs.lib.nixosSystem { - system = system; - modules = [ - ({ config, pkgs, ... }: { - nixpkgs.overlays = [ overlay-unstable ]; - nixpkgs.config.allowUnfree = true; - }) - disko.nixosModules.disko - inputs.home-manager.nixosModules.home-manager { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.ppetru = { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ./home - ]; + mkNixos = + system: modules: + nixpkgs.lib.nixosSystem { + system = system; + modules = [ + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = [ overlay-unstable ]; + nixpkgs.config.allowUnfree = true; + } + ) + disko.nixosModules.disko + inputs.home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.ppetru = { + imports = [ + inputs.nixvim.homeManagerModules.nixvim + ./home + ]; + }; }; - }; - } - ] ++ modules; - specialArgs = { inherit inputs self; }; - }; + } + ] ++ modules; + specialArgs = { + inherit inputs self; + }; + }; - pkgsFor = system: import nixpkgs { - inherit system; - overlays = [ overlay-unstable ]; - }; + pkgsFor = + system: + import nixpkgs { + inherit system; + overlays = [ overlay-unstable ]; + }; - deployPkgsFor = system: import nixpkgs { - inherit system; - overlays = [ - overlay-unstable - deploy-rs.overlay - (self: super: { - deploy-rs = { - inherit (pkgsFor system) deploy-rs; - lib = super.deploy-rs.lib; - }; - }) - ]; - }; - in { + deployPkgsFor = + system: + import nixpkgs { + inherit system; + overlays = [ + overlay-unstable + deploy-rs.overlay + (self: super: { + deploy-rs = { + inherit (pkgsFor system) deploy-rs; + lib = super.deploy-rs.lib; + }; + }) + ]; + }; + in + { nixosConfigurations = { c1 = mkNixos "x86_64-linux" [ ./hosts/c1 ]; c2 = mkNixos "x86_64-linux" [ ./hosts/c2 ]; c3 = mkNixos "x86_64-linux" [ ./hosts/c3 ]; nix-dev = mkNixos "x86_64-linux" [ ./hosts/nix-dev ]; - alo-cloud-1 = mkNixos "aarch64-linux" [./hosts/alo-cloud-1 ]; + alo-cloud-1 = mkNixos "aarch64-linux" [ ./hosts/alo-cloud-1 ]; zippy = mkNixos "x86_64-linux" [ ./hosts/zippy ]; chilly = mkNixos "x86_64-linux" [ ./hosts/chilly ]; }; @@ -144,5 +163,7 @@ }; checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; + + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style; }; } diff --git a/home/default.nix b/home/default.nix index ec6cb79..120a37b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,10 +1,11 @@ { pkgs, ... }: let packages = import ./packages.nix { inherit pkgs; }; -in { +in +{ home = { inherit packages; - stateVersion = "24.05"; # TODO: unify this with the references in flake.nix:inputs + stateVersion = "24.05"; # TODO: unify this with the references in flake.nix:inputs sessionVariables = { MOSH_SERVER_NETWORK_TMOUT = 604800; diff --git a/home/packages.nix b/home/packages.nix index 0985ba6..68e91c1 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -9,4 +9,5 @@ let vim zsh ]; -in nixTools +in +nixTools diff --git a/hosts/alo-cloud-1/hardware.nix b/hosts/alo-cloud-1/hardware.nix index 2f700cf..03e31a1 100644 --- a/hosts/alo-cloud-1/hardware.nix +++ b/hosts/alo-cloud-1/hardware.nix @@ -1,47 +1,55 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sr_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "virtio_pci" + "virtio_scsi" + "usbhid" + "sr_mod" + ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; - fileSystems."/persist" = - { device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; - fsType = "btrfs"; - options = [ "subvol=persist" ]; - }; + fileSystems."/persist" = { + device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; + }; - fileSystems."/var/log" = - { device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; - fsType = "btrfs"; - options = [ "subvol=log" ]; - }; + fileSystems."/var/log" = { + device = "/dev/disk/by-uuid/4275af2a-648c-4778-8090-7e5ef5c2846b"; + fsType = "btrfs"; + options = [ "subvol=log" ]; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/FF9C-DC81"; - fsType = "vfat"; - options = [ "umask=0077" ]; # to avoid the random seed being world readable - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/FF9C-DC81"; + fsType = "vfat"; + options = [ "umask=0077" ]; # to avoid the random seed being world readable + }; - swapDevices = [ { - device = "/dev/disk/by-label/swap"; - }]; + swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hosts/alo-cloud-1/reverse-proxy.nix b/hosts/alo-cloud-1/reverse-proxy.nix index eabc37b..1ad434d 100644 --- a/hosts/alo-cloud-1/reverse-proxy.nix +++ b/hosts/alo-cloud-1/reverse-proxy.nix @@ -1,9 +1,7 @@ { pkgs, ... }: { environment.systemPackages = [ pkgs.traefik ]; - environment.persistence."/persist".files = [ - "/acme/acme.json" - ]; + environment.persistence."/persist".files = [ "/acme/acme.json" ]; services.traefik = { enable = true; @@ -14,7 +12,7 @@ sendAnonymousUsage = false; }; - accessLog = {}; + accessLog = { }; api = { dashboard = true; @@ -25,10 +23,10 @@ acme = { email = "petru@paler.net"; storage = "/acme/acme.json"; - tlsChallenge = {}; + tlsChallenge = { }; }; - }; - }; + }; + }; entryPoints = { web = { @@ -60,9 +58,9 @@ dynamicConfigOptions = { http = { services = { - # edgy over Tailscale - alo-cluster.loadBalancer.servers = [{ url = "http://100.64.229.126:10080"; }]; - varnish-cache.loadBalancer.servers = [{ url = "http://localhost:6081"; }]; + # edgy over Tailscale + alo-cluster.loadBalancer.servers = [ { url = "http://100.64.229.126:10080"; } ]; + varnish-cache.loadBalancer.servers = [ { url = "http://localhost:6081"; } ]; }; routers = { diff --git a/hosts/c1/hardware.nix b/hosts/c1/hardware.nix index e81435b..4531bf1 100644 --- a/hosts/c1/hardware.nix +++ b/hosts/c1/hardware.nix @@ -1,11 +1,21 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/c2/hardware.nix b/hosts/c2/hardware.nix index e81435b..4531bf1 100644 --- a/hosts/c2/hardware.nix +++ b/hosts/c2/hardware.nix @@ -1,11 +1,21 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/c3/hardware.nix b/hosts/c3/hardware.nix index 8b1428c..1d8056a 100644 --- a/hosts/c3/hardware.nix +++ b/hosts/c3/hardware.nix @@ -1,11 +1,22 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; diff --git a/hosts/chilly/default.nix b/hosts/chilly/default.nix index b64421d..b2bc848 100644 --- a/hosts/chilly/default.nix +++ b/hosts/chilly/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, inputs, ... }: +{ + lib, + pkgs, + inputs, + ... +}: { imports = [ ../../common/encrypted-btrfs-layout.nix diff --git a/hosts/chilly/hardware.nix b/hosts/chilly/hardware.nix index 3c629c1..4f862e9 100644 --- a/hosts/chilly/hardware.nix +++ b/hosts/chilly/hardware.nix @@ -1,11 +1,20 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -13,4 +22,3 @@ nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.intel.updateMicrocode = true; } - diff --git a/hosts/nix-dev/hardware.nix b/hosts/nix-dev/hardware.nix index 7100600..edb2dfb 100644 --- a/hosts/nix-dev/hardware.nix +++ b/hosts/nix-dev/hardware.nix @@ -1,23 +1,32 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sd_mod" + "sr_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/d8fd0d0d-99f3-47c3-9821-1ecb51e0fa7b"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/d8fd0d0d-99f3-47c3-9821-1ecb51e0fa7b"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/f50d64a5-948d-4ff4-88f2-0e0f4eae4c9e"; } - ]; + swapDevices = [ { device = "/dev/disk/by-uuid/f50d64a5-948d-4ff4-88f2-0e0f4eae4c9e"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/hosts/zippy/hardware.nix b/hosts/zippy/hardware.nix index 8faabca..8d2ad5c 100644 --- a/hosts/zippy/hardware.nix +++ b/hosts/zippy/hardware.nix @@ -1,11 +1,22 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -13,4 +24,3 @@ nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.intel.updateMicrocode = true; } -