From cf648f81adbdb348a72db0a77fda8012800ef36e Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 9 Jan 2025 10:58:16 -0500 Subject: [PATCH] Nixfmt --- devshells/idris2.nix | 5 +- home-manager/modules/programs/ssh.nix | 5 +- nixos/machines/crash/configuration.nix | 70 ++++++++++++++------------ nixos/machines/crash/hardware.nix | 48 +++++++++++------- nixos/machines/crash/machine.nix | 2 +- nixos/machines/wsl/configuration.nix | 2 +- nixos/modules/user.nix | 2 +- 7 files changed, 78 insertions(+), 56 deletions(-) diff --git a/devshells/idris2.nix b/devshells/idris2.nix index 0a03015..69508ac 100644 --- a/devshells/idris2.nix +++ b/devshells/idris2.nix @@ -23,7 +23,10 @@ "/share" ]; }; - libPackages = with pkgs; [ readline70 openssl ]; + libPackages = with pkgs; [ + readline70 + openssl + ]; in pkgs.mkShell { buildInputs = diff --git a/home-manager/modules/programs/ssh.nix b/home-manager/modules/programs/ssh.nix index f3a2f24..8211f7c 100644 --- a/home-manager/modules/programs/ssh.nix +++ b/home-manager/modules/programs/ssh.nix @@ -19,8 +19,7 @@ controlMaster = "auto"; controlPersist = "10m"; # Configure known hosts - matchBlocks = - { - }; + matchBlocks = { + }; }; } diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index adecdab..f5661c1 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -5,37 +5,43 @@ { config, pkgs, ... }: { - imports = - [ - ]; - - nix.settings.trusted-users = [ "root" "nathan" ]; - -programs.ssh.extraConfig = '' - Host eu.nixbuild.net - PubkeyAcceptedKeyTypes ssh-ed25519 - ServerAliveInterval 60 - IPQoS throughput - IdentityFile /home/nathan/.ssh/id_ed25519 -''; - -programs.ssh.knownHosts = { - nixbuild = { - hostNames = [ "eu.nixbuild.net" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; - }; -}; - -nix = { - distributedBuilds = true; - buildMachines = [ - { hostName = "eu.nixbuild.net"; - system = "x86_64-linux"; - maxJobs = 100; - supportedFeatures = [ "benchmark" "big-parallel" ]; - } + imports = [ ]; -}; + + nix.settings.trusted-users = [ + "root" + "nathan" + ]; + + programs.ssh.extraConfig = '' + Host eu.nixbuild.net + PubkeyAcceptedKeyTypes ssh-ed25519 + ServerAliveInterval 60 + IPQoS throughput + IdentityFile /home/nathan/.ssh/id_ed25519 + ''; + + programs.ssh.knownHosts = { + nixbuild = { + hostNames = [ "eu.nixbuild.net" ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; + }; + }; + + nix = { + distributedBuilds = true; + buildMachines = [ + { + hostName = "eu.nixbuild.net"; + system = "x86_64-linux"; + maxJobs = 100; + supportedFeatures = [ + "benchmark" + "big-parallel" + ]; + } + ]; + }; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -113,8 +119,8 @@ nix = { # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/nixos/machines/crash/hardware.nix b/nixos/machines/crash/hardware.nix index 5a7ca38..cca4031 100644 --- a/nixos/machines/crash/hardware.nix +++ b/nixos/machines/crash/hardware.nix @@ -1,32 +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, 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/0a846b89-7219-47c1-9db5-362e3c018964"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/0a846b89-7219-47c1-9db5-362e3c018964"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D1C9-AFA9"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/bf35a46f-552c-4b37-a68b-c2fcf132f359"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D1C9-AFA9"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/bf35a46f-552c-4b37-a68b-c2fcf132f359"; } + ]; # 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/nixos/machines/crash/machine.nix b/nixos/machines/crash/machine.nix index 97b4aec..be21325 100644 --- a/nixos/machines/crash/machine.nix +++ b/nixos/machines/crash/machine.nix @@ -25,7 +25,7 @@ { imports = [ # Hardware support - inputs.nixos-hardware.nixosModules.microsoft-surface-common + inputs.nixos-hardware.nixosModules.microsoft-surface-common # Our modules (import ../../modules/base.nix { inherit inputs; }) (import ./configuration.nix) diff --git a/nixos/machines/wsl/configuration.nix b/nixos/machines/wsl/configuration.nix index a79c28d..1d6b1e0 100644 --- a/nixos/machines/wsl/configuration.nix +++ b/nixos/machines/wsl/configuration.nix @@ -45,7 +45,7 @@ services.tailscale.enable = true; - nix.settings.system-features = ["x86_64-linux"]; + nix.settings.system-features = [ "x86_64-linux" ]; nix.settings.experimental-features = [ "nix-command" diff --git a/nixos/modules/user.nix b/nixos/modules/user.nix index 168cb26..dfab48a 100644 --- a/nixos/modules/user.nix +++ b/nixos/modules/user.nix @@ -27,7 +27,7 @@ ]; hashedPassword = "$6$ShBAPGwzKZuB7eEv$cbb3erUqtVGFo/Vux9UwT2NkbVG9VGCxJxPiZFYL0DIc3t4GpYxjkM0M7fFnh.6V8MoSKLM/TvOtzdWbYwI58."; openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtE+KjKuHUj5bKKQBDKqhO5dpEQf8E8u1G6kRj7y6dI nathan@nixos" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtE+KjKuHUj5bKKQBDKqhO5dpEQf8E8u1G6kRj7y6dI nathan@nixos" ]; };