move all expressions to nix/; include modularized home-manager config
This commit is contained in:
parent
d76a7f963b
commit
13bd5e9000
65 changed files with 1726 additions and 511 deletions
26
nix/ops/nanos@kn.nix
Normal file
26
nix/ops/nanos@kn.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ nixpkgs ? import <nixpkgs> {}
|
||||
, nrNanos ? 1 # Number of nanos
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs = nixpkgs;
|
||||
webserver = { services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "mail@stefanjunker.de";
|
||||
services.httpd.documentRoot = "${pkgs.nixops}/share/doc/nixops/";
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
|
||||
mkNano = { n }: {
|
||||
imports = [
|
||||
(import ./nano/configuration.nix {inherit pkgs n;})
|
||||
../configuration/common/user/root.nix
|
||||
];
|
||||
deployment.targetEnv = "none";
|
||||
deployment.targetHost = "nano${toString n}";
|
||||
};
|
||||
|
||||
mkNanos = n: nixpkgs.lib.nameValuePair "nano${toString n}" (
|
||||
mkNano { inherit n; }
|
||||
);
|
||||
|
||||
in nixpkgs.lib.listToAttrs (map mkNanos (nixpkgs.lib.range 0 (nrNanos - 1)))
|
Loading…
Add table
Add a link
Reference in a new issue