Compare commits
9
Commits
517d5df1b6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5ffea6d64 | ||
|
|
b369ef8e1d | ||
|
|
a5b74df151 | ||
|
|
0b50ca2dce | ||
|
|
bca9fa3c04 | ||
|
|
83e6c8c140 | ||
|
|
7c58561dc5 | ||
|
|
8e31ffeb14 | ||
|
|
1d30dc5149 |
No files matched your search
@@ -0,0 +1 @@
|
||||
.claude
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "config/doom/bkri"]
|
||||
path = config/doom/bkri
|
||||
url = https://git.samfelag.xyz/marc/bkri.git
|
||||
@@ -164,30 +164,3 @@
|
||||
;; (pretty-hook org-mode
|
||||
;; ("[ ]" "☐")
|
||||
;; ("[X]" "☑"))
|
||||
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; BK理 (BeKaRi)
|
||||
;; -----------------------------------------------------------------------------
|
||||
(add-load-path! "bkri")
|
||||
(require 'bkri)
|
||||
|
||||
(map! :leader
|
||||
(:prefix-map ("a" . "AI")
|
||||
(:prefix ("b". "BKri")
|
||||
;; Edit queries
|
||||
:desc "Insert" "i" #'bkri-insert-quick
|
||||
:desc "Insert (big prompt)" "I" #'bkri-insert
|
||||
:desc "Replace" "r" #'bkri-replace-region-quick
|
||||
:desc "Replace (big prompt)" "R" #'bkri-replace-region
|
||||
:desc "Edit file" "f" #'bkri-edit-file-quick
|
||||
:desc "Edit file (big prompt)" "F" #'bkri-edit-file
|
||||
;; Search queries
|
||||
:desc "Search" "s" #'bkri-search
|
||||
:desc "Open last search" "S" #'bkri-search-reopen
|
||||
;; Plan queries
|
||||
:desc "Plan" "p" #'bkri-plan-quick
|
||||
:desc "Plan (big prompt)" "P" #'bkri-plan
|
||||
;; Query management
|
||||
:desc "Cancel query at point" "k" #'bkri-cancel-query-at-point
|
||||
:desc "Goto query" "q" #'bkri-goto-query)))
|
||||
@@ -15,6 +15,10 @@ client {
|
||||
path = "/var/lib/nomad_volumes/dns/pihole/etc-dnsmasq.d"
|
||||
read_only = false
|
||||
}
|
||||
host_volume "dns-unbound" {
|
||||
path = "/var/lib/nomad_volumes/dns/unbound/etc-unbound"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
# Caddy
|
||||
host_volume "caddyfile" {
|
||||
@@ -37,4 +41,10 @@ client {
|
||||
path = "/var/lib/nomad_volumes/folkugat"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
# Receptari
|
||||
host_volume "receptari" {
|
||||
path = "/var/lib/nomad_volumes/receptari"
|
||||
read_only = false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
job "receptari" {
|
||||
region = "global"
|
||||
datacenters = ["samfelag"]
|
||||
type = "service"
|
||||
|
||||
group "receptari" {
|
||||
count = 1
|
||||
|
||||
restart {
|
||||
attempts = 5
|
||||
delay = "15s"
|
||||
}
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
|
||||
# Volumes
|
||||
|
||||
volume "receptari" {
|
||||
type = "host"
|
||||
read_only = false
|
||||
source = "receptari"
|
||||
}
|
||||
|
||||
# RECEPTARI WEB
|
||||
task "receptari" {
|
||||
driver = "docker"
|
||||
|
||||
env {
|
||||
DB_DIR = "/data/receptari"
|
||||
}
|
||||
|
||||
config {
|
||||
image = "marc.sastre.cat/receptari:latest"
|
||||
ports = ["http"]
|
||||
}
|
||||
|
||||
volume_mount {
|
||||
volume = "receptari"
|
||||
destination = "/data/receptari"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 100
|
||||
memory = 512
|
||||
}
|
||||
|
||||
service {
|
||||
name = "receptari"
|
||||
port = "http"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+126
-70
@@ -2,19 +2,16 @@
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": [],
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770165109,
|
||||
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
|
||||
"lastModified": 1790734419,
|
||||
"narHash": "sha256-n7wew722m1OTBT9DOIMxNX/NF4zfsSUABAO5eW3wikE=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
|
||||
"rev": "3daa710894355fa2fad8243380af373a2b4046ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -39,17 +36,37 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"diwan": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1794246188,
|
||||
"narHash": "sha256-Y9ABp5yvkeTjzj7s7gd3JxiL9nlUrB6+DhOA+BKdoAk=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "43215d6e0a35f8b8594e2dec78e9535731444e6a",
|
||||
"revCount": 8,
|
||||
"type": "git",
|
||||
"url": "https://git.samfelag.xyz/marc/diwan"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.samfelag.xyz/marc/diwan"
|
||||
}
|
||||
},
|
||||
"emacs-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778318532,
|
||||
"narHash": "sha256-xspmhLgWF1FVYUsfxqTYHxZE9M6nNsfOB/zJKIlMKV8=",
|
||||
"lastModified": 1791089655,
|
||||
"narHash": "sha256-UujzS0lYEmvenwnNfN0VvfFg4m6WTiF+IjzEEsnwZ6Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "0d43c1b2bf83db3b4376eb8944ea666d67df5c1b",
|
||||
"rev": "3bd20fe06096915a18319236709e3ca91cd6f880",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -79,44 +96,42 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"herdr": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745494811,
|
||||
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
||||
"lastModified": 1793278609,
|
||||
"narHash": "sha256-0B58jR/v1vxbK7cwoq++SnOCsED0sHDkgqVMvsrjezE=",
|
||||
"owner": "herdrdev",
|
||||
"repo": "herdr",
|
||||
"rev": "ee5bfb5041bb3e4a49d591c72308aae3c81ecdde",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"owner": "herdrdev",
|
||||
"repo": "herdr",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777851538,
|
||||
"narHash": "sha256-Gp8qwTEYNoy2yvmErVGlvLOQvrtEECCAKbonW7VJef8=",
|
||||
"lastModified": 1790996401,
|
||||
"narHash": "sha256-f+kOxEmOUnQazVAmGg0i8hzwgd1kX/geY+k/Dpheye8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cc09c0f9b7eaa95c2d9827338a5eb03d32505ca5",
|
||||
"rev": "db7d5e2332710f5abb088f6b5de927d7f9511b35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"ref": "release-26.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -124,7 +139,7 @@
|
||||
"hyprcursor-rose-pine": {
|
||||
"inputs": {
|
||||
"hyprlang": "hyprlang",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
@@ -147,7 +162,7 @@
|
||||
"hyprcursor-rose-pine",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709914708,
|
||||
@@ -184,11 +199,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"lastModified": 1790822859,
|
||||
"narHash": "sha256-69xHQhAeMAD2wDXO7T2pcOZIF9Sga2W+JkmY2a11Ops=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"rev": "c59305bab2065cfecc4944690d9eedbb56f3a9fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -215,21 +230,53 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1778003029,
|
||||
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
|
||||
"lastModified": 1790920529,
|
||||
"narHash": "sha256-nQyFkMR78WP6PiXKkDW2SjqzLf/spQqjRuxRGSbcV8k=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
|
||||
"rev": "774debe7a0d1b496e35677ad955a1011c6ff74f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1793977579,
|
||||
"narHash": "sha256-WrSODdZFVIs/Hh2NzC0bY+ROByi0bATg8WfePX8dPj8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4fe25e12eb9f4c744966dd3de5a05246cf098601",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1779911860,
|
||||
"narHash": "sha256-ubcLAcKBDCZjhxw/kH5DL5GdBZQdzLqpkTe7HonvJVs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c0a89c379b4ac67c7b13b051ddbd4e0dbc9b0eaf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1710272261,
|
||||
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
|
||||
@@ -245,29 +292,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1778003029,
|
||||
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
|
||||
"lastModified": 1790920529,
|
||||
"narHash": "sha256-nQyFkMR78WP6PiXKkDW2SjqzLf/spQqjRuxRGSbcV8k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
|
||||
"rev": "774debe7a0d1b496e35677ad955a1011c6ff74f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"lastModified": 1790822859,
|
||||
"narHash": "sha256-69xHQhAeMAD2wDXO7T2pcOZIF9Sga2W+JkmY2a11Ops=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"rev": "c59305bab2065cfecc4944690d9eedbb56f3a9fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -277,13 +324,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"lastModified": 1790185690,
|
||||
"narHash": "sha256-xJ+X4hBtOcAFGBOe5nAMyMUeF9foJBmIOu3NjBqBycU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"rev": "4975466d324710c576dc11ad614684e6bd8cad8e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -296,14 +343,14 @@
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778341698,
|
||||
"narHash": "sha256-q7Br6sEl+LH7+ZwPft/74TNSTlo9pqJIA5qpK9OcMDA=",
|
||||
"lastModified": 1791104861,
|
||||
"narHash": "sha256-dBuVDdieRg/dBX+AC0DnqLK9iomjzrEA1oVtEApBHsM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "a67c2a7ec0fe8400ab87bf93e0e45cbd274a1ef1",
|
||||
"rev": "257f3348618c2b27274919e92e3f8aabeaa1ce9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -315,31 +362,40 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"diwan": "diwan",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"home-manager": "home-manager_2",
|
||||
"herdr": "herdr",
|
||||
"home-manager": "home-manager",
|
||||
"hyprcursor-rose-pine": "hyprcursor-rose-pine",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nur": "nur",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"herdr",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"lastModified": 1783577481,
|
||||
"narHash": "sha256-EWMxOWrJ031f8f/lrcEmhTRs4npw1/5N3Hcjin846c8=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "4cdea398dc491b082dccdce0fad1ed0b75fa3394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
@@ -354,7 +410,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
@@ -371,7 +427,7 @@
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
@@ -389,14 +445,14 @@
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778303188,
|
||||
"narHash": "sha256-zXFSvK80qpI91B7DU9QSExAtafSrz6vzormh2kUi6kQ=",
|
||||
"lastModified": 1790843023,
|
||||
"narHash": "sha256-vO6WFunNqHCjEaQc3ytshsGhHMqAIeW+5/rEJRLQLxQ=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "9346c84657a9cab472bc4ee5a2d65d42a72d5346",
|
||||
"rev": "710bb85c6cb4f186de8a710615be5b93b5f98885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -4,17 +4,18 @@
|
||||
inputs = {
|
||||
|
||||
# - Nixpkgs ----------------------------------
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
# - Home Manager -----------------------------
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-26.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# - Agenix -----------------------------------
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# optionally choose not to download darwin deps (saves some resources on Linux)
|
||||
agenix.inputs.darwin.follows = "";
|
||||
# agenix.inputs.darwin.follows = "";
|
||||
|
||||
# - NUR --------------------------------------
|
||||
nur.url = "github:nix-community/NUR";
|
||||
@@ -40,6 +41,13 @@
|
||||
# - More stuff -------------------------------
|
||||
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||
|
||||
# - Herdr -------------------------------------
|
||||
herdr.url = "github:herdrdev/herdr";
|
||||
|
||||
# - Diwan -------------------------------------
|
||||
diwan.url = "git+https://git.samfelag.xyz/marc/diwan";
|
||||
diwan.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||
|
||||
@@ -95,6 +95,11 @@ in
|
||||
dev.docker.enable = true;
|
||||
dev.docker.users = ["marc"];
|
||||
|
||||
# - AI ---------------------------------------
|
||||
ai.claude.enable = true;
|
||||
ai.herdr.enable = true;
|
||||
ai.pi.enable = true;
|
||||
|
||||
# - Other apps -------------------------------
|
||||
app.anki.enable = true;
|
||||
app.spotify.enable = true;
|
||||
|
||||
@@ -17,6 +17,7 @@ with lib;
|
||||
enable = false;
|
||||
allowedUDPPorts = [
|
||||
53 # DNS (pihole + unbound)
|
||||
8300 # Consul inter-node communication
|
||||
8600 # Consul DNS
|
||||
];
|
||||
};
|
||||
@@ -69,5 +70,19 @@ with lib;
|
||||
|
||||
dev.docker.enable = true;
|
||||
dev.docker.users = ["marc"];
|
||||
|
||||
ai.claude.enable = true;
|
||||
ai.diwan = {
|
||||
enable = true;
|
||||
notesDir = "/home/marc/org-agenda";
|
||||
};
|
||||
app.nextcloud.syncClient = {
|
||||
enable = true;
|
||||
user = "marc";
|
||||
localDir = "/home/marc/org-agenda";
|
||||
remoteUrl = "https://nextcloud.samfelag.xyz";
|
||||
remotePath = "/org-agenda";
|
||||
passwordFile = config.age.secrets."app.d/nextcloud-password".path;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -20,5 +20,11 @@
|
||||
group = "consul";
|
||||
mode = "600";
|
||||
};
|
||||
|
||||
"app.d/nextcloud-password" = {
|
||||
file = ../../secrets/app.d/nextcloud-password.age;
|
||||
owner = "marc";
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.dev.claude;
|
||||
cfg = config.samfelag.modules.ai.claude;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.dev.claude = with lib.types; {
|
||||
options.samfelag.modules.ai.claude = with lib.types; {
|
||||
enable = lib.mkEnableOption "claude";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
claude
|
||||
claude-code
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.ai.diwan;
|
||||
diwanPkg = inputs.diwan.packages.${system}.default;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.ai.diwan = with lib.types; {
|
||||
enable = lib.mkEnableOption "diwan";
|
||||
|
||||
notesDir = lib.mkOption {
|
||||
type = str;
|
||||
description = "Path to the content repo diwan ticks against (DIWAN_NOTES_DIR) — notes, not diwan's own code. Required: no default, since there's no sensible one.";
|
||||
};
|
||||
|
||||
cadence = lib.my.mkOpt' str "hourly"
|
||||
"systemd OnCalendar expression controlling how often diwan tick runs.";
|
||||
|
||||
user = lib.my.mkOpt' str config.user.name
|
||||
"User diwan tick runs as — needs access to notesDir and the pi/herdr environment.";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# diwan dispatches `pi` agents via `herdr`; both are real dependencies,
|
||||
# not optional extras a host could forget to turn on.
|
||||
samfelag.modules.ai.pi.enable = true;
|
||||
samfelag.modules.ai.herdr.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
diwanPkg
|
||||
];
|
||||
|
||||
systemd.timers.diwan-tick = {
|
||||
description = "Run diwan tick periodically";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = cfg.cadence;
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.diwan-tick = {
|
||||
description = "diwan tick";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
# diwan shells out to `herdr`; systemd's default service PATH doesn't
|
||||
# include it, so add it explicitly rather than relying on the login PATH.
|
||||
path = [ inputs.herdr.packages.${system}.default ];
|
||||
environment = {
|
||||
DIWAN_NOTES_DIR = cfg.notesDir;
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = cfg.user;
|
||||
WorkingDirectory = cfg.notesDir;
|
||||
ExecStart = "${diwanPkg}/bin/diwan tick";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.ai.herdr;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.ai.herdr = with lib.types; {
|
||||
enable = lib.mkEnableOption "herdr";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
inputs.herdr.packages.${system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.ai.pi;
|
||||
|
||||
# pi's bundled extensions don't share a common pi-coding-agent peer range,
|
||||
# so npm needs --legacy-peer-deps when pi shells out to install them. Wrap
|
||||
# just `pi` rather than setting this npm-wide.
|
||||
pi-wrapped = pkgs.symlinkJoin {
|
||||
name = "pi-coding-agent-wrapped";
|
||||
paths = [ pkgs.pi-coding-agent ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/pi --set npm_config_legacy_peer_deps true
|
||||
'';
|
||||
};
|
||||
|
||||
extensions = [
|
||||
"pi-claude-bridge"
|
||||
# "pi-sandbox"
|
||||
"pi-intercom"
|
||||
# "pi-observational-memory"
|
||||
];
|
||||
|
||||
desiredSettings = {
|
||||
packages = map (p: "npm:${p}") extensions;
|
||||
defaultProvider = "claude-bridge";
|
||||
defaultModel = "claude-sonnet-5";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.ai.pi = with lib.types; {
|
||||
enable = lib.mkEnableOption "pi";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# nixos-26.05's pi-coding-agent (0.75.4) is far behind what current
|
||||
# extensions expect as their peer version (0.80-1.x); pull the package
|
||||
# from nixpkgs-unstable instead so the running binary actually matches.
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
pi-coding-agent = inputs.nixpkgs-unstable.legacyPackages.${system}.pi-coding-agent;
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
pi-wrapped
|
||||
# pkgs.ripgrep # required by the pi-sandbox extension
|
||||
# pkgs.bubblewrap # required by the pi-sandbox extension (bwrap)
|
||||
pkgs.nodejs # provides npm, used by pi itself to install extensions
|
||||
];
|
||||
|
||||
# Extensions aren't packaged in nixpkgs; pi resolves/fetches them itself
|
||||
# from npm the first time it runs. Pi also writes to settings.json at
|
||||
# runtime (model choice, theme, etc.), so merge our declared keys into
|
||||
# it instead of overwriting it wholesale.
|
||||
system.userActivationScripts.piExtensions = ''
|
||||
settings="$HOME/.pi/agent/settings.json"
|
||||
mkdir -p "$(dirname "$settings")"
|
||||
[ -f "$settings" ] || echo '{}' > "$settings"
|
||||
${pkgs.jq}/bin/jq \
|
||||
--argjson desired ${lib.escapeShellArg (builtins.toJSON desiredSettings)} \
|
||||
'. * $desired' \
|
||||
"$settings" > "$settings.tmp"
|
||||
mv "$settings.tmp" "$settings"
|
||||
'';
|
||||
|
||||
# pi-claude-bridge and models.json aren't written to by pi at runtime
|
||||
# (unlike settings.json, which accumulates model/theme choices), so these
|
||||
# are safe to own outright instead of merging.
|
||||
hm.home.file = {
|
||||
".pi/agent/claude-bridge.json".text = builtins.toJSON {
|
||||
provider = {
|
||||
# The SDK's bundled binary can't run on NixOS; point it at ours instead.
|
||||
pathToClaudeCodeExecutable = "${pkgs.claude-code}/bin/claude";
|
||||
};
|
||||
};
|
||||
|
||||
# pi's own schema requires "providers", even empty; it only ever
|
||||
# ships a bare {} on first run, which fails validation.
|
||||
".pi/agent/models.json".text = builtins.toJSON {
|
||||
providers = {
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -6,8 +6,45 @@ in
|
||||
{
|
||||
options.samfelag.modules.app.nextcloud = {
|
||||
enable = lib.mkEnableOption "nextcloud";
|
||||
|
||||
syncClient = {
|
||||
enable = lib.mkEnableOption "headless nextcloud sync via nextcloudcmd on a timer";
|
||||
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "User to run the sync as, and Nextcloud login name";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
localDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Local directory to sync";
|
||||
};
|
||||
|
||||
remoteUrl = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Nextcloud server URL";
|
||||
};
|
||||
|
||||
remotePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "Remote path on the Nextcloud server to sync";
|
||||
};
|
||||
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to an EnvironmentFile containing NC_PASSWORD=... (should be secret)";
|
||||
};
|
||||
|
||||
interval = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "1min";
|
||||
description = "How often to run the sync (systemd time span)";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nextcloud-client
|
||||
];
|
||||
@@ -16,6 +53,28 @@ in
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.syncClient.enable {
|
||||
systemd.services.nextcloud-sync = {
|
||||
description = "Nextcloud headless sync (nextcloudcmd)";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = cfg.syncClient.user;
|
||||
EnvironmentFile = cfg.syncClient.passwordFile;
|
||||
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloudcmd --non-interactive -u ${cfg.syncClient.user} --path ${cfg.syncClient.remotePath} ${cfg.syncClient.localDir} ${cfg.syncClient.remoteUrl}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.nextcloud-sync = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = cfg.syncClient.interval;
|
||||
OnUnitActiveSec = cfg.syncClient.interval;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
{
|
||||
# - Nix ----------------------------------------
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixVersions.stable;
|
||||
|
||||
@@ -103,7 +103,7 @@ in
|
||||
# Greeter (login screen)
|
||||
greetd = {
|
||||
enable = true;
|
||||
wm_cmd = "Hyprland";
|
||||
wm_cmd = "start-hyprland";
|
||||
};
|
||||
# Locker
|
||||
hyprlock.enable = true;
|
||||
|
||||
@@ -107,8 +107,20 @@ in {
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
"animation slide top, swaync-control-center"
|
||||
"animation slide top, swaync-notification-window"
|
||||
{
|
||||
name = "animate-swaync-control-center";
|
||||
match = {
|
||||
namespace = "swaync-control-center";
|
||||
};
|
||||
animation = "slide top";
|
||||
}
|
||||
{
|
||||
name = "animate-swaync-notification-window";
|
||||
match = {
|
||||
namespace = "swaync-notification-window";
|
||||
};
|
||||
animation = "slide top";
|
||||
}
|
||||
];
|
||||
|
||||
bind = [
|
||||
|
||||
@@ -35,6 +35,8 @@ in {
|
||||
pkgs.hyprlandPlugins.hy3
|
||||
];
|
||||
|
||||
configType = "hyprlang";
|
||||
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
|
||||
@@ -28,7 +28,15 @@ in
|
||||
};
|
||||
|
||||
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
|
||||
windowrule = "pseudo, class:fcitx";
|
||||
windowrule = [
|
||||
{
|
||||
name = "pseudotile-fcitx";
|
||||
match = {
|
||||
class = "fcitx";
|
||||
};
|
||||
pseudo = true;
|
||||
}
|
||||
];
|
||||
exec-once = [
|
||||
"fcitx -d -r"
|
||||
"fcitx-remote -r"
|
||||
|
||||
@@ -38,7 +38,16 @@ in
|
||||
};
|
||||
|
||||
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
|
||||
windowrule = "pseudo, class:fcitx";
|
||||
windowrule = [
|
||||
{
|
||||
name = "pseudotile-fcitx";
|
||||
match = {
|
||||
class = "fcitx";
|
||||
};
|
||||
pseudo = true;
|
||||
}
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"fcitx -d -r"
|
||||
"fcitx-remote -r"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 GWuf0Q VbKtptk2zh0R7h9LxIxRsYXqaq3uHCIZQEdOn3/QvSM
|
||||
E9A0gRixWQfxmJSHeqxNv0W73jKNliQtP93CjzFXkJE
|
||||
-> ssh-ed25519 kNjiNQ 2eJ3bwzlT8Jjox0TUyUKzMQqCDsIJtjHljyfQYkHi2I
|
||||
KvtOT0oijhV8L07bW0dby8v4IWP/2n+XAlN4bmekihY
|
||||
--- Cv64ZC71bS45sWrEpwhV4hmLPv+96QmIR/qOR+D8bo0
|
||||
Íã2f}KÃÄäÞ˰–üÙ.
|
||||
4¼Z¢2ðסzY”
|
||||
…1§Ž–ëSŠ�’uÛ¹vm‘&еB] »KÑ‚?" Ð\œÈ¶ÍTq
|
||||
@@ -37,4 +37,7 @@ in
|
||||
# -- Nomad -------------------------------
|
||||
"nomad.d/consul-token-client.json.age".publicKeys = samfelag-hosts;
|
||||
"nomad.d/consul-token-server.json.age".publicKeys = thingvellir;
|
||||
|
||||
# -- Apps --------------------------------
|
||||
"app.d/nextcloud-password.age".publicKeys = thingvellir;
|
||||
}
|
||||
Reference in new issue
Block a user