dend: wip home

This commit is contained in:
2026-03-27 18:49:27 +01:00
parent bb919f666b
commit a5c8c05c7c
40 changed files with 1463 additions and 11 deletions

View File

@@ -0,0 +1,131 @@
{config, ...}: let
defaultChecks = [
{
name = "repository";
frequency = "2 weeks";
}
{
name = "archives";
frequency = "4 weeks";
}
{
name = "data";
frequency = "6 weeks";
}
{
name = "extract";
frequency = "6 weeks";
}
];
passwordFile = "${config.home.homeDirectory}/.config/borg/password";
encCmd = ''cat ${passwordFile}'';
repo = "ssh://borg.jroeger.de/./comfy-station";
in {
sops.secrets = {
"borg/password" = {
sopsFile = ../../secrets/jonas/borg.yaml;
key = "password";
path = passwordFile;
};
};
services.borgmatic.enable = true;
services.borgmatic.frequency = "hourly";
programs.borgmatic.enable = true;
programs.borgmatic.backups = {
workspaces = {
location = {
sourceDirectories = ["${config.xdg.userDirs.extraConfig.XDG_WORKSPACES_DIR}"];
repositories = [repo];
excludeHomeManagerSymlinks = true;
extraConfig = {
archive_name_format = "{hostname}-workspaces-{now}";
exclude_patterns = [
"*/.venv"
"__pycache__"
];
};
};
retention = {
keepDaily = 7;
keepHourly = 12;
keepWeekly = 4;
keepMonthly = 6;
};
storage = {
encryptionPasscommand = encCmd;
};
consistency.checks = defaultChecks;
};
media = {
location = {
sourceDirectories = [
"${config.xdg.userDirs.documents}"
"${config.xdg.userDirs.music}"
"${config.home.homeDirectory}/org"
"${config.home.homeDirectory}/Obsidian"
"${config.home.homeDirectory}/Zotero"
];
repositories = [repo];
excludeHomeManagerSymlinks = true;
extraConfig = {
archive_name_format = "{hostname}-media-{now}";
};
};
retention = {
keepDaily = 7;
keepWeekly = 2;
keepMonthly = 6;
};
storage = {
encryptionPasscommand = encCmd;
};
consistency.checks = defaultChecks;
};
sec = {
location = {
sourceDirectories = [
"${config.xdg.configHome}/sops"
"${config.home.homeDirectory}/Stuff/sec"
"${config.home.homeDirectory}/.password-store"
];
repositories = [repo];
excludeHomeManagerSymlinks = true;
extraConfig = {
archive_name_format = "{hostname}-sec-{now}";
};
};
retention = {
keepDaily = 7;
keepWeekly = 2;
keepMonthly = 6;
};
storage = {
encryptionPasscommand = encCmd;
};
consistency.checks = defaultChecks;
};
var = {
location = {
sourceDirectories = [
"${config.xdg.userDirs.desktop}"
];
repositories = [repo];
excludeHomeManagerSymlinks = true;
extraConfig = {
archive_name_format = "{hostname}-var-{now}";
};
};
retention = {
keepDaily = 7;
keepWeekly = 2;
keepMonthly = 6;
};
storage = {
encryptionPasscommand = encCmd;
};
consistency.checks = defaultChecks;
};
};
}

View File

@@ -0,0 +1,101 @@
{
config,
lib,
...
}: {
imports = [
./borg.nix
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "jonas";
home.homeDirectory = "/home/jonas";
sops = {
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
};
# hive modules
#hive.waybar.enable = true;
#hive.wlogout.enable = true;
#hive.wofi.enable = true;
#hive.kitty.enable = true;
#hive.nextcloud.enable = true;
#hive.firefox = {
# enable = true;
# plasmaIntegration = true;
# passFF = true;
#};
#hive.kdeconnect.enable = true;
#hive.ranger.enable = true;
#hive.ssh = {
# enable = true;
# sopsFile = ../secrets/jonas/ssh.yaml;
# keys = ["borg" "passgit"];
#};
#hive.yubikey.enable = true;
#hive.yubikey.withCCID = false;
#hive.zsh.enable = true;
#hive.nix-scripts.enable = true;
#hive.doom.enable = true;
#hive.doom.asDefaultEditor = true;
#hive.doom.enableCopilot = true;
#hive.doom.withNixPkgs = true;
#hive.doom.withShellPkgs = true;
#hive.doom.withPythonPkgs = true;
#hive.jj.enable = true;
# Make session variables available in systemd units
# SEE: https://github.com/nix-community/home-manager/pull/5543
# systemd.user.settings.Manager.DefaultEnvironment =
# lib.mapAttrs (_: lib.mkDefault) config.home.sessionVariables;
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
xdg.userDirs.enable = true;
xdg.userDirs.createDirectories = true;
xdg.userDirs.extraConfig = {
XDG_WORKSPACES_DIR = "${config.home.homeDirectory}/Workspaces";
XDG_NEXTCLOUD_DIR = "${config.home.homeDirectory}/Nextcloud";
XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
home.sessionVariables = {
EDITOR = lib.mkDefault "vim";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Git
programs.difftastic.enable = true;
programs.difftastic.git.enable = true;
programs.git = {
enable = true;
settings.user.name = "Jonas Röger";
settings.user.email = "jonas.roeger@tu-dortmund.de";
signing = {
signByDefault = true;
key = "4000EB35E1AE0F07";
};
};
}

View File

@@ -0,0 +1,21 @@
{
self,
inputs,
...
}: {
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
modules = [
({...}: {nixpkgs.overlays = [self.overlays.unstable inputs.audio.overlays.default];})
({...}: {nixpkgs.config.allowUnfree = true;})
./configuration.nix
inputs.sops-nix.homeManagerModules.sops
self.homeModules.layan
self.homeModules.hyprland
self.homeModules.swaync
self.homeModules.waybar
];
};
}