hosts/blacksteel: use colmena

This commit is contained in:
Guanran Wang 2024-06-05 17:50:46 +08:00
parent acb0f46834
commit b6826c238e
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
3 changed files with 27 additions and 14 deletions

View file

@ -224,7 +224,12 @@
"lightsail-tokyo" = { "lightsail-tokyo" = {
imports = [./hosts/lightsail-tokyo]; imports = [./hosts/lightsail-tokyo];
deployment.targetHost = "ny4.dev"; deployment.targetHost = "tyo0.ny4.dev";
};
"blacksteel" = {
imports = [./hosts/blacksteel];
deployment.targetHost = "blacksteel"; # thru tailscale
}; };
}; };
}); });

View file

@ -23,6 +23,8 @@
time.timeZone = "Asia/Shanghai"; time.timeZone = "Asia/Shanghai";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
services.openssh.settings.PermitRootLogin = "prohibit-password";
######## Secrets ######## Secrets
sops = { sops = {
secrets = builtins.mapAttrs (_name: value: value // {sopsFile = ./secrets.yaml;}) { secrets = builtins.mapAttrs (_name: value: value // {sopsFile = ./secrets.yaml;}) {

View file

@ -73,19 +73,25 @@
"[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"} "[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"}
''; '';
users.users."guanranwang" = { users.users = rec {
isNormalUser = true; "guanranwang" = {
description = "Guanran Wang"; isNormalUser = true;
hashedPasswordFile = config.sops.secrets."hashed-passwd".path; description = "Guanran Wang";
shell = pkgs.fish; hashedPasswordFile = config.sops.secrets."hashed-passwd".path;
extraGroups = [ shell = pkgs.fish;
"wheel" extraGroups = [
"nix-access-tokens" "wheel"
]; "nix-access-tokens"
openssh.authorizedKeys.keys = [ ];
# same as git signing openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMmd/uqiBahzKcKMJ+gT3dkUIdrWQgudspsDchDlx1E/ guanran928@outlook.com" # same as git signing
]; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMmd/uqiBahzKcKMJ+gT3dkUIdrWQgudspsDchDlx1E/ guanran928@outlook.com"
];
};
"root" = {
openssh.authorizedKeys.keys = guanranwang.openssh.authorizedKeys.keys;
};
}; };
programs.dconf.enable = true; programs.dconf.enable = true;