fix backup

This commit is contained in:
Jörg Thalheim 2023-09-19 13:49:10 +02:00
parent 223f739ae5
commit edd6df5b58
4 changed files with 47 additions and 204 deletions

View File

@ -19,15 +19,16 @@
]
},
"locked": {
"lastModified": 1694874693,
"narHash": "sha256-xMqT5csfPAbLghUr6OXCpOTM9Fk/Azwg7xYnEYCEsaQ=",
"ref": "refs/heads/main",
"rev": "4a1dcc16395a5423023ac10d4be3640d1bb88fdc",
"revCount": 690,
"lastModified": 1694703716,
"narHash": "sha256-J1nyeRArZlQPAnmJ1suKrhYOgVEixNGeqbpVTI+gilE=",
"ref": "lassulus-pass-secrets",
"rev": "1c07f990a89edfd3f268cad4155f29b86a554484",
"revCount": 665,
"type": "git",
"url": "https://git.clan.lol/clan/clan-core"
},
"original": {
"ref": "lassulus-pass-secrets",
"type": "git",
"url": "https://git.clan.lol/clan/clan-core"
}

View File

@ -24,7 +24,7 @@
# Use the version of nixpkgs that has been tested to work with SrvOS
srvos.inputs.nixpkgs.follows = "nixpkgs";
clan-core.url = "git+https://git.clan.lol/clan/clan-core";
clan-core.url = "git+https://git.clan.lol/clan/clan-core?ref=lassulus-pass-secrets";
clan-core.inputs.flake-parts.follows = "flake-parts";
clan-core.inputs.nixpkgs.follows = "nixpkgs";
clan-core.inputs.treefmt-nix.follows = "treefmt-nix";
@ -44,7 +44,7 @@
./modules/flake-module.nix
./pkgs/flake-module.nix
];
perSystem = {
perSystem = ({ lib, self', ... }: {
treefmt = {
projectRootFile = ".git/config";
programs.terraform.enable = true;
@ -56,6 +56,14 @@
"composition.nix"
];
};
};
checks =
let
nixosMachines = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
homeConfigurations = lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) (self'.legacyPackages.homeConfigurations or { });
in
nixosMachines // packages // devShells // homeConfigurations;
});
};
}

View File

@ -41,7 +41,9 @@
"/var/tmp"
"/var/log"
];
repo = "u359378@u359378.your-storagebox.de:/./borgbackup";
# $ ssh-keygen -y -f /run/secrets/hetzner-borgbackup-ssh > /tmp/hetzner-borgbackup-ssh.pub
# $ cat /tmp/hetzner-borgbackup-ssh.pub | ssh -p23 u366395@u366395.your-storagebox.de install-ssh-key
repo = "u366395@u366395.your-storagebox.de:/./borgbackup";
# Disaster recovery:
# get the backup passphrase and ssh key from the sops and store them in /tmp

File diff suppressed because one or more lines are too long