Compare commits
2 commits
e729d38637
...
4b22702ed6
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b22702ed6 | |||
| c7ec1a5423 |
5 changed files with 56 additions and 40 deletions
41
clan/backups.nix
Normal file
41
clan/backups.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{ lib, self, ... }:
|
||||||
|
{
|
||||||
|
clan.inventory.instances."borgbackup-storagebox" = {
|
||||||
|
module.input = "clan-core";
|
||||||
|
module.name = "borgbackup";
|
||||||
|
|
||||||
|
roles.client.machines = lib.genAttrs [ "crocus" "genepi" "renoir" "verbena" ] (
|
||||||
|
machine:
|
||||||
|
let
|
||||||
|
config = self.nixosConfigurations.${machine}.config;
|
||||||
|
user = "u422292";
|
||||||
|
host = "${user}.your-storagebox.de";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
settings.destinations."storagebox-${config.networking.hostName}" = {
|
||||||
|
repo = "${user}@${host}:./borgbackup/${config.networking.hostName}";
|
||||||
|
rsh = "ssh -oPort=23 -i ${
|
||||||
|
config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path
|
||||||
|
} -oStrictHostKeyChecking=accept-new";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
roles.client.extraModules = [
|
||||||
|
{
|
||||||
|
programs.ssh.knownHosts =
|
||||||
|
let
|
||||||
|
user = "u422292";
|
||||||
|
host = "${user}.your-storagebox.de";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
storagebox-ed25519 = {
|
||||||
|
hostNames = [ "[${host}]:23" ];
|
||||||
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
roles.server.machines = { };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ self, lib, ... }:
|
{ self, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./backups.nix
|
||||||
./machines.nix
|
./machines.nix
|
||||||
./monitoring.nix
|
./monitoring.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
|
|
@ -89,32 +90,6 @@
|
||||||
roles.default.tags.all = { };
|
roles.default.tags.all = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
clan.inventory.instances."borgbackup-storagebox" = {
|
|
||||||
module.input = "clan-core";
|
|
||||||
module.name = "borgbackup";
|
|
||||||
|
|
||||||
roles.client.machines = lib.genAttrs [ "crocus" "genepi" "verbena" ] (
|
|
||||||
machine:
|
|
||||||
let
|
|
||||||
config = self.nixosConfigurations.${machine}.config;
|
|
||||||
user = "u422292";
|
|
||||||
host = "${user}.your-storagebox.de";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
settings.destinations."storagebox-${config.networking.hostName}" = {
|
|
||||||
repo = "${user}@${host}:./borgbackup/${config.networking.hostName}";
|
|
||||||
rsh = "ssh -oPort=23 -i ${
|
|
||||||
config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path
|
|
||||||
} -oStrictHostKeyChecking=accept-new";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
roles.client.extraModules = [
|
|
||||||
self.nixosModules.storagebox
|
|
||||||
];
|
|
||||||
roles.server.machines = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
clan.inventory.instances.syncthing = {
|
clan.inventory.instances.syncthing = {
|
||||||
roles.peer.tags.syncthing = { };
|
roles.peer.tags.syncthing = { };
|
||||||
roles.peer.settings.folders = {
|
roles.peer.settings.folders = {
|
||||||
|
|
|
||||||
|
|
@ -52,4 +52,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
let
|
|
||||||
user = "u422292";
|
|
||||||
host = "${user}.your-storagebox.de";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.ssh.knownHosts = {
|
|
||||||
storagebox-ed25519 = {
|
|
||||||
hostNames = [ "[${host}]:23" ];
|
|
||||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
users.users.rpqt = {
|
users.users.rpqt = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
@ -14,7 +19,10 @@
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa8R8obgptefcp27Cdp9bc2fiyc9x0oTfMsTPFp2ktE rpqt@haze"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa8R8obgptefcp27Cdp9bc2fiyc9x0oTfMsTPFp2ktE rpqt@haze"
|
||||||
];
|
];
|
||||||
|
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
]
|
||||||
|
++ lib.mkIf config.networking.networkmanager.enabled [ "networkmanager" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue