Switch unifi and vaultwarden to docker images
This commit is contained in:
parent
88975f0003
commit
516c6ab493
39
flake.lock
generated
39
flake.lock
generated
@ -7,26 +7,27 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707607386,
|
"lastModified": 1699368917,
|
||||||
"narHash": "sha256-hj/RgQMTvCWQVInkZwiMMieumkfOjHXhtWhfuXHop/8=",
|
"narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "bfd0ae29a86eff4603098683b516c67e22184511",
|
"rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
|
"rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707211557,
|
"lastModified": 1711352745,
|
||||||
"narHash": "sha256-LTKTzZ6fM5j8XWXf51IMBzDaOaJg9kYWLUZxoIhzRN8=",
|
"narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "6e5cc385fc8cf5ca6495d70243074ccdea9f64c7",
|
"rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -37,26 +38,26 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707650133,
|
"lastModified": 1701282334,
|
||||||
"narHash": "sha256-ESHjN3syUAZvuV9z6lToesNeMYiXCPKgsx4+jhxOuVA=",
|
"narHash": "sha256-MxCVrXY6v4QmfTwIysjjaX0XUhqBbxTWWB4HXtDYsdk=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9002908215ae609210c2168494b387ff5728220a",
|
"rev": "057f9aecfb71c4437d2b27d3323df7f93c010b7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"id": "nixpkgs",
|
||||||
"repo": "nixpkgs",
|
"ref": "23.11",
|
||||||
"type": "github"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707603439,
|
"lastModified": 1711233294,
|
||||||
"narHash": "sha256-LodBVZ3+ehJP2azM5oj+JrhfNAAzmTJ/OwAIOn0RfZ0=",
|
"narHash": "sha256-eEu5y4J145BYDw9o/YEmeJyqh8blgnZwuz9k234zuWc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8cd80616c8800feec0cab64331d7c3d5a1a6d98",
|
"rev": "ac6bdf6181666ebb4f90dd20f31e2fa66ede6b68",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -82,11 +83,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707620614,
|
"lastModified": 1711249319,
|
||||||
"narHash": "sha256-gfAoB9dGzBu62NoAoM945aok7+6M+LFu+nvnGwAsTp4=",
|
"narHash": "sha256-N+Pp3/8H+rd7cO71VNV/ovV/Kwt+XNeUHNhsmyTabdM=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "2eb7c4ba3aa75e2660fd217eb1ab64d5b793608e",
|
"rev": "405987a66cce9a4a82f321f11b205982a7127c88",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -123,12 +123,12 @@
|
|||||||
security.rtkit.enable = true; # recommended for pipewire
|
security.rtkit.enable = true; # recommended for pipewire
|
||||||
|
|
||||||
# enable acme for certbot
|
# enable acme for certbot
|
||||||
security.acme = {
|
#security.acme = {
|
||||||
acceptTerms = true;
|
#acceptTerms = true;
|
||||||
defaults = {
|
#defaults = {
|
||||||
email = "jacob.hinkle@gmail.com";
|
#email = "jacob.hinkle@gmail.com";
|
||||||
};
|
#};
|
||||||
};
|
#};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers = let
|
virtualisation.oci-containers.containers = let
|
||||||
ips = {
|
ips = {
|
||||||
@ -144,6 +144,8 @@
|
|||||||
in {
|
in {
|
||||||
home-assistant = import ./home-assistant.nix ips;
|
home-assistant = import ./home-assistant.nix ips;
|
||||||
pihole = import ./pihole.nix ips;
|
pihole = import ./pihole.nix ips;
|
||||||
|
unifi = import ./unifi.nix ips;
|
||||||
|
vaultwarden = import ./vaultwarden.nix ips;
|
||||||
};
|
};
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
@ -186,7 +188,9 @@
|
|||||||
timesyncd.enable = true;
|
timesyncd.enable = true;
|
||||||
|
|
||||||
unifi = {
|
unifi = {
|
||||||
enable = true;
|
# This was causing a full build of mongodb on every nixos-rebuild.
|
||||||
|
# Instead, let's migrate to using the docker image
|
||||||
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
unifiPackage = pkgs.unifiStable;
|
unifiPackage = pkgs.unifiStable;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -90,6 +90,11 @@
|
|||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
fileSystems."/serverdata/unifi" =
|
||||||
|
{ device = "rpool/serverdata/unifi";
|
||||||
|
fsType = "zfs";
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
fileSystems."/serverdata/vaultwarden" =
|
fileSystems."/serverdata/vaultwarden" =
|
||||||
{ device = "rpool/serverdata/vaultwarden";
|
{ device = "rpool/serverdata/vaultwarden";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
enable = true;
|
enable = false;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
virtualHosts = let
|
virtualHosts = let
|
||||||
simpleProxy = ip: {
|
simpleProxy = ip: {
|
||||||
forceSSL = true;
|
forceSSL = false;
|
||||||
enableACME = true;
|
enableACME = false;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
||||||
|
|||||||
19
machines/cj/unifi.nix
Normal file
19
machines/cj/unifi.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ serverIP, serverIP6 } : {
|
||||||
|
image = "jacobalberty/unifi:v8.1";
|
||||||
|
ports = [
|
||||||
|
"8080:8080"
|
||||||
|
"8443:8443"
|
||||||
|
"3478:3478/udp"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
TZ = "America/New_York";
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"/serverdata/unifi:/unifi"
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--cap-add=NET_ADMIN"
|
||||||
|
"--network=host"
|
||||||
|
#"--no-hosts" # do not populate internal /etc/hosts with container host's
|
||||||
|
];
|
||||||
|
}
|
||||||
18
machines/cj/vaultwarden.nix
Normal file
18
machines/cj/vaultwarden.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ serverIP, serverIP6 } : {
|
||||||
|
image = "vaultwarden/server:1.30.5";
|
||||||
|
ports = [
|
||||||
|
"8022:80"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
TZ = "America/New_York";
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"/serverdata/vaultwarden:/data"
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
#"--cap-add=NET_ADMIN"
|
||||||
|
#"--network=host"
|
||||||
|
#"--no-hosts" # do not populate internal /etc/hosts with container host's
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user