style: fmt
This commit is contained in:
parent
5b36d052ed
commit
f6425103b7
3 changed files with 24 additions and 52 deletions
|
@ -1,10 +1,10 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
|
||||||
./photoprism.nix
|
./photoprism.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -33,11 +33,7 @@
|
||||||
security.acme.defaults.email = "webmaster@nixos.org";
|
security.acme.defaults.email = "webmaster@nixos.org";
|
||||||
|
|
||||||
# TODO: open the right ports
|
# TODO: open the right ports
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [ 80 443 8007 ];
|
||||||
80
|
|
||||||
443
|
|
||||||
8007
|
|
||||||
];
|
|
||||||
networking.firewall.allowedUDPPorts = [ ];
|
networking.firewall.allowedUDPPorts = [ ];
|
||||||
|
|
||||||
networking.useNetworkd = true;
|
networking.useNetworkd = true;
|
||||||
|
|
54
flake.nix
54
flake.nix
|
@ -18,51 +18,33 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = { self, nixpkgs, flake-utils, colmena, disko, ... }@inputs:
|
||||||
{
|
let lib = nixpkgs.lib;
|
||||||
self,
|
in {
|
||||||
nixpkgs,
|
|
||||||
flake-utils,
|
|
||||||
colmena,
|
|
||||||
disko,
|
|
||||||
...
|
|
||||||
}@inputs:
|
|
||||||
let
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
nixosConfigurations = builtins.mapAttrs (
|
nixosConfigurations = builtins.mapAttrs (name: value:
|
||||||
name: value:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
lib = lib;
|
lib = lib;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = { inherit inputs; };
|
||||||
inherit inputs;
|
modules = [ value disko.nixosModules.disko ];
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
value
|
|
||||||
disko.nixosModules.disko
|
|
||||||
];
|
|
||||||
extraModules = [ inputs.colmena.nixosModules.deploymentOptions ];
|
extraModules = [ inputs.colmena.nixosModules.deploymentOptions ];
|
||||||
}
|
}) { photoprism = import ./configuration.nix; };
|
||||||
) { photoprism = import ./configuration.nix; };
|
|
||||||
|
|
||||||
colmena = {
|
colmena = {
|
||||||
meta = {
|
meta = {
|
||||||
nixpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
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;
|
specialArgs.lib = lib;
|
||||||
};
|
};
|
||||||
} // builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) self.nixosConfigurations;
|
} // builtins.mapAttrs (_: v: { imports = v._module.args.modules; })
|
||||||
}
|
self.nixosConfigurations;
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
} // flake-utils.lib.eachDefaultSystem (system:
|
||||||
system:
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
let
|
in {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
devShell = pkgs.mkShell {
|
||||||
in
|
buildInputs = with pkgs; [ colmena.packages.${system}.colmena ];
|
||||||
{
|
};
|
||||||
devShell = pkgs.mkShell { buildInputs = with pkgs; [ colmena.packages.${system}.colmena ]; };
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
10
hardware.nix
10
hardware.nix
|
@ -3,14 +3,8 @@
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"ata_piix"
|
[ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
"uhci_hcd"
|
|
||||||
"virtio_pci"
|
|
||||||
"virtio_scsi"
|
|
||||||
"sd_mod"
|
|
||||||
"sr_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
Loading…
Add table
Reference in a new issue