mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Updated nixos config and setup backups
This commit is contained in:
parent
12e8363bdb
commit
9fee8ef0e6
3 changed files with 37 additions and 30 deletions
|
|
@ -4,11 +4,13 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
config,
|
# config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
secrets = builtins.readFile ./secrets.sh;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -50,7 +52,6 @@ programs.gnupg.agent = {
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
networking.hostName = "mal"; # Define your hostname.
|
networking.hostName = "mal"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
@ -131,17 +132,20 @@ programs.gnupg.agent = {
|
||||||
systemd.services."backup-serenity" = {
|
systemd.services."backup-serenity" = {
|
||||||
script = ''
|
script = ''
|
||||||
# Remove keys
|
# Remove keys
|
||||||
|
|
||||||
|
${secrets}
|
||||||
|
|
||||||
printf "\nBacking up nextcloud \n"
|
printf "\nBacking up nextcloud \n"
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/NextCloud" backup --verbose --no-scan /mnt/user/NextCloud
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/NextCloud" backup --verbose --no-scan /mnt/user/NextCloud
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/NextCloud" check --verbose
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/NextCloud" check --verbose
|
||||||
|
|
||||||
printf "\nBacking up Backups \n"
|
printf "\nBacking up Backups \n"
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/Backups" backup --verbose --no-scan /mnt/user/Backups
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/Backups" backup --verbose --no-scan /mnt/user/Backups
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/Backups" check --verbose
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/Backups" check --verbose
|
||||||
|
|
||||||
printf "\nBacking up appdata \n"
|
printf "\nBacking up appdata \n"
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/Appdata" backup --verbose --no-scan /mnt/user/appdata
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/Appdata" backup --verbose --no-scan /mnt/user/appdata
|
||||||
${pkgs.restic} -r "$RESTIC_REPOSITORY/Appdata" check --verbose
|
${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/Appdata" check --verbose
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
@ -149,8 +153,6 @@ programs.gnupg.agent = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCQm1wWWlOVlMraTFMSURL
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwQW1XRFcwWUlUR0dDUkdl
|
||||||
cE9DRVRpS2pDYzF1bUFLTH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IeDpPD
|
||||||
KMsnAc0bYFpjwl6tkKQu73BCJBPITE3YZpwvoRM9A1gtCjzm0X0FIixFPAk3c9vn
|
fFQ+ejr3xMGUmwwR/kR4OIHuHlAS02Ja1VIOuDp7Nd95eI85wbuxJ3F4Gc56eg9h
|
||||||
G4S9XHgDM9k=
|
CbScScf4iLc=
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@
|
||||||
options = ["fmask=0022" "dmask=0022"];
|
options = ["fmask=0022" "dmask=0022"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/user" = {
|
||||||
|
device = "array";
|
||||||
|
fsType = "9p";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue