From 9cdb4461a465374d9d2d9062d91c37816f7f3086 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 23 Sep 2024 13:17:10 +0100 Subject: [PATCH] Format --- home/opdavies/modules/alacritty.nix | 14 +++++++-- hosts/lemp11/configuration.nix | 19 ++++++----- hosts/lemp11/hardware-configuration.nix | 42 +++++++++++++++---------- run | 4 +++ 4 files changed, 52 insertions(+), 27 deletions(-) diff --git a/home/opdavies/modules/alacritty.nix b/home/opdavies/modules/alacritty.nix index f2366cd..7f090f0 100644 --- a/home/opdavies/modules/alacritty.nix +++ b/home/opdavies/modules/alacritty.nix @@ -1,10 +1,16 @@ -{ lib, pkgs, self, ... }: +{ + lib, + pkgs, + self, + ... +}: let inherit (lib) strings; inherit (strings) toInt; theme = import "${self}/lib/theme" { inherit pkgs; }; -in { +in +{ programs.alacritty = { enable = true; @@ -30,7 +36,9 @@ in { glyph_offset.y = 6; }; - shell = { program = "zsh"; }; + shell = { + program = "zsh"; + }; }; }; } diff --git a/hosts/lemp11/configuration.nix b/hosts/lemp11/configuration.nix index 34e9ac6..40a4223 100644 --- a/hosts/lemp11/configuration.nix +++ b/hosts/lemp11/configuration.nix @@ -5,10 +5,10 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -88,11 +88,14 @@ users.users.opdavies = { isNormalUser = true; description = "Oliver Davies"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ + "networkmanager" + "wheel" + ]; packages = with pkgs; [ firefox kate - # thunderbird + # thunderbird ]; }; @@ -102,8 +105,8 @@ # 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/hosts/lemp11/hardware-configuration.nix b/hosts/lemp11/hardware-configuration.nix index c534659..a01d787 100644 --- a/hosts/lemp11/hardware-configuration.nix +++ b/hosts/lemp11/hardware-configuration.nix @@ -1,31 +1,41 @@ # 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" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + "sdhci_pci" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/e577c869-18a1-4830-9e00-124fcabdab89"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/e577c869-18a1-4830-9e00-124fcabdab89"; + fsType = "ext4"; + }; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/48FE-D346"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/48FE-D346"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/2dce327b-f18d-4727-a9a2-e79d2b5161f9"; } - ]; + swapDevices = [ { device = "/dev/disk/by-uuid/2dce327b-f18d-4727-a9a2-e79d2b5161f9"; } ]; # 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/run b/run index 4940322..733363a 100755 --- a/run +++ b/run @@ -8,6 +8,10 @@ function check { nix flake check } +function format { + nix fmt flake.nix home hosts lib modules +} + function help { printf "%s [args]\n\nTasks:\n" "$0"