feat(g2): ok

This commit is contained in:
2024-05-27 20:55:15 +08:00
parent 8d34332a72
commit 87c0e537fe
3 changed files with 126 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
let
mainCfg = config.nasp;
hostName = ("g" + (builtins.toString mainCfg.serial));
ipSuffix = (builtins.toString (mainCfg.serial + 100))
ipSuffix = (builtins.toString (mainCfg.serial + 100));
in
{
options.nasp = {
@@ -14,6 +14,7 @@ in
};
# inplementation
config = {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.substituters = [ "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" ];
## system config
@@ -51,7 +52,6 @@ in
address = "0.0.0.0";
prefixLength = 0;
via = "192.168.16.118";
metric = 10;
}
];
};
@@ -130,6 +130,7 @@ in
];
hashedPassword = "$y$j9T$Ei67I7VhQD6gF20/lNBUx0$jnrLqLNSJVCS959deKCamoOi4Q76nNeQ7/kDQCCABl1";
};
users.groups.nasp = {};
security.sudo.extraConfig = ''
%nasp ALL = (root) NOPASSWD: /usr/bin/docker
%nasp ALL = (root) NOPASSWD: /usr/sbin/reboot
@@ -139,4 +140,5 @@ in
%nasp ALL = (root) NOPASSWD: /usr/sbin/ufw
%nasp ALL = (root) NOPASSWD: /usr/sbin/ip
'';
}
};
}