]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet.nix
mermet: flatten the conf
[sourcephile-nix.git] / servers / mermet.nix
1 # This is the root configuration of the target machine.
2 # Usable by nixos-install and used by nixops.
3 # It is NOT copied nor usable on the target machine,
4 # only the resulting closure is copied to the target machine.
5 {pkgs, lib, config, options, nodes, resources, ...}:
6 let
7 inherit (builtins.extraBuiltins) pass;
8 deployment = builtins.getAttr
9 ( lib.maybeEnv "NIXOPS_DEPLOYMENT" "production")
10 deployments;
11 deployments = {
12 production = [
13 ];
14 staging = [
15 ];
16 };
17 in
18 {
19 # This value determines the NixOS release with which your system is to be
20 # compatible, in order to avoid breaking some software such as database
21 # servers. You should change this only after NixOS release notes say you should.
22 system.stateVersion = "19.09"; # Did you read the comment?
23
24 nixpkgs.overlays = import ../overlays.nix;
25
26 imports =
27 [ ../nixos/defaults.nix
28 mermet/apu2e4.nix
29 mermet/zfs.nix
30 mermet/lesptts.nix
31 mermet/shorewall.nix
32 ] ++ deployment;
33
34 networking = {
35 hostName = "mermet";
36 domain = "sourcephile.fr";
37 };
38
39 users = {
40 mutableUsers = false;
41 users = {
42 root = rec {
43 initialPassword = password;
44 password = pass "servers/mermet/login/root";
45 openssh.authorizedKeys.keys = [
46 (pass "members/julm/ssh.pub")
47 ];
48 };
49 };
50 groups = {
51 };
52 };
53
54 environment = {
55 systemPackages = with pkgs; [
56 cryptsetup
57 fio
58 git
59 gptfdisk
60 lm_sensors
61 smartctl-tbw
62 ];
63 };
64 }