From 2ed72ee4b3d594a319207af2607901cc96216f37 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Tue, 3 Jun 2025 20:12:32 +0200 Subject: [PATCH] alejandra formatting --- flake.nix | 9 +++-- hosts/wildfire/configuration.nix | 8 +++- hosts/wildfire/hardware-configuration.nix | 46 ++++++++++++----------- modules/common.nix | 17 +++++---- modules/desktop.nix | 8 ++-- modules/programs.nix | 10 +++-- modules/users.nix | 10 +++-- 7 files changed, 64 insertions(+), 44 deletions(-) diff --git a/flake.nix b/flake.nix index c02e04a..2dfacc7 100644 --- a/flake.nix +++ b/flake.nix @@ -10,11 +10,14 @@ # }; }; - outputs = { self, nixpkgs }: { + outputs = { + self, + nixpkgs, + }: { nixosConfigurations = { wildfire = nixpkgs.lib.nixosSystem { - specialArgs = { inputs = self.inputs // { inherit self; }; }; - modules = [ ./hosts/wildfire/configuration.nix ]; + specialArgs = {inputs = self.inputs // {inherit self;};}; + modules = [./hosts/wildfire/configuration.nix]; }; }; }; diff --git a/hosts/wildfire/configuration.nix b/hosts/wildfire/configuration.nix index 6c44738..38c64bb 100644 --- a/hosts/wildfire/configuration.nix +++ b/hosts/wildfire/configuration.nix @@ -1,5 +1,9 @@ -{ config, pkgs, inputs, ... }: { + config, + pkgs, + inputs, + ... +}: { imports = [ ./hardware-configuration.nix ../../modules/common.nix @@ -34,4 +38,4 @@ }; enable = true; }; -} \ No newline at end of file +} diff --git a/hosts/wildfire/hardware-configuration.nix b/hosts/wildfire/hardware-configuration.nix index cc3f2c3..7a1c342 100644 --- a/hosts/wildfire/hardware-configuration.nix +++ b/hosts/wildfire/hardware-configuration.nix @@ -1,34 +1,38 @@ # 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" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - boot.kernel.sysctl = { "vm.swappiness" = 10;}; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + boot.kernel.sysctl = {"vm.swappiness" = 10;}; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f23b65a6-9564-4120-bf58-69cf6312eecc"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/f23b65a6-9564-4120-bf58-69cf6312eecc"; + fsType = "ext4"; + }; boot.initrd.luks.devices."luks-be9995ed-6b36-4f4d-a374-28a85fc50ed8".device = "/dev/disk/by-uuid/be9995ed-6b36-4f4d-a374-28a85fc50ed8"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/B7CE-982B"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/B7CE-982B"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/2fd893cd-ffc0-4c8d-b071-7520f7a25889"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/2fd893cd-ffc0-4c8d-b071-7520f7a25889";} + ]; # 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/modules/common.nix b/modules/common.nix index 6d8e7fd..cfe1f80 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,6 +1,9 @@ -{ config, pkgs, inputs, ... }: - { + config, + pkgs, + inputs, + ... +}: { imports = [ ./desktop.nix ./users.nix @@ -11,14 +14,14 @@ boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; - initrd.kernelModules = [ "amdgpu" ]; + initrd.kernelModules = ["amdgpu"]; kernelPackages = pkgs.linuxPackages_latest; }; # Enable networking networking.networkmanager.enable = true; - # Network security + # Network security # enable firewall and block all ports networking.firewall.enable = true; @@ -62,9 +65,9 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - + # Enable Flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; # Automatic system upgrades system.autoUpgrade = { @@ -109,4 +112,4 @@ # settings for stateful data, like file locations and database versions # on your system were taken. system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/modules/desktop.nix b/modules/desktop.nix index b136b3a..4d86098 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { services.xserver = { # Enable the X11 windowing system. enable = true; @@ -15,4 +17,4 @@ variant = ""; }; }; -} \ No newline at end of file +} diff --git a/modules/programs.nix b/modules/programs.nix index 7b96583..06cf151 100644 --- a/modules/programs.nix +++ b/modules/programs.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # Common packages for ALL systems environment.systemPackages = with pkgs; [ # networking @@ -98,9 +100,9 @@ qemu = { swtpm.enable = true; ovmf.enable = true; - ovmf.packages = [ pkgs.OVMFFull.fd ]; + ovmf.packages = [pkgs.OVMFFull.fd]; }; }; spiceUSBRedirection.enable = true; }; -} \ No newline at end of file +} diff --git a/modules/users.nix b/modules/users.nix index 0384d1a..6bcce21 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -1,14 +1,16 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # Define the main user account users = { users.schulze = { isNormalUser = true; description = "Felix Schulze"; - extraGroups = [ "networkmanager" "wheel" "docker" ]; + extraGroups = ["networkmanager" "wheel" "docker"]; shell = pkgs.fish; }; groups.libvirtd.members = ["schulze"]; }; -} \ No newline at end of file +}