reformat all nix code
1 file changed, 92 insertions(+), 75 deletions(-)
changed files
M flake.nix → flake.nix
@@ -33,69 +33,80 @@ }; }; outputs = - inputs@ - { self - , utils - , srvos - , nixpkgs - , nixos-hardware - , nur - , home-manager - , darwin - , nix-index-database - , nixvim - , angrr - , agenix - , deploy-rs - , elgit - , mycal - , searchix - , golink - , ... + inputs@{ + self, + utils, + srvos, + nixpkgs, + nixos-hardware, + nur, + home-manager, + darwin, + nix-index-database, + nixvim, + angrr, + agenix, + deploy-rs, + elgit, + mycal, + searchix, + golink, + ... }: let - readOverlays = path: - let content = builtins.readDir path; in - map (n: import (path + ("/" + n))) - (builtins.filter - (n: - (builtins.match ".*\\.nix" n != null && - # ignore Emacs lock files (.#foo.nix) - builtins.match "\\.#.*" n == null) || - builtins.pathExists (path + ("/" + n + "/default.nix"))) - (builtins.attrNames content)); + readOverlays = + path: + let + content = builtins.readDir path; + in + map (n: import (path + ("/" + n))) ( + builtins.filter ( + n: + ( + builtins.match ".*\\.nix" n != null + && + # ignore Emacs lock files (.#foo.nix) + builtins.match "\\.#.*" n == null + ) + || builtins.pathExists (path + ("/" + n + "/default.nix")) + ) (builtins.attrNames content) + ); - mkHomeConfiguration = { modules, system }: home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - overlays = readOverlays (toString ./overlays) ++ [ - agenix.overlays.default - angrr.overlays.default - (self: super: { - personal = import ./packages/overlay.nix self super; - }) - ]; - }; + mkHomeConfiguration = + { modules, system }: + home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + overlays = readOverlays (toString ./overlays) ++ [ + agenix.overlays.default + angrr.overlays.default + (self: super: { + personal = import ./packages/overlay.nix self super; + }) + ]; + }; - inherit modules; - extraSpecialArgs = { - inherit inputs system; + inherit modules; + extraSpecialArgs = { + inherit inputs system; + }; }; - }; in { nixosConfigurations.prefect = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; specialArgs = { inherit inputs; }; - modules = [ - ./system/prefect.nix - ] ++ (with nixos-hardware.nixosModules; [ - common-cpu-amd - common-cpu-amd-pstate - common-pc-ssd - common-pc - common-gpu-nvidia-nonprime - ]); + modules = + [ + ./system/prefect.nix + ] + ++ (with nixos-hardware.nixosModules; [ + common-cpu-amd + common-cpu-amd-pstate + common-pc-ssd + common-pc + common-gpu-nvidia-nonprime + ]); }; nixosConfigurations.nano = nixpkgs.lib.nixosSystem { system = utils.lib.system.aarch64-linux;@@ -193,13 +204,15 @@ hostname = "linde"; profiles.system = { user = "root"; sshUser = "root"; - path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos - self.nixosConfigurations.linde; + path = + deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos + self.nixosConfigurations.linde; }; profiles.alan = { user = "alan"; - path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager - self.homeConfigurations."alan@linde"; + path = + deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@linde"; }; }; nodes.nano = {@@ -207,30 +220,34 @@ hostname = "nano"; profiles.system = { user = "root"; sshUser = "root"; - path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos - self.nixosConfigurations.nano; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos self.nixosConfigurations.nano; }; profiles.alan = { user = "alan"; sshUser = "alan"; - path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager - self.homeConfigurations."alan@nano"; + path = + deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@nano"; }; }; }; - } // utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - in - { - devShells = { - default = pkgs.mkShell { - packages = with pkgs; [ - nixos-rebuild - deploy-rs.packages.${system}.default - agenix.packages.${system}.default - ]; + } + // utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = { + default = pkgs.mkShell { + packages = with pkgs; [ + nixos-rebuild + deploy-rs.packages.${system}.default + agenix.packages.${system}.default + ]; + }; }; - }; - }); + formatter = pkgs.nixfmt-tree; + } + ); }