This commit is contained in:
John Lancaster
2026-03-11 08:49:07 -05:00
parent dac3b84ffb
commit cf2ba8731d
19 changed files with 56 additions and 9 deletions

View File

@@ -15,6 +15,7 @@
"wheel"
];
};
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
home-manager.users."${username}" = {
imports = [
self.modules.homeManager."${username}"

View File

@@ -15,8 +15,8 @@ in
flake.modules.homeManager.sops = { inputs, config, pkgs, lib, ... }:
let
sopsBin = lib.getExe pkgs.sops;
sopsConfigPath = ../../../.sops.yaml;
sopsSecretsPath = ../../../keys/secrets.yaml;
sopsConfigPath = ../../.sops.yaml;
sopsSecretsPath = ../../keys/secrets.yaml;
ageKeyFile = "${config.xdg.configHome}/sops/age/keys.txt";
in
{

View File

@@ -0,0 +1,42 @@
base:
repository: local:/mnt/backup
password-file: '{{ .ConfigDir }}/password.txt'
status-file: '{{ .ConfigDir }}/backup-status.json'
retention:
after-backup: true
keep-last: '10'
keep-hourly: '8'
keep-daily: '14'
keep-weekly: '8'
backup:
verbose: true
exclude:
- .cache
- .devenv
- .rustup
- .cargo
- .venv
- .pyenv
- .vscode*
- data/postgres
- build
- __pycache__
- '*.log'
- '*.egg-info'
- '*.csv'
- '*.m4a'
- .local/share/Steam
- .local/share/Trash
- build
- dist
- /home/*/Pictures
- /home/*/Videos
- /home/*/go
- /home/*/snap
- /home/john/john-nas
schedule-permission: user
schedule-priority: background
check-after: true
prune:
schedule-permission: user
schedule-lock-wait: 1h

View File

@@ -33,7 +33,8 @@
let
cfg = config.programs.resticprofile;
yamlFormat = pkgs.formats.yaml { };
baseProfile = import ../../../resticprofile/base.nix { inherit lib config; };
baseProfile = import ../../../resticprofile/base.nix;
# baseProfile = builtins.fromJSON (builtins.readFile ./base.yaml)
profiles = lib.recursiveUpdate baseProfile cfg.profiles;
in {
options.programs.resticprofile = {

View File

@@ -20,7 +20,9 @@ in
modules = lib.mkMerge [
(inputs.self.factory.user username true)
{
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
#
# NixOS
#
nixos."${username}" = { pkgs, ... }: {
users.users."${username}" = {
openssh.authorizedKeys.keys = inputs.self.meta.users."${username}".authorizedKeys;
@@ -28,7 +30,9 @@ in
};
};
# This gets imported by the user factory:
#
# Home Manager
#
homeManager."${username}" = with inputs.self.meta.users."${username}"; {
home.stateVersion = "25.11";
xdg.enable = true;
@@ -36,9 +40,9 @@ in
programs.git.settings.user.name = name;
programs.git.settings.user.email = email;
# imports = with inputs.self.modules.homeManager; [
# # base
# ];
imports = with inputs.self.modules.homeManager; [
# base
];
};
}
];

View File

@@ -1,4 +1,3 @@
{ lib, config, ... }:
{
base = {
repository = "local:/mnt/backup";