]> Git — Sourcephile - sourcephile-nix.git/blob - servers/losurdo/configuration.nix
nix: add members/*.nix
[sourcephile-nix.git] / servers / losurdo / configuration.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, ... }@attrs:
6 let
7 inherit (builtins) getEnv hasAttr readFile;
8 inherit (builtins.extraBuiltins) pass pass-chomp;
9 inherit (config.users) users;
10 in
11 {
12 # This value determines the NixOS release with which your system is to be
13 # compatible, in order to avoid breaking some software such as database servers.
14 # You should change this only after NixOS release notes say you should.
15 system.stateVersion = "19.09"; # Did you read the comment?
16
17 imports = [
18 (./. + ("/" + getEnv "LOSURDO_DEPLOYMENT" + ".nix"))
19 ../../defaults.nix
20 ../../base/unbound.nix
21 ./users.nix
22 ./transmission.nix
23 #./netdata.nix
24 #./prometheus.nix
25 ] ++ lib.optionals (! hasAttr "nodes" attrs) [
26 <nixops/options.nix>
27 <nixops/resource.nix>
28 ];
29
30 networking = rec {
31 hostName = "losurdo";
32 domainBase = "sourcephile";
33 domain = "${domainBase}.fr";
34 };
35
36 /*
37 environment.etc."sudo.conf".text = ''
38 Debug sudo /var/log/sudo_debug.log all@debug
39 Debug sudoers.so /var/log/sudo_debug.log all@debug
40 '';
41 */
42
43 systemd.coredump.enable = true;
44
45 environment = {
46 enableDebugInfo = true;
47 systemPackages = with pkgs; [
48 cryptsetup
49 direnv
50 file
51 fio
52 gdb
53 git
54 gptfdisk
55 #hey
56 home-manager
57 lm_sensors
58 rsync
59 smartctl-tbw
60 socat
61 sanoid
62 ];
63 };
64 }