diff options
author | lassulus <lassulus@lassul.us> | 2017-08-26 17:18:58 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-08-26 18:18:50 +0200 |
commit | d6aee94277e4329db12d0dfd78fbd6ab58fdeab7 (patch) | |
tree | f84b486b8a366a7e52b71bd110bfddabf15ab787 /krebs/1systems | |
parent | d970e20a5a706a0aef494f887f2a771571350b5a (diff) |
init hope.r
Diffstat (limited to 'krebs/1systems')
-rw-r--r-- | krebs/1systems/hope/config.nix | 41 | ||||
-rw-r--r-- | krebs/1systems/hope/source.nix | 3 |
2 files changed, 44 insertions, 0 deletions
diff --git a/krebs/1systems/hope/config.nix b/krebs/1systems/hope/config.nix new file mode 100644 index 000000000..c19b210c5 --- /dev/null +++ b/krebs/1systems/hope/config.nix @@ -0,0 +1,41 @@ +with import <stockholm/lib>; +{ config, pkgs, ... }: let + + ip = config.krebs.build.host.nets.internet.ip4.addr; + bestGuessGateway = addr: elemAt (match "(.*)(\.[^.])" addr) 0 + ".1"; + +in { + imports = [ + <stockholm/krebs> + <stockholm/krebs/2configs> + <stockholm/krebs/2configs/os-templates/CAC-CentOS-7-64bit.nix> + + <stockholm/krebs/2configs/secret-passwords.nix> + { + users.extraUsers = { + satan = { + name = "satan"; + uid = 1338; + home = "/home/satan"; + group = "users"; + createHome = true; + useDefaultShell = true; + initialPassword = "test"; + }; + }; + } + ]; + + krebs.build.host = config.krebs.hosts.hope; + + networking = let + address = config.krebs.build.host.nets.internet.ip4.addr; + in { + defaultGateway = bestGuessGateway address; + interfaces.enp2s1.ip4 = singleton { + inherit address; + prefixLength = 24; + }; + nameservers = ["8.8.8.8"]; + }; +} diff --git a/krebs/1systems/hope/source.nix b/krebs/1systems/hope/source.nix new file mode 100644 index 000000000..7121d1d9d --- /dev/null +++ b/krebs/1systems/hope/source.nix @@ -0,0 +1,3 @@ +import <stockholm/krebs/source.nix> { + name = "hope"; +} |