Compare commits
13 Commits
ab0a249eca
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| aa2b4bbc2e | |||
|
|
865030f5c1 | ||
| f695652bab | |||
|
|
8b4b5897df | ||
| 56b9f7b8d9 | |||
|
|
5f659e19bb | ||
| 8ed749e5f7 | |||
|
|
ff4217466d | ||
|
|
0e45834e45 | ||
| 85d5009104 | |||
|
|
88e7196148 | ||
| 8b4d3e1a13 | |||
|
|
fb0ddd9548 |
76
flake.lock
generated
76
flake.lock
generated
@@ -45,11 +45,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779036909,
|
"lastModified": 1781242433,
|
||||||
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -102,12 +102,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779258371,
|
"lastModified": 1781168557,
|
||||||
"narHash": "sha256-j1iZsLy6oFApqR1oiDmHhvkwxXqcNi0aoSJj643LuwU=",
|
"narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "c97bc4d15bd3473dd095e8e8ba57330ab1943a77",
|
"rev": "6358ff76821101c178e3ab4919a62799bfe3652e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -174,11 +177,11 @@
|
|||||||
},
|
},
|
||||||
"nixUnstable": {
|
"nixUnstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779536132,
|
"lastModified": 1781328464,
|
||||||
"narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=",
|
"narHash": "sha256-j9uBlHI0eJ9zWU9IlF6SlBBPdeJu30hcvar31IRKHpw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456",
|
"rev": "5a722a7155bfc9fbe657f28d26b71860d95324bc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -190,18 +193,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779102034,
|
"lastModified": 1767892417,
|
||||||
"narHash": "sha256-vZJZjLo513IeI8hjzHFc6TDezUd4uCE2Eq4SNO3DNNg=",
|
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
|
||||||
"owner": "nixos",
|
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
||||||
"repo": "nixpkgs",
|
"type": "tarball",
|
||||||
"rev": "687f05a9184cad4eaf905c48b63649e3a86f5433",
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"type": "tarball",
|
||||||
"ref": "nixos-25.11",
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
@@ -221,11 +221,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779508470,
|
"lastModified": 1780952837,
|
||||||
"narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=",
|
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "29916453413845e54a65b8a1cf996842300cd299",
|
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781074563,
|
||||||
|
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -238,14 +254,14 @@
|
|||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779586422,
|
"lastModified": 1781400420,
|
||||||
"narHash": "sha256-gQkg/IFgLNmcfm8/IzlkxzRQche90YB+6ziTTuXcjSM=",
|
"narHash": "sha256-HDTf2EhvFB5TRl+DP4hEMbvVvcQ6ZNMgM9XzBK1PVyA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "72d24686031cfcc123c1511836df64e6fde27453",
|
"rev": "1a49876ef73f9aa1c7b88cc6fdbfc81e582ae72a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -262,7 +278,7 @@
|
|||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-colors": "nix-colors",
|
"nix-colors": "nix-colors",
|
||||||
"nixUnstable": "nixUnstable",
|
"nixUnstable": "nixUnstable",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
@@ -274,11 +290,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777944972,
|
"lastModified": 1780547341,
|
||||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ let
|
|||||||
cfg = config.syscfg.server.containers;
|
cfg = config.syscfg.server.containers;
|
||||||
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
|
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
|
||||||
containerSetsList = lib.mapAttrsToList (name: containerCfg:
|
containerSetsList = lib.mapAttrsToList (name: containerCfg:
|
||||||
import (./defs + "/${name}.nix") {
|
let defs = import (./defs + "/${name}.nix") {inherit config pkgs lib containerCfg;};
|
||||||
inherit config pkgs lib containerCfg;
|
in{
|
||||||
|
containers = lib.mapAttrs' (cName: cValue:
|
||||||
|
lib.nameValuePair "${name}-${cName}" cValue
|
||||||
|
) defs.containers;
|
||||||
}
|
}
|
||||||
) enabledConfigs;
|
) enabledConfigs;
|
||||||
mergedContainers = lib.attrsets.mergeAttrsList (lib.map(e: e.containers) containerSetsList);
|
mergedContainers = lib.attrsets.mergeAttrsList (lib.map(e: e.containers) containerSetsList);
|
||||||
allPathConfigs = lib.flatten (lib.map (e: e.paths or []) containerSetsList);
|
allPathConfigs = lib.flatten (lib.map (e: e.paths or []) containerSetsList);
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ in {
|
|||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
|
|
||||||
auth_server = {
|
server = {
|
||||||
image = "ghcr.io/goauthentik/server:latest";
|
image = "ghcr.io/goauthentik/server:latest";
|
||||||
hostname = "auth_server";
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${serverCfg.dataPath}/authentik/media:/media"
|
"${serverCfg.dataPath}/authentik/media:/media"
|
||||||
"${serverCfg.dataPath}/authentik/templates:/templates"
|
"${serverCfg.dataPath}/authentik/templates:/templates"
|
||||||
@@ -47,8 +46,6 @@ in {
|
|||||||
cmd = [ "server" ];
|
cmd = [ "server" ];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--add-host=host.containers.internal:host-gateway"
|
"--add-host=host.containers.internal:host-gateway"
|
||||||
"--replace"
|
|
||||||
"--rm"
|
|
||||||
"--ip=${containerCfg.ip}"
|
"--ip=${containerCfg.ip}"
|
||||||
];
|
];
|
||||||
ports = [
|
ports = [
|
||||||
@@ -56,9 +53,8 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
auth_worker = {
|
worker = {
|
||||||
image = "ghcr.io/goauthentik/server:latest";
|
image = "ghcr.io/goauthentik/server:latest";
|
||||||
hostname = "auth_worker";
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${serverCfg.dataPath}/authentik/media:/media"
|
"${serverCfg.dataPath}/authentik/media:/media"
|
||||||
"${serverCfg.dataPath}/authentik/templates:/templates"
|
"${serverCfg.dataPath}/authentik/templates:/templates"
|
||||||
@@ -75,8 +71,6 @@ in {
|
|||||||
};
|
};
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--add-host=host.containers.internal:host-gateway"
|
"--add-host=host.containers.internal:host-gateway"
|
||||||
"--replace"
|
|
||||||
"--rm"
|
|
||||||
];
|
];
|
||||||
cmd = [ "worker" ];
|
cmd = [ "worker" ];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user