Compare commits
37 commits
a09557ce95
...
420e1fed57
Author | SHA1 | Date | |
---|---|---|---|
420e1fed57 | |||
d9ccd196d0 | |||
b2b87a6b4c | |||
935d809811 | |||
84920a102b | |||
503388ff9f | |||
cdfbf13fcd | |||
ccb33cb1f8 | |||
6ad184b3b3 | |||
dbe1f96376 | |||
ab31386bfa | |||
b4ffe56ccf | |||
83a17b59e1 | |||
365eb1b59c | |||
ea5da5a906 | |||
b3c0ba4633 | |||
db2ca7eeeb | |||
71e74662d9 | |||
fa3e9e7058 | |||
6c30cd85a7 | |||
6cd17ea1ec | |||
5fa9dcab2d | |||
7337bd2a40 | |||
649883b5df | |||
7624d672cd | |||
83e7aa9026 | |||
aef0f1e9c6 | |||
6ec9d1f241 | |||
1a90d94d09 | |||
5f64eca21f | |||
1c2a88276d | |||
678e98328c | |||
6049d09d6a | |||
37a4469a51 | |||
96ac8d076e | |||
da2caff517 | |||
19d0371248 |
12 changed files with 92 additions and 29 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
name: flake check
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
|
27
.forgejo/workflows/deployment/deploy-systems.yml
Normal file
27
.forgejo/workflows/deployment/deploy-systems.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: deploy systems
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "**.lock"
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install nix action
|
||||||
|
uses: https://github.com/DeterminateSystems/nix-installer-action@v5
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GH_TOKEN }}
|
||||||
|
- name: write private key
|
||||||
|
run: |
|
||||||
|
mkdir -p .ssh && cd .ssh
|
||||||
|
echo "$SSH_KEY" > forgejo
|
||||||
|
chmod 400 forgejo
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SSH_KEY: ${{secrets.SSH_DEPLOY_KEY}}
|
||||||
|
- name: deploy
|
||||||
|
run: |
|
||||||
|
cd .ssh
|
||||||
|
nix run github:serokell/deploy-rs -- --ssh-opts="-i forgejo -o StrictHostKeyChecking=no" --skip-checks --targets .#arashi .#kariru .#sakura .#sora .#yuki
|
|
@ -1,3 +1,5 @@
|
||||||
|
name: fmt check
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKWRbIwwHuyEOLhA9dKTf4TgFqtPR5MNcJorKm731S7G arashi''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKWRbIwwHuyEOLhA9dKTf4TgFqtPR5MNcJorKm731S7G arashi"
|
||||||
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +1,64 @@
|
||||||
inputs: {
|
inputs: {
|
||||||
nodes = with inputs.deploy-rs.lib.x86_64-linux; {
|
nodes = with inputs.deploy-rs.lib.x86_64-linux; {
|
||||||
sakura = {
|
sakura = {
|
||||||
hostname = "sakura";
|
hostname = "100.121.201.47";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = activate.nixos inputs.self.nixosConfigurations.sakura;
|
path = activate.nixos inputs.self.nixosConfigurations.sakura;
|
||||||
};
|
};
|
||||||
sshUser = "notoh";
|
sshUser = "root";
|
||||||
sshOpts = ["-t" "-i" "~/.ssh/sakura"];
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
magicRollback = false;
|
magicRollback = true;
|
||||||
};
|
};
|
||||||
kariru = {
|
kariru = {
|
||||||
hostname = "kariru";
|
hostname = "100.126.229.95";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = activate.nixos inputs.self.nixosConfigurations.kariru;
|
path = activate.nixos inputs.self.nixosConfigurations.kariru;
|
||||||
};
|
};
|
||||||
sshUser = "notoh";
|
sshUser = "root";
|
||||||
sshOpts = ["-t" "-i" "~/.ssh/kariru"];
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
magicRollback = false;
|
magicRollback = true;
|
||||||
};
|
};
|
||||||
yuki = {
|
yuki = {
|
||||||
hostname = "yuki";
|
hostname = "100.110.140.130";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = activate.nixos inputs.self.nixosConfigurations.yuki;
|
path = activate.nixos inputs.self.nixosConfigurations.yuki;
|
||||||
};
|
};
|
||||||
sshUser = "notoh";
|
sshUser = "root";
|
||||||
sshOpts = ["-t" "-i" "~/.ssh/yuki"];
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
magicRollback = false;
|
magicRollback = true;
|
||||||
};
|
};
|
||||||
arashi = {
|
arashi = {
|
||||||
hostname = "arashi";
|
hostname = "100.94.214.100";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = activate.nixos inputs.self.nixosConfigurations.arashi;
|
path = activate.nixos inputs.self.nixosConfigurations.arashi;
|
||||||
};
|
};
|
||||||
sshUser = "notoh";
|
sshUser = "root";
|
||||||
sshOpts = ["-t" "-i" "~/.ssh/arashi"];
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
magicRollback = false;
|
magicRollback = true;
|
||||||
};
|
};
|
||||||
sora = {
|
sora = {
|
||||||
hostname = "sora";
|
hostname = "100.87.54.48";
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = activate.nixos inputs.self.nixosConfigurations.sora;
|
path = activate.nixos inputs.self.nixosConfigurations.sora;
|
||||||
};
|
};
|
||||||
sshUser = "notoh";
|
sshUser = "root";
|
||||||
sshOpts = ["-t" "-i" "~/.ssh/kumo"];
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
magicRollback = false;
|
magicRollback = true;
|
||||||
|
};
|
||||||
|
tsuru = {
|
||||||
|
hostname = "100.82.146.40";
|
||||||
|
profiles.system = {
|
||||||
|
user = "root";
|
||||||
|
path = activate.nixos inputs.self.nixosConfigurations.tsuru;
|
||||||
|
};
|
||||||
|
sshUser = "root";
|
||||||
|
sshOpts = ["-t" "-i" "~/.ssh/forgejo"];
|
||||||
|
magicRollback = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmWafzbhah18nm2z1epc6139XVlcKT0ndAI0wbLj+/6 kariru''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmWafzbhah18nm2z1epc6139XVlcKT0ndAI0wbLj+/6 kariru"
|
||||||
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./services
|
./services
|
||||||
|
@ -26,6 +26,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICqAjaV2D2J8ln4n39ZvszCF5Jql+0IaSpFCJlzDSLv6 sakura''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICqAjaV2D2J8ln4n39ZvszCF5Jql+0IaSpFCJlzDSLv6 sakura"
|
||||||
];
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [pkgs.cowsay];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,9 @@ _: {
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
networking.hostName = "sora";
|
networking.hostName = "sora";
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGmI3hRDFjxLjrM3pE471e4jxSlcqeizh3iNVVdaMHeN sora''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGmI3hRDFjxLjrM3pE471e4jxSlcqeizh3iNVVdaMHeN sora"
|
||||||
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKwby2FLCKFZZlOLDRhsm9GckyYAuyk0mq28jRD02tdv tsuru''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKwby2FLCKFZZlOLDRhsm9GckyYAuyk0mq28jRD02tdv tsuru"
|
||||||
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.notoh.openssh.authorizedKeys.keys = [
|
users.users.notoh.openssh.authorizedKeys.keys = [
|
||||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINoLDqOjZIQQ+YYir9MQnlh8wgqI1dz5nYL054OnIgDa yuki''
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINoLDqOjZIQQ+YYir9MQnlh8wgqI1dz5nYL054OnIgDa yuki"
|
||||||
|
];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd8j1+fC/ng7l17rsxugVtlhurUe1ICizwA9lQkSuNY forgejo"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
PasswordAuthentication = lib.mkForce false;
|
PasswordAuthentication = lib.mkForce false;
|
||||||
PubkeyAuthentication = lib.mkForce true;
|
PubkeyAuthentication = lib.mkForce true;
|
||||||
PermitRootLogin = lib.mkForce "no";
|
PermitRootLogin = lib.mkForce "yes";
|
||||||
StreamLocalBindUnlink = "yes";
|
StreamLocalBindUnlink = "yes";
|
||||||
GatewayPorts = "clientspecified";
|
GatewayPorts = "clientspecified";
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,7 +55,9 @@
|
||||||
"192.168.0.0/16"
|
"192.168.0.0/16"
|
||||||
"172.16.0.0/12"
|
"172.16.0.0/12"
|
||||||
"10.0.0.0/8"
|
"10.0.0.0/8"
|
||||||
"5.161.181.184"
|
"5.161.181.184/32"
|
||||||
|
"100.71.49.65/10"
|
||||||
|
"100.82.146.40/10"
|
||||||
];
|
];
|
||||||
jails.DEFAULT = {
|
jails.DEFAULT = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
Loading…
Reference in a new issue