From f6425103b721a51dc70efa0eb6874094bf502268 Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Wed, 9 Oct 2024 17:07:27 +0200 Subject: [PATCH] style: fmt --- configuration.nix | 12 ++++------- flake.nix | 54 ++++++++++++++++------------------------------- hardware.nix | 10 ++------- 3 files changed, 24 insertions(+), 52 deletions(-) diff --git a/configuration.nix b/configuration.nix index df7abdb..62b9096 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,10 +1,10 @@ { lib, pkgs, ... }: { - imports = [ - ./hardware.nix + imports = [ + ./hardware.nix - ./photoprism.nix + ./photoprism.nix ./immich.nix ]; @@ -33,11 +33,7 @@ security.acme.defaults.email = "webmaster@nixos.org"; # TODO: open the right ports - networking.firewall.allowedTCPPorts = [ - 80 - 443 - 8007 - ]; + networking.firewall.allowedTCPPorts = [ 80 443 8007 ]; networking.firewall.allowedUDPPorts = [ ]; networking.useNetworkd = true; diff --git a/flake.nix b/flake.nix index e2e7405..168425f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,51 +18,33 @@ }; }; - outputs = - { - self, - nixpkgs, - flake-utils, - colmena, - disko, - ... - }@inputs: - let - lib = nixpkgs.lib; - in - { + outputs = { self, nixpkgs, flake-utils, colmena, disko, ... }@inputs: + let lib = nixpkgs.lib; + in { - nixosConfigurations = builtins.mapAttrs ( - name: value: + nixosConfigurations = builtins.mapAttrs (name: value: nixpkgs.lib.nixosSystem { lib = lib; system = "x86_64-linux"; - specialArgs = { - inherit inputs; - }; - modules = [ - value - disko.nixosModules.disko - ]; + specialArgs = { inherit inputs; }; + modules = [ value disko.nixosModules.disko ]; extraModules = [ inputs.colmena.nixosModules.deploymentOptions ]; - } - ) { photoprism = import ./configuration.nix; }; + }) { photoprism = import ./configuration.nix; }; colmena = { meta = { nixpkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; - nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations; + nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) + self.nixosConfigurations; specialArgs.lib = lib; }; - } // builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) self.nixosConfigurations; - } - // flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - devShell = pkgs.mkShell { buildInputs = with pkgs; [ colmena.packages.${system}.colmena ]; }; - } - ); + } // builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) + self.nixosConfigurations; + } // flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ colmena.packages.${system}.colmena ]; + }; + }); } diff --git a/hardware.nix b/hardware.nix index 10dac0c..46f5e7f 100644 --- a/hardware.nix +++ b/hardware.nix @@ -3,14 +3,8 @@ { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ - "ata_piix" - "uhci_hcd" - "virtio_pci" - "virtio_scsi" - "sd_mod" - "sr_mod" - ]; + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ];