From c8b8f5b031cb3a7fbd1328cfe9bfd32753eed27f Mon Sep 17 00:00:00 2001 From: Noah Pederson Date: Thu, 11 Dec 2025 15:23:01 -0600 Subject: [PATCH] Autoformat with nixfmt --- configuration.nix | 21 +++++------ flake.nix | 19 +++++----- gui.nix | 1 - hardware-configuration.nix | 77 +++++++++++++++++++++++++++----------- home.nix | 7 ++-- networking.nix | 19 ++++++++-- packages.nix | 24 ++++++------ users.nix | 7 ++-- 8 files changed, 111 insertions(+), 64 deletions(-) diff --git a/configuration.nix b/configuration.nix index b6f4909..161938c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,17 +4,16 @@ { ... }: { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ./boot.nix - ./networking.nix - #./gui.nix - ./users.nix - ./packages.nix - ./services.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ./boot.nix + ./networking.nix + #./gui.nix + ./users.nix + ./packages.nix + ./services.nix + ]; nixpkgs.config.allowUnfree = true; diff --git a/flake.nix b/flake.nix index 16c0299..1b31f0e 100644 --- a/flake.nix +++ b/flake.nix @@ -18,14 +18,15 @@ }; outputs = - { self - , nixpkgs - , nixpkgs-unstable - , determinite - , home-manager - , pre-commit-hooks - , agenix - , ... + { + self, + nixpkgs, + nixpkgs-unstable, + determinite, + home-manager, + pre-commit-hooks, + agenix, + ... }@inputs: let supportedSystems = [ @@ -80,7 +81,7 @@ # If your hooks are intrusive, avoid running on each commit with a default_states like this: # default_stages = ["manual" "push"]; hooks = { - nixpkgs-fmt.enable = true; + nixfmt.enable = true; nil.enable = true; luacheck.enable = true; }; diff --git a/gui.nix b/gui.nix index 575a07c..7e567ad 100644 --- a/gui.nix +++ b/gui.nix @@ -38,7 +38,6 @@ ]; }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 8e73427..96e8ade 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,18 +1,51 @@ # 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, pkgs, ... }: +{ + config, + lib, + modulesPath, + pkgs, + ... +}: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ "kvm-amd" "amdgpu" "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; - boot.kernelModules = [ "kvm-amd" "amdgpu" "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "usbhid" + "sd_mod" + "sdhci_pci" + ]; + boot.initrd.kernelModules = [ + "kvm-amd" + "amdgpu" + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "usbhid" + "sd_mod" + "sdhci_pci" + ]; + boot.kernelModules = [ + "kvm-amd" + "amdgpu" + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "usbhid" + "sd_mod" + "sdhci_pci" + ]; virtualisation.libvirtd = { enable = true; qemu = { @@ -24,22 +57,22 @@ hardware.enableRedistributableFirmware = true; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/07019c69-2597-410d-a8a0-a8ffb0f58883"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/07019c69-2597-410d-a8a0-a8ffb0f58883"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/4B85-C90A"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/4B85-C90A"; + fsType = "vfat"; + }; - swapDevices = [{ - device = "/swapfile"; - size = 32 * 1024; - }]; + swapDevices = [ + { + device = "/swapfile"; + size = 32 * 1024; + } + ]; # sysctls for Agave boot.kernel.sysctl."net.core.rmem_default" = 134217728; diff --git a/home.nix b/home.nix index 73ce7f0..94e64dc 100644 --- a/home.nix +++ b/home.nix @@ -1,6 +1,7 @@ -{ pkgs -, unstable -, ... +{ + pkgs, + unstable, + ... }: { home.sessionVariables = { diff --git a/networking.nix b/networking.nix index 7501f91..db3c8e9 100644 --- a/networking.nix +++ b/networking.nix @@ -31,7 +31,10 @@ allowedUDPPorts = [ ]; allowedUDPPortRanges = [ # Agave - { from = 8000; to = 8020; } + { + from = 8000; + to = 8020; + } ]; allowedTCPPorts = [ 2375 @@ -65,12 +68,22 @@ "/srv/shokuhou" = { device = "192.168.1.3:/srv/shokuhou"; fsType = "nfs"; - options = [ "nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600" ]; + options = [ + "nfsvers=4" + "user" + "x-system.automount" + "x-system.idle-timeout=600" + ]; }; "/srv/mentalout" = { device = "192.168.1.3:/srv/mentalout"; fsType = "nfs"; - options = [ "nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600" ]; + options = [ + "nfsvers=4" + "user" + "x-system.automount" + "x-system.idle-timeout=600" + ]; }; }; } diff --git a/packages.nix b/packages.nix index 02631c6..5ccab9d 100644 --- a/packages.nix +++ b/packages.nix @@ -3,7 +3,7 @@ let # bash script to let dbus know about important env variables and # propagate them to relevent services run at the end of sway config # see # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist - # note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts + # note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts # some user services to make sure they have the correct environment variables dbus-sway-environment = pkgs.writeTextFile { name = "dbus-sway-environment"; @@ -123,19 +123,19 @@ in # UEFI firmware support for QEMU systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ]; - - # Logseq uses an ancient version of Electron, so we enable that nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ]; # Whitelist some unfree packages - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "discord" - "spotify" - "obsidian" - "unstable.obsidian" - "tailscale" - "google-chrome" - "slack" - ]; + nixpkgs.config.allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "discord" + "spotify" + "obsidian" + "unstable.obsidian" + "tailscale" + "google-chrome" + "slack" + ]; } diff --git a/users.nix b/users.nix index 751d264..c05d5a2 100644 --- a/users.nix +++ b/users.nix @@ -1,6 +1,7 @@ -{ pkgs -, lib -, ... +{ + pkgs, + lib, + ... }: { -- 2.51.2