Compare commits
5 commits
72e53ea17f
...
5607cad78f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5607cad78f | ||
|
|
7c7eaf32af | ||
|
|
402086b374 | ||
|
|
92abe2574d | ||
|
|
3f07d27c78 |
13 changed files with 40 additions and 18 deletions
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
ssh-keyscan -H cryodev.xyz >> ~/.ssh/known_hosts
|
ssh-keyscan -p 2299 -H cryodev.xyz >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Deploy with deploy-rs
|
- name: Deploy with deploy-rs
|
||||||
run: nix run github:serokell/deploy-rs -- -s .#cryodev-main
|
run: nix run github:serokell/deploy-rs -- -s .#cryodev-main
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,10 @@
|
||||||
nodes = {
|
nodes = {
|
||||||
cryodev-main = {
|
cryodev-main = {
|
||||||
hostname = constants.domain;
|
hostname = constants.domain;
|
||||||
|
sshOpts = [
|
||||||
|
"-p"
|
||||||
|
"2299"
|
||||||
|
];
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cryodev-main;
|
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cryodev-main;
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,9 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Root SSH key for deploy-rs (key-only, no password)
|
||||||
|
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||||
|
../deploy-key.pub
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
outputs.nixosModules.normalUsers
|
outputs.nixosModules.normalUsers
|
||||||
../../users/steffen
|
../../users/steffen
|
||||||
|
../../users/ralph
|
||||||
|
../../users/benjamin
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,5 @@
|
||||||
imports = [
|
imports = [
|
||||||
outputs.nixosModules.normalUsers
|
outputs.nixosModules.normalUsers
|
||||||
../../users/steffen
|
../../users/steffen
|
||||||
../../users/cryotherm
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ in
|
||||||
ports = mkDefault [ 2299 ];
|
ports = mkDefault [ 2299 ];
|
||||||
openFirewall = mkDefault true;
|
openFirewall = mkDefault true;
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = mkDefault "no";
|
PermitRootLogin = mkDefault "prohibit-password";
|
||||||
PasswordAuthentication = mkDefault false;
|
PasswordAuthentication = mkDefault false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
outputs.nixosModules.normalUsers
|
outputs.nixosModules.normalUsers
|
||||||
../../users/steffen
|
# Add users here, e.g.:
|
||||||
../../users/cryotherm
|
# ../../users/<username>
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
outputs.nixosModules.normalUsers
|
outputs.nixosModules.normalUsers
|
||||||
../../users/steffen
|
# Add users here, e.g.:
|
||||||
../../users/cryotherm
|
# ../../users/<username>
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
users/benjamin/default.nix
Normal file
11
users/benjamin/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
normalUsers.benjamin = {
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
sshKeyFiles = [
|
||||||
|
# TODO: Add benjamin's public key
|
||||||
|
# ./pubkeys/benjamin.pub
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
normalUsers.cryotherm = {
|
|
||||||
extraGroups = [ ];
|
|
||||||
# No sshKeyFiles, so password login only (if allowed) or local access
|
|
||||||
sshKeyFiles = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
11
users/ralph/default.nix
Normal file
11
users/ralph/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
normalUsers.ralph = {
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
sshKeyFiles = [
|
||||||
|
# TODO: Add ralph's public key
|
||||||
|
# ./pubkeys/ralph.pub
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,9 +5,6 @@
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
sshKeyFiles = [
|
sshKeyFiles = [ ./pubkeys/X670E.pub ];
|
||||||
./pubkeys/X670E.pub
|
|
||||||
./pubkeys/forgejo-deploy.pub
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue