From 6befe2e0fe319b92c498bc5dab8c400a2eb009a3 Mon Sep 17 00:00:00 2001 From: cnst Date: Thu, 29 Aug 2024 09:04:01 +0200 Subject: [PATCH] removed lingering nixpkgs-fmt --- home/modules/devtools/nixvim/plugins/lsp.nix | 8 +- .../devtools/nixvim/plugins/nonels.nix | 2 +- hosts/cnix/hardware-configuration.nix | 33 ++-- hosts/default.nix | 159 +++++++++--------- system/dev/default.nix | 2 +- 5 files changed, 104 insertions(+), 100 deletions(-) diff --git a/home/modules/devtools/nixvim/plugins/lsp.nix b/home/modules/devtools/nixvim/plugins/lsp.nix index 57423f7f..9f997950 100644 --- a/home/modules/devtools/nixvim/plugins/lsp.nix +++ b/home/modules/devtools/nixvim/plugins/lsp.nix @@ -52,9 +52,11 @@ in { yamlls.enable = true; lua-ls = { enable = true; - settings.telemetry.enable = false; - settings.diagnostics = { - globals = ["vim"]; + settings = { + telemetry.enable = false; + diagnostics = { + globals = ["vim"]; + }; }; }; tsserver = { diff --git a/home/modules/devtools/nixvim/plugins/nonels.nix b/home/modules/devtools/nixvim/plugins/nonels.nix index 6b5b68f6..2b229b33 100644 --- a/home/modules/devtools/nixvim/plugins/nonels.nix +++ b/home/modules/devtools/nixvim/plugins/nonels.nix @@ -32,7 +32,7 @@ in { alejandra.enable = true; stylua.enable = true; shfmt.enable = true; - nixpkgs_fmt.enable = true; + nixpkgs_fmt.enable = false; google_java_format.enable = false; prettier = { enable = true; diff --git a/hosts/cnix/hardware-configuration.nix b/hosts/cnix/hardware-configuration.nix index 8af32dd2..572454b4 100644 --- a/hosts/cnix/hardware-configuration.nix +++ b/hosts/cnix/hardware-configuration.nix @@ -1,15 +1,16 @@ -{ config -, lib -, modulesPath -, ... +{ + config, + lib, + modulesPath, + ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd = { - availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - kernelModules = [ ]; + availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + kernelModules = []; luks.devices."enc".device = "/dev/disk/by-uuid/1bda09f1-5b2c-4040-ab71-cee54a6df910"; postDeviceCommands = lib.mkAfter '' mkdir /mnt @@ -18,51 +19,51 @@ btrfs subvolume snapshot /mnt/root-blank /mnt/root ''; }; - kernelModules = [ "kvm-amd" ]; - extraModulePackages = [ ]; - supportedFilesystems = [ "btrfs" ]; + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + supportedFilesystems = ["btrfs"]; }; fileSystems = { "/" = { device = "/dev/disk/by-uuid/529700f1-0da2-4e1e-91bc-617c267df1dd"; fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" ]; + options = ["subvol=root" "compress=zstd"]; }; "/home" = { device = "/dev/disk/by-uuid/529700f1-0da2-4e1e-91bc-617c267df1dd"; fsType = "btrfs"; - options = [ "subvol=home" "compress=zstd" ]; + options = ["subvol=home" "compress=zstd"]; }; "/nix" = { device = "/dev/disk/by-uuid/529700f1-0da2-4e1e-91bc-617c267df1dd"; fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; + options = ["subvol=nix" "compress=zstd" "noatime"]; }; "/persist" = { device = "/dev/disk/by-uuid/529700f1-0da2-4e1e-91bc-617c267df1dd"; fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" ]; + options = ["subvol=persist" "compress=zstd"]; }; "/var/log" = { device = "/dev/disk/by-uuid/529700f1-0da2-4e1e-91bc-617c267df1dd"; fsType = "btrfs"; - options = [ "subvol=log" "compress=zstd" ]; + options = ["subvol=log" "compress=zstd"]; neededForBoot = true; }; "/boot" = { device = "/dev/disk/by-uuid/12CE-A600"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" "umask=0077" ]; + options = ["fmask=0022" "dmask=0022" "umask=0077"]; }; }; - swapDevices = [ ]; + swapDevices = []; # 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/hosts/default.nix b/hosts/default.nix index a7494a0d..73feda74 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,88 +1,89 @@ # Yanked from fufexan! -{ - inputs, - homeImports, - self, - ... +{ inputs +, homeImports +, self +, ... }: { - flake.nixosConfigurations = let - # custom paths - userConfig = "${self}/home"; - systemConfig = "${self}/system"; - hostConfig = "${self}/hosts"; + flake.nixosConfigurations = + let + # custom paths + userConfig = "${self}/home"; + systemConfig = "${self}/system"; + hostConfig = "${self}/hosts"; - cnstConfig = "${self}/home/users/cnst"; - toothpickConfig = "${self}/home/users/toothpick"; - adamConfig = "${self}/home/users/adam"; + cnstConfig = "${self}/home/users/cnst"; + toothpickConfig = "${self}/home/users/toothpick"; + adamConfig = "${self}/home/users/adam"; - userModules = "${self}/home/modules"; - systemModules = "${self}/system/modules"; + userModules = "${self}/home/modules"; + systemModules = "${self}/system/modules"; - # shorten paths - inherit (inputs.nixpkgs.lib) nixosSystem; - mod = "${systemConfig}"; + # shorten paths + inherit (inputs.nixpkgs.lib) nixosSystem; + mod = "${systemConfig}"; - # get the basic config to build on top of - inherit (import "${systemConfig}") shared; + # get the basic config to build on top of + inherit (import "${systemConfig}") shared; - # get these into the module system - specialArgs = {inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig adamConfig userModules systemModules;}; - in { - cnix = nixosSystem { - inherit specialArgs; - modules = - shared - ++ [ - ./cnix - "${mod}/boot/lanzaboote" - "${mod}/nix/nh/cnix" - { - home-manager = { - users.cnst.imports = homeImports."cnst@cnix"; - extraSpecialArgs = specialArgs; - }; - } - inputs.chaotic.nixosModules.default - inputs.sops-nix.nixosModules.sops - (import "${mod}/dev") - ]; + # get these into the module system + specialArgs = { inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig adamConfig userModules systemModules; }; + in + { + cnix = nixosSystem { + inherit specialArgs; + modules = + shared + ++ [ + ./cnix + "${mod}/boot/lanzaboote" + "${mod}/nix/nh/cnix" + { + home-manager = { + users.cnst.imports = homeImports."cnst@cnix"; + extraSpecialArgs = specialArgs; + }; + } + inputs.chaotic.nixosModules.default + inputs.sops-nix.nixosModules.sops + (import "${mod}/dev") + ]; + }; + toothpc = nixosSystem { + inherit specialArgs; + modules = + shared + ++ [ + ./toothpc + "${mod}/boot/lanzaboote" + "${mod}/nix/nh/toothpc" + { + home-manager = { + users.toothpick.imports = homeImports."toothpick@toothpc"; + extraSpecialArgs = specialArgs; + }; + } + inputs.chaotic.nixosModules.default + inputs.sops-nix.nixosModules.sops + (import "${mod}/dev") + ]; + }; + adampad = nixosSystem { + inherit specialArgs; + modules = + shared + ++ [ + ./adampad + "${mod}/boot" + "${mod}/nix/nh/adampad" + { + home-manager = { + users.adam.imports = homeImports."adam@adampad"; + extraSpecialArgs = specialArgs; + }; + } + inputs.chaotic.nixosModules.default + inputs.sops-nix.nixosModules.sops + ]; + }; }; - toothpc = nixosSystem { - inherit specialArgs; - modules = - shared - ++ [ - ./toothpc - "${mod}/boot/lanzaboote" - "${mod}/nix/nh/toothpc" - { - home-manager = { - users.toothpick.imports = homeImports."toothpick@toothpc"; - extraSpecialArgs = specialArgs; - }; - } - inputs.chaotic.nixosModules.default - inputs.sops-nix.nixosModules.sops - (import "${mod}/dev") - ]; - }; - adampad = nixosSystem { - inherit specialArgs; - modules = - shared - ++ [ - ./adampad - "${mod}/boot" - "${mod}/nix/nh/adampad" - { - home-manager = { - users.adam.imports = homeImports."adam@adampad"; - extraSpecialArgs = specialArgs; - }; - } - inputs.chaotic.nixosModules.default - inputs.sops-nix.nixosModules.sops - ]; - }; - }; } diff --git a/system/dev/default.nix b/system/dev/default.nix index 8c0af4b6..fdb68020 100644 --- a/system/dev/default.nix +++ b/system/dev/default.nix @@ -24,7 +24,7 @@ # Other utilities and tools openssl # Required for some crates that involve networking or encryption - # alejandra + alejandra # nixd # pyright # yaml-language-server