# Usable by nixos-install and used by nixops.
# It is NOT copied nor usable on the target machine,
# only the resulting closure is copied to the target machine.
-{ pkgs, lib, config, options
-# NixOps extra module inputs
-, nodes, name, uuid, resources
-, ... }:
+{ pkgs, lib, config, options, ... }:
let
inherit (builtins) readFile;
inherit (builtins.extraBuiltins) pass pass-chomp;
system.stateVersion = "19.09"; # Did you read the comment?
nix = {
- autoOptimiseStore = true;
trustedUsers = [ "julm" ];
};
imports =
[ ../nixos/defaults.nix
- mermet/apu2e4.nix
- mermet/zfs.nix
- mermet/lesptts.nix
- mermet/shorewall.nix
mermet/unbound.nix
- mermet/nsd.nix
+ #mermet/nsd.nix
+ mermet/knot.nix
mermet/openldap.nix
mermet/gitolite.nix
mermet/nginx.nix
mermet/postfix.nix
- #mermet/rspamd.nix
- #mermet/dovecot2.nix
+ mermet/dovecot.nix
+ mermet/rspamd.nix
];
networking = rec {
domain = "${domainBase}.fr";
};
+ /*
+ environment.etc."sudo.conf".text = ''
+ Debug sudo /var/log/sudo_debug.log all@debug
+ Debug sudoers.so /var/log/sudo_debug.log all@debug
+ '';
+ */
+
users = {
mutableUsers = false;
users = {
- root = rec {
- initialPassword = password;
- password = pass-chomp "servers/mermet/login/root";
+ root = {
+ hashedPassword = pass-chomp "servers/mermet/login/root/hashedPassword";
+ openssh.authorizedKeys.keys = [
+ (readFile ../../sec/ssh/julm.pub)
+ (readFile ../../sec/ssh/julm-mob.pub)
+ ];
+ };
+ julm = {
+ uid = 1000;
+ hashedPassword = pass-chomp "servers/mermet/login/julm/hashedPassword";
+ isNormalUser = true;
openssh.authorizedKeys.keys = [
(readFile ../../sec/ssh/julm.pub)
(readFile ../../sec/ssh/julm-mob.pub)
+ (readFile ../../sec/ssh/julm-mermet.pub)
];
};
};
groups = {
+ wheel = {
+ members = [ "julm" ];
+ };
+ julm = {
+ members = [ "julm" ];
+ gid = 1000;
+ };
};
};
+ programs = {
+ mosh.enable = true;
+ };
+
+ systemd.coredump.enable = true;
+
environment = {
+ enableDebugInfo = true;
systemPackages = with pkgs; [
cryptsetup
direnv
+ file
+ gdb
fio
git
gptfdisk