From d0496de0b396a0e5039387be9adfc9673a2a997f Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 25 Feb 2025 13:03:32 -0600 Subject: [PATCH] messy code deserves a one-liner doc --- README.md | 35 +++++++++++-------- .../shadowfax/config/borgmatic/default.nix | 8 +++-- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0ea045c..3800765 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,30 @@ ## Goals -- [ ] Learn nix -- [ ] Services I want to separate from my kubernetes cluster I will use Nix. -- [ ] Approval-based update automation for flakes. -- [ ] Expand usage to other shell environments such as WSL, etc -- [ ] keep it simple, use trusted boring tools +- [ ] Learn nix +- [ ] Services I want to separate from my kubernetes cluster I will use Nix. +- [ ] Approval-based update automation for flakes. +- [ ] Expand usage to other shell environments such as WSL, etc +- [ ] keep it simple, use trusted boring tools ## TODO -- [x] Forgejo Actions -- [ ] Bring over hosts - - [x] Varda (forgejo) - - [x] Thinkpad T470 - - [x] Legion 15 AMD/Nvidia - - [x] Telperion (network services) - - [ ] Gandalf (NixNAS) +- [x] Forgejo Actions +- [ ] Bring over hosts + - [x] Varda (forgejo) + - [x] Thinkpad T470 + - [x] Legion 15 AMD/Nvidia + - [x] Telperion (network services) + - [ ] Gandalf (NixNAS) ## Links & References -- [truxnell/dotfiles](https://github.com//truxnell/nix-config/) -- [billimek/dotfiles](https://github.com/billimek/dotfiles/) +- [truxnell/dotfiles](https://github.com//truxnell/nix-config/) +- [billimek/dotfiles](https://github.com/billimek/dotfiles/) + +## Upgrading the borgmatic template for reference + +```sh +borgmatic config generate --source nixos/hosts/shadowfax/config/borgmatic/borgmatic-template.yaml --destination nixos/hosts/shadowfax/config/borgmatic/borgmatic-t +emplate.yaml --overwrite +``` diff --git a/nixos/hosts/shadowfax/config/borgmatic/default.nix b/nixos/hosts/shadowfax/config/borgmatic/default.nix index 66ec49f..cf61027 100644 --- a/nixos/hosts/shadowfax/config/borgmatic/default.nix +++ b/nixos/hosts/shadowfax/config/borgmatic/default.nix @@ -1,8 +1,10 @@ -{ lib, ... }: +{lib, ...}: +# Includes all files with .nix suffix in the current directory except default.nix let dir = ./.; - files = lib.filterAttrs (name: type: - type == "regular" && name != "default.nix" && lib.hasSuffix ".nix" name + files = lib.filterAttrs ( + name: type: + type == "regular" && name != "default.nix" && lib.hasSuffix ".nix" name ) (builtins.readDir dir); imports = map (name: "${dir}/${name}") (builtins.attrNames files); in {