Compare commits

Author SHA1 Message Date
CaZzzer f596d67ec6 woodpecker CI impl
ci/woodpecker/manual/woodpecker Pipeline was successful
2026-11-24 01:06:03 -08:00
CaZzzer 5bcc513ece common: enable fish everywhere by default 2026-11-24 01:05:45 -08:00
CaZzzer 04fd303ce6 desktop: some packages 2026-11-24 01:02:28 -08:00
CaZzzer 35b77caf6d desktop: pc reinstall 2026-11-24 01:02:28 -08:00
CaZzzer c73345ef0c updates: nixpkgs, home-manager 2026-11-24 01:02:23 -08:00
CaZzzer ff7e80c6ca updates: nixpkgs, home-manager 2026-11-16 10:17:02 -08:00
CaZzzer 27a08f9942 desktop: update pc to use btrfs, linux latest 2026-11-16 10:16:56 -08:00
CaZzzer 3af9b024ef updates: nixpkgs, home-manager 2026-10-27 00:11:54 -07:00
CaZzzer 55a4591bf7 updates: nixpkgs, home-manager 2026-10-19 01:41:04 -07:00
CaZzzer 7351194fee router: services: add secret for grafana key 2026-10-11 11:39:40 -07:00
CaZzzer 6aa799c05d router: firewall: rule updates 2026-10-11 11:28:34 -07:00
CaZzzer ddb6d43b0c router: dns: udpate default upstreams 2026-10-11 11:26:13 -07:00
CaZzzer 8af0ecbf39 router: update hardware config 2026-10-11 11:24:58 -07:00
CaZzzer ce60b83151 updates: nixpkgs, home-manager 2026-10-11 11:11:24 -07:00
CaZzzer 23609e180e home: fix ls eza aliases 2026-09-30 10:53:29 -07:00
CaZzzer 0a566d99b1 updates: nixpkgs, home-manager 2026-09-29 22:11:37 -07:00
CaZzzer ff3e201261 pc: add lmstudio 2026-09-29 22:11:37 -07:00
CaZzzer 87c5a25123 desktop: get rid of flatpak fonts workaround
a
2026-09-29 22:11:37 -07:00
CaZzzer fd4bc1eaee updates: nixpkgs, home-manager 2026-09-12 19:20:14 -07:00
CaZzzer 378ba963b4 updates: linux 7.2 , nixpkgs, home-manager, secrix 2026-08-24 05:02:36 -07:00
CaZzzer 0e8d8122ef updates: nixpkgs, home-manager, plasma-manager, secrix 2026-08-04 16:06:46 -07:00
CaZzzer ee9efb8054 updates: nixpkgs, home-manager, plasma-manager, lanzaboote 2026-07-11 15:01:25 -07:00
CaZzzer 37769c788a updates: nixpkgs, home-manager, secrix 2026-06-21 13:41:03 -07:00
CaZzzer ff1c55e812 updates: nixpkgs, home-manager 2026-05-03 01:50:31 -07:00
CaZzzer b6830e1a45 updates: nixpkgs, home-manager, plasma-manager 2026-04-18 21:44:23 -07:00
CaZzzer 71cb76700f updates: nixpkgs, home-manager, plasma-manager 2026-04-09 20:46:54 -07:00
CaZzzer 7aa16dd35e updates: nixpkgs, home-manager, plasma-manager 2026-03-02 12:36:58 -08:00
CaZzzer 08290f9b43 updates: nixpkgs, home-manager, plasma-manager 2026-02-14 16:13:54 -08:00
CaZzzer 4b012f259f desktop: add jj 2026-02-13 16:16:33 -08:00
CaZzzer 7da9b008b4 desktop: add antigravity 2026-02-07 23:42:13 -08:00
CaZzzer 97b667f27c updates: nixpkgs, nixos-generators, home-manager, plasma-manager 2026-02-07 23:42:13 -08:00
CaZzzer 4d61ec4617 desktop: add zram config 2026-02-07 23:42:13 -08:00
CaZzzer 5697648ab1 desktop: enable nix-ld 2026-02-07 23:42:13 -08:00
CaZzzer 7a69f68683 updates: nixpkgs, home-manager, plasma-manager 2026-02-07 23:42:10 -08:00
CaZzzer a278a69f05 updates: nixpkgs, home-manager 2025-12-12 09:44:02 -08:00
CaZzzer 2de612bc4f updates: nixpkgs, home-manager, nixos-generators 2025-12-07 21:13:04 -08:00
CaZzzer 8593abc8a5 laptop: add lanboote for secure boot 2025-12-07 21:01:57 -08:00
23 changed files with 452 additions and 104 deletions

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
when:
- event: [push, manual]
labels:
backend: local
nix-builder: true
clone:
- name: clone
image: woodpecker-plugin-git
steps:
- name: build-and-cache
image: bash
environment:
TRANSCRYPT_PASSWORD:
from_secret: transcrypt_password
commands:
- bash ci/build.sh
+70
View File
@@ -0,0 +1,70 @@
# NixOS builds and LAN cache
`builder` is the headless configuration for the VM at `10.17.1.100`.
Woodpecker builds every `nixosConfigurations` toplevel on pushes and manual
runs. Builds run sequentially with one Nix job and four cores on this 8 GiB VM.
Secrix runtime secrets do not need decryption in CI.
## Finish Woodpecker registration
1. Create an agent in Woodpecker and restrict its server-side filters to
`repo=CaZzzer/nix-conf` (use the repository's exact spelling as displayed
by Woodpecker).
Allow only trusted users to push or change pipelines. The local backend
executes repository commands as the `woodpecker` user on the VM.
2. On the VM, use `sudo install -m 0600 /dev/null /var/lib/woodpecker/agent.env`
once, then `sudoedit /var/lib/woodpecker/agent.env` and enter:
```ini
WOODPECKER_AGENT_SECRET=<agent token>
WOODPECKER_SERVER=<reachable gRPC host:port>
WOODPECKER_GRPC_SECURE=true
WOODPECKER_GRPC_SKIP_VERIFY=false
```
Use `WOODPECKER_GRPC_SECURE=false` for a private plaintext gRPC listener.
The public web UI address does not necessarily expose gRPC. The default
in the module is `woodpecker.cazzzer.com:9000`; override it here as needed.
3. Run `sudo systemctl start woodpecker-agent-nix`.
4. Enable this repository in Woodpecker. Add a repository secret named
`transcrypt_password` containing the existing transcrypt password. Limit
it to push/manual events; do not enable it for pull requests. Commit and
push these changes, then confirm the agent picks up the workflow.
The pipeline explicitly uses the native `woodpecker-plugin-git` clone binary.
It initializes transcrypt with `aes-256-cbc`, suppressing its credential output.
No secret values belong in Nix expressions or the repository.
## Cache
`nix-serve-ng` serves the VM's persistent store at `http://10.17.1.100:5000`
through the NixOS `nix-serve` service.
It signs responses using `/var/lib/nix-cache/cache-key.sec` (root-only).
Back up this key securely; its public key is configured in `hosts/common.nix`.
Rebuilding each client once installs cache trust. Clients need LAN/VPN access
to this address; the official NixOS cache remains configured.
Successful builds leave indirect GC roots at `/var/lib/nix-ci/<host>`, retaining
the latest successful closure per host. Weekly GC removes unrooted paths older
than 14 days. Monitor disk space: 100 GiB may become tight for desktop closures
and intermediate builds. Remove roots for retired hosts deliberately.
The cache is intended for a trusted LAN. Transcrypt plaintext can occur in Nix
store sources and generated configuration, so readers of the cache may recover
that information. Runtime secrix secrets remain encrypted. Do not expose this
endpoint publicly without adding access control.
## Updating the builder
Build `.#nixosConfigurations.builder.config.system.build.toplevel`, copy its
closure to the VM and activate it, or use `nixos-rebuild` targeting `builder`.
New repository files must be added to Git before a Git-flake build sees them;
`path:.` can be used when validating an uncommitted working tree.
Check services with:
```sh
systemctl status woodpecker-agent-nix nix-serve
journalctl -u woodpecker-agent-nix -f
curl http://10.17.1.100:5000/nix-cache-info
```
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
# Woodpecker traces commands; keep the password out of its logs.
set +x
: "${TRANSCRYPT_PASSWORD:?Set the transcrypt_password Woodpecker secret}"
transcrypt --yes --cipher=aes-256-cbc --password="$TRANSCRYPT_PASSWORD" >/dev/null
unset TRANSCRYPT_PASSWORD
# Discover every host so newly added configurations are automatically checked.
mapfile -t hosts < <(nix eval --json .#nixosConfigurations --apply builtins.attrNames | python3 -c 'import json,sys; print("\n".join(json.load(sys.stdin)))')
test "${#hosts[@]}" -gt 0
root_dir=/var/lib/nix-ci
for host in "${hosts[@]}"; do
echo "Building $host"
# A stable symlink per host retains its last successful closure across GC.
# Nix registers these out-links as indirect GC roots.
nix build --no-update-lock-file --print-build-logs \
--out-link "$root_dir/$host" \
".#nixosConfigurations.\"$host\".config.system.build.toplevel"
done
Generated
+137 -15
View File
@@ -1,5 +1,58 @@
{ {
"nodes": { "nodes": {
"crane": {
"locked": {
"lastModified": 1781825982,
"narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"pre-commit",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -7,11 +60,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764034279, "lastModified": 1795366757,
"narHash": "sha256-hZH6EHQYFifVg0bmSBYT8Art5BWhXBXE307uPLnexY0=", "narHash": "sha256-Tp4Kh4R7ID1f2mMCDlb2PiFQ/DZZsnXB2u2juWN+TT4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "381f4f8a3a5f773cb80d2b7eb8f8d733b8861434", "rev": "3b8140d21fa0a70b1b38c2ed29853dfe686234a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -20,6 +73,30 @@
"type": "github" "type": "github"
} }
}, },
"lanzaboote": {
"inputs": {
"crane": "crane",
"nixpkgs": [
"nixpkgs"
],
"pre-commit": "pre-commit",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1782141370,
"narHash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v1.1.0",
"repo": "lanzaboote",
"type": "github"
}
},
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1736643958, "lastModified": 1736643958,
@@ -43,11 +120,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1751903740, "lastModified": 1769813415,
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=", "narHash": "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "032decf9db65efed428afd2fa39d80f7089085eb", "rev": "8946737ff703382fda7623b9fab071d037e897d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +135,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1763835633, "lastModified": 1795234589,
"narHash": "sha256-HzxeGVID5MChuCPESuC0dlQL1/scDKu+MmzoVBJxulM=", "narHash": "sha256-f/VVvxf5RsQgWVhUtefoca5ktVg0DA2bnkMOcmSnozo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "050e09e091117c3d7328c7b2b7b577492c43c134", "rev": "2786a2a72088ecf32aea5b3ec52099e6a7cff78f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -82,11 +159,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1763909441, "lastModified": 1785762349,
"narHash": "sha256-56LwV51TX/FhgX+5LCG6akQ5KrOWuKgcJa+eUsRMxsc=", "narHash": "sha256-jZhZkzAwc7f3exzcTDJWP2WCAchCv0iNC3UF/QsahdQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "b24ed4b272256dfc1cc2291f89a9821d5f9e14b4", "rev": "a19a2a029fa180911bd89c554dca1616e10f4c1d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -95,15 +172,60 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1781733627,
"narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"secrix": "secrix" "secrix": "secrix"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1782012058,
"narHash": "sha256-9mWUnReOUXfKjZuJAL/bAFH3LUyECTRtXgSNVjRw3UY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "8534567325bd8a8d2928e6afd81e0a87d19efd3c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"secrix": { "secrix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -111,11 +233,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1763929380, "lastModified": 1787124737,
"narHash": "sha256-Yc7gZME/lcHoJH6bMPCG7CyjKWhOLJPqLI8MXtyKPHo=", "narHash": "sha256-EnQcFCdcQs1agb8U/h3kn7+A3c3uorANCPP2WakZjAk=",
"owner": "Platonic-Systems", "owner": "Platonic-Systems",
"repo": "secrix", "repo": "secrix",
"rev": "c6e3ca7af47c329dcf442a3d017ae171eee5612f", "rev": "9c0a7db4e355c28fe67643656821b06161b4df61",
"type": "github" "type": "github"
}, },
"original": { "original": {
+16 -1
View File
@@ -22,9 +22,13 @@
url = "github:Platonic-Systems/secrix"; url = "github:Platonic-Systems/secrix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.1.0";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, plasma-manager, nixos-generators, secrix }: outputs = { self, nixpkgs, home-manager, plasma-manager, nixos-generators, secrix, lanzaboote }:
let let
hmModule = file: { hmModule = file: {
imports = [ home-manager.nixosModules.home-manager ]; imports = [ home-manager.nixosModules.home-manager ];
@@ -55,6 +59,16 @@
apps.x86_64-linux.secrix = secrix.secrix self; apps.x86_64-linux.secrix = secrix.secrix self;
nixosConfigurations = { nixosConfigurations = {
builder = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./modules
./hosts/common.nix
./hosts/hw-vm.nix
./hosts/builder
./users/cazzzer
];
};
Yura-PC = nixpkgs.lib.nixosSystem { Yura-PC = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@@ -70,6 +84,7 @@
Yura-TPX13 = nixpkgs.lib.nixosSystem { Yura-TPX13 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
lanzaboote.nixosModules.lanzaboote
./modules ./modules
./hosts/common.nix ./hosts/common.nix
./hosts/common-desktop.nix ./hosts/common-desktop.nix
+5 -5
View File
@@ -5,11 +5,11 @@
enable = true; enable = true;
shellInit = "set fish_greeting"; shellInit = "set fish_greeting";
shellAliases = { shellAliases = {
# Replace ls with exa # Replace ls with eza
ls = "exa -al --color=always --group-directories-first --icons"; # preferred listing ls = "eza -al --color=always --group-directories-first --icons=always"; # preferred listing
la = "exa -a --color=always --group-directories-first --icons"; # all files and dirs la = "eza -a --color=always --group-directories-first --icons=always"; # all files and dirs
ll = "exa -l --color=always --group-directories-first --icons"; # long format ll = "eza -l --color=always --group-directories-first --icons=always"; # long format
lt = "exa -aT --color=always --group-directories-first --icons"; # tree listing lt = "eza -aT --color=always --group-directories-first --icons=always"; # tree listing
"l." = "exa -a | rg '^\.'"; # show only dotfiles "l." = "exa -a | rg '^\.'"; # show only dotfiles
# Replace cat with bat # Replace cat with bat
+15
View File
@@ -12,6 +12,8 @@
]; ];
opts.kb-input.enable = true; opts.kb-input.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
# Bootloader. # Bootloader.
boot.kernelParams = [ boot.kernelParams = [
"amd_iommu=on" "amd_iommu=on"
@@ -29,6 +31,19 @@
# https://nixos.wiki/wiki/Accelerated_Video_Playback # https://nixos.wiki/wiki/Accelerated_Video_Playback
hardware.graphics.extraPackages = with pkgs; [ hardware.graphics.extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-media-driver # LIBVA_DRIVER_NAME=iHD
vpl-gpu-rt
];
environment.systemPackages = with pkgs; [
lmstudio
];
services.ollama.enable = true;
services.ollama.package = pkgs.ollama-vulkan;
programs.obs-studio.enable = true;
programs.obs-studio.plugins = with pkgs.obs-studio-plugins; [
obs-vaapi
]; ];
networking.hostName = "Yura-PC"; # Define your hostname. networking.hostName = "Yura-PC"; # Define your hostname.
+14 -5
View File
@@ -14,17 +14,26 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "zroot/ROOT/nixos/default"; { device = "/dev/mapper/luks-42b36c51-a57a-4bdb-b554-5742f1ae815a";
fsType = "zfs"; fsType = "btrfs";
};
boot.initrd.luks.devices."luks-42b36c51-a57a-4bdb-b554-5742f1ae815a".device = "/dev/disk/by-uuid/42b36c51-a57a-4bdb-b554-5742f1ae815a";
fileSystems."/home" =
{ device = "/dev/mapper/luks-42b36c51-a57a-4bdb-b554-5742f1ae815a";
fsType = "btrfs";
options = [ "subvol=home" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "zroot/data/nix"; { device = "/dev/mapper/luks-42b36c51-a57a-4bdb-b554-5742f1ae815a";
fsType = "zfs"; fsType = "btrfs";
options = [ "subvol=nix" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/970C-6A15"; { device = "/dev/disk/by-uuid/A043-E763";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
+8
View File
@@ -6,11 +6,19 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot.kernelPackages = pkgs.linuxPackages;
# Bootloader. # Bootloader.
boot.kernelParams = [ boot.kernelParams = [
"sysrq_always_enabled=1" "sysrq_always_enabled=1"
]; ];
boot.loader.systemd-boot.enable = false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
networking.hostName = "Yura-TPX13"; # Define your hostname. networking.hostName = "Yura-TPX13"; # Define your hostname.
networking.hostId = "8425e349"; # Required for ZFS. networking.hostId = "8425e349"; # Required for ZFS.
+72
View File
@@ -0,0 +1,72 @@
{ config, lib, pkgs, ... }:
{
networking.hostName = "nix-builder";
networking.networkmanager.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
services.qemuGuest.enable = true;
security.sudo.wheelNeedsPassword = false;
programs.git.enable = true;
environment.systemPackages = [ pkgs.transcrypt ];
system.stateVersion = "24.11";
# Bound memory pressure on the initial 4 vCPU / 8 GiB VM.
nix.settings.max-jobs = 1;
nix.settings.cores = 4;
nix.settings.extra-substituters = lib.mkForce [ ];
zramSwap.enable = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
nix.optimise.automatic = true;
# Only serve on the LAN IPv4 address, including on this dual-stack VM.
services.nix-serve = {
enable = true;
package = pkgs.nix-serve-ng;
bindAddress = "10.17.1.100";
openFirewall = true;
secretKeyFile = "/var/lib/nix-cache/cache-key.sec";
};
users.groups.woodpecker = { };
users.users.woodpecker = {
isSystemUser = true;
group = "woodpecker";
home = "/var/lib/woodpecker";
};
services.woodpecker-agents.agents.nix = {
enable = true;
environment = {
WOODPECKER_BACKEND = "local";
WOODPECKER_SERVER = "woodpecker.cazzzer.com:9000";
WOODPECKER_MAX_WORKFLOWS = "1";
WOODPECKER_AGENT_LABELS = "repo=CaZzzer/nix-conf,!nix-builder=true";
WOODPECKER_BACKEND_LOCAL_TEMP_DIR = "/var/lib/woodpecker/workspaces";
};
# Root-owned, mode 0600; may also override server/TLS settings above.
environmentFile = [ "/var/lib/woodpecker/agent.env" ];
path = with pkgs; [
bash coreutils findutils git git-lfs openssh openssl python3 transcrypt
woodpecker-plugin-git config.nix.package
];
};
systemd.services.woodpecker-agent-nix.serviceConfig = {
DynamicUser = lib.mkForce false;
User = "woodpecker";
Group = "woodpecker";
StateDirectory = "woodpecker";
ReadWritePaths = [ "/var/lib/nix-ci" ];
};
systemd.services.woodpecker-agent-nix.unitConfig.ConditionPathExists =
"/var/lib/woodpecker/agent.env";
systemd.tmpfiles.rules = [
"d /var/lib/woodpecker/workspaces 0700 woodpecker woodpecker -"
"d /var/lib/nix-ci 0750 woodpecker woodpecker -"
"d /var/lib/nix-cache 0700 root root -"
];
}
+47 -15
View File
@@ -7,15 +7,19 @@
"sysrq_always_enabled=1" "sysrq_always_enabled=1"
]; ];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_17;
boot.loader = { boot.loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
timeout = 3; timeout = 3;
systemd-boot = { systemd-boot.enable = lib.mkDefault true;
enable = true;
configurationLimit = 5;
}; };
boot.kernel.sysctl = {
# https://wiki.archlinux.org/title/Zram#Optimizing_swap_on_zram
"vm.swappiness" = 180;
"vm.watermark_boost_factor" = 0;
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0;
}; };
zramSwap.enable = true;
# https://nixos.wiki/wiki/Accelerated_Video_Playback # https://nixos.wiki/wiki/Accelerated_Video_Playback
hardware.graphics.enable = true; hardware.graphics.enable = true;
@@ -33,8 +37,7 @@
services.xserver.enable = false; services.xserver.enable = false;
# Enable the KDE Plasma Desktop Environment. # Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true; services.displayManager.plasma-login-manager.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
@@ -57,7 +60,6 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false; hardware.bluetooth.powerOnBoot = false;
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.fish.enable = true;
programs.git.enable = true; programs.git.enable = true;
programs.git.lfs.enable = true; programs.git.lfs.enable = true;
# https://nixos.wiki/wiki/Git # https://nixos.wiki/wiki/Git
@@ -68,16 +70,20 @@
programs.wireshark.package = pkgs.wireshark; # wireshark-cli by default programs.wireshark.package = pkgs.wireshark; # wireshark-cli by default
programs.bat.enable = true; programs.bat.enable = true;
programs.htop.enable = true; programs.htop.enable = true;
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc.lib
# Add other common libraries if needed (e.g., zlib, glib)
];
# programs.steam.enable = true;
# https://nixos.wiki/wiki/Docker # https://nixos.wiki/wiki/Docker
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
virtualisation.docker.enableOnBoot = false; virtualisation.docker.enableOnBoot = false;
virtualisation.docker.package = pkgs.docker_28;
# https://github.com/flatpak/flatpak/issues/2861 # https://github.com/flatpak/flatpak/issues/2861
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
workarounds.flatpak.enable = true;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
fantasque-sans-mono fantasque-sans-mono
nerd-fonts.fantasque-sans-mono nerd-fonts.fantasque-sans-mono
@@ -113,10 +119,10 @@
powertop powertop
rbw rbw
restic restic
resticprofile
rclone rclone
ripgrep-all ripgrep-all
rustscan rustscan
unrar
whois whois
wireguard-tools wireguard-tools
yt-dlp yt-dlp
@@ -128,7 +134,9 @@
kdePackages.filelight kdePackages.filelight
kdePackages.flatpak-kcm kdePackages.flatpak-kcm
kdePackages.kate kdePackages.kate
kdePackages.partitionmanager
kdePackages.yakuake kdePackages.yakuake
mission-center
(mpv.override { (mpv.override {
scripts = with pkgs.mpvScripts; [ scripts = with pkgs.mpvScripts; [
mpris mpris
@@ -136,22 +144,32 @@
]; ];
}) })
nextcloud-client nextcloud-client
# lutris
lxqt.pavucontrol-qt lxqt.pavucontrol-qt
pinentry-all pinentry-all
tela-circle-icon-theme tela-circle-icon-theme
typst
virt-viewer virt-viewer
waypipe waypipe
] ++ [ ] ++ [
# jetbrains.rust-rover # jetbrains.rust-rover
# jetbrains.goland # jetbrains.goland
jetbrains.clion jetbrains.clion
jetbrains.idea-ultimate # jetbrains.idea
jetbrains.pycharm-professional jetbrains.pycharm
jetbrains.webstorm jetbrains.webstorm
android-studio android-studio
rustup rustup
zed-editor zed-editor
package-version-server # for zed package-version-server # for zed
antigravity-cli
antigravity-ide-fhs
codex
bubblewrap
# codex-acp
# github-copilot-cli
# opencode
# opencode-desktop
] ++ [ ] ++ [
# C # C
gcc gcc
@@ -162,27 +180,41 @@
poetry poetry
# Haskell # Haskell
cabal-install
haskell-language-server
# haskellPackages.hls-cabal-plugin
haskellPackages.ghc haskellPackages.ghc
haskellPackages.stack haskellPackages.stack
# Node # Node
nodejs_22 nodejs_24
pnpm pnpm
bun bun
# Nix # Nix
nil nil
nixd nixd
nixfmt-rfc-style nixfmt
# Gleam # Gleam
gleam gleam
beamMinimal26Packages.erlang beamMinimal28Packages.erlang
# Racket # Racket
racket racket
# Ruby # Ruby
ruby ruby
# Java
zulu
# spacetimedb
] ++ [
jujutsu
lazyjj
jjui
# jj-fzf
gg-jj
]; ];
} }
+7
View File
@@ -20,6 +20,11 @@
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.extra-substituters = [ "http://10.17.1.100:5000" ];
nix.settings.extra-trusted-public-keys = [
"nix-builder:PhxOkUyF2KD9ALkSC6saB2zoPp1o6hMOOpgp5/gngKI="
];
nix.settings.connect-timeout = 5;
environment.etc."current-system-packages".text = environment.etc."current-system-packages".text =
let let
@@ -32,4 +37,6 @@
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false; services.openssh.settings.PasswordAuthentication = false;
services.openssh.settings.KbdInteractiveAuthentication = false; services.openssh.settings.KbdInteractiveAuthentication = false;
programs.fish.enable = true;
} }
+2 -2
View File
@@ -14,12 +14,12 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"; { device = "/dev/disk/by-uuid/0dec41bf-aba0-4b7b-9f61-bbb572e5bd1e";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600"; { device = "/dev/disk/by-uuid/9F5E-672F";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
-2
View File
@@ -56,7 +56,6 @@
# Install firefox. # Install firefox.
programs.firefox.enable = true; programs.firefox.enable = true;
programs.fish.enable = true;
programs.git.enable = true; programs.git.enable = true;
programs.neovim.enable = true; programs.neovim.enable = true;
@@ -70,7 +69,6 @@
# https://github.com/flatpak/flatpak/issues/2861 # https://github.com/flatpak/flatpak/issues/2861
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# workarounds.flatpak.enable = true;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-cjk-serif noto-fonts-cjk-serif
-1
View File
@@ -1,6 +1,5 @@
{ ... }: { { ... }: {
imports = [ imports = [
./opts ./opts
./workarounds
]; ];
} }
+1 -2
View File
@@ -27,7 +27,7 @@ in
boot.loader.timeout = 2; boot.loader.timeout = 2;
boot.loader.systemd-boot.configurationLimit = 5; boot.loader.systemd-boot.configurationLimit = 5;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12; boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_18;
boot.growPartition = true; boot.growPartition = true;
# Enable the X11 windowing system. # Enable the X11 windowing system.
@@ -52,7 +52,6 @@ in
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
programs.firefox.enable = true; programs.firefox.enable = true;
programs.fish.enable = true;
programs.git.enable = true; programs.git.enable = true;
programs.neovim.enable = true; programs.neovim.enable = true;
programs.bat.enable = true; programs.bat.enable = true;
+6 -5
View File
@@ -26,6 +26,7 @@ let
"|opnsense." "|opnsense."
"|vpgen." "|vpgen."
"|woodpecker." "|woodpecker."
"|woodpecker-grpc."
"||pgrok." "||pgrok."
"|sync." "|sync."
"|minecruft." "|minecruft."
@@ -54,17 +55,17 @@ in
enable_dnssec = true; enable_dnssec = true;
bootstrap_dns = [ "1.1.1.1" "9.9.9.9" ]; bootstrap_dns = [ "1.1.1.1" "9.9.9.9" ];
upstream_dns = [ upstream_dns = [
# Default upstreams
"quic://p0.freedns.controld.com"
"tls://one.one.one.one"
"tls://dns.quad9.net"
# Adguard uses upstream and not rewrite rules to resolve cname rewrites, # Adguard uses upstream and not rewrite rules to resolve cname rewrites,
# and obviously my sysdomain entries don't exist in cloudflare. # and obviously my sysdomain entries don't exist in cloudflare.
"[/${sysdomain}/][::1]" # Sys domains to self (for cname rewrites) "[/${sysdomain}/][::1]" # Sys domains to self (for cname rewrites)
"[/${ldomain}/][::1]:1053" # Local domains to Knot (ddns) "[/${ldomain}/][::1]:1053" # Local domains to Knot (ddns)
"[/home/][${ifs.lan.ulaPrefix}::250]" # .home domains to opnsense (temporary) "[/home/][${ifs.lan.ulaPrefix}::250]" # .home domains to opnsense (temporary)
# Default upstreams
"quic://p0.freedns.controld.com"
"tls://one.one.one.one"
"tls://dns.quad9.net"
]; ];
}; };
# https://adguard-dns.io/kb/general/dns-filtering-syntax/ # https://adguard-dns.io/kb/general/dns-filtering-syntax/
+1
View File
@@ -58,6 +58,7 @@ in
udp . 48425 : ${vars.extra.opnsense.addr4} . 48425, udp . 48425 : ${vars.extra.opnsense.addr4} . 48425,
# Amnezia VPN server # Amnezia VPN server
udp . 37138 : ${vars.extra.amnezia.addr4} . 37138, udp . 37138 : ${vars.extra.amnezia.addr4} . 37138,
tcp . 38247 : ${vars.extra.amnezia.addr4} . 22,
# Minecruft server # Minecruft server
tcp . 25565 : ${vars.extra.minecruft.addr4} . 25565, tcp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
udp . 25565 : ${vars.extra.minecruft.addr4} . 25565, udp . 25565 : ${vars.extra.minecruft.addr4} . 25565,
+3
View File
@@ -52,6 +52,9 @@ in
# since my WAN and LAN20 are technically bridged. # since my WAN and LAN20 are technically bridged.
# https://networkengineering.stackexchange.com/questions/83071/why-linux-answers-arp-requests-for-ips-that-belong-to-different-network-interfac # https://networkengineering.stackexchange.com/questions/83071/why-linux-answers-arp-requests-for-ips-that-belong-to-different-network-interfac
boot.kernel.sysctl."net.ipv4.conf.default.arp_filter" = 1; boot.kernel.sysctl."net.ipv4.conf.default.arp_filter" = 1;
# Later I discovered that rp_filter might also be good to set
# Strict mode (1) drops packets if the src ip isn't a local route on the interface
boot.kernel.sysctl."net.ipv4.conf.default.rp_filter" = 1;
# It is impossible to do multiple prefix requests with networkd, # It is impossible to do multiple prefix requests with networkd,
# so I use dhcpcd for this # so I use dhcpcd for this
@@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 D2MY/A txjDSEsRr2CJtC9rDIiY9H8aX0us53vhnqJStt+XvlA
vjmrx5ByEhbHE/hBEQq3gRqY8b5/mjHLs+He3D/27LM
--- rp66vDf9qnM7f9S5YD/X/99YsufPWmvz+V8z8htB2Ow
9‡Ài¨*¡-oš·}Ć(Š5[¬[ÕyKr)¾-­cùäóŽù¼R0?Ë8`Èô×{
+4 -2
View File
@@ -29,10 +29,12 @@ in
}; };
# https://wiki.nixos.org/wiki/Grafana#Declarative_configuration # https://wiki.nixos.org/wiki/Grafana#Declarative_configuration
secrix.services.grafana.secrets.security-key.encrypted.file = ./secrets/grafana-secret-key.age;
services.grafana = { services.grafana = {
enable = true; enable = true;
settings = { settings = {
security.allow_embedding = true; security.allow_embedding = true;
security.secret_key = "$__file{${config.secrix.services.grafana.secrets.security-key.decrypted.path}}";
server = { server = {
http_port = 3001; http_port = 3001;
domain = "grouter.${domain}"; domain = "grouter.${domain}";
@@ -57,8 +59,8 @@ in
services.caddy = { services.caddy = {
enable = true; enable = true;
package = pkgs.caddy.withPlugins { package = pkgs.caddy.withPlugins {
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ]; plugins = [ "github.com/caddy-dns/cloudflare@v0.2.4" ];
hash = "sha256-aRMg7R0dBAy+LJeGCMPg6HKppM6NPX2NPwtc0CeSQLg="; hash = "sha256-QSiwKqKvSxhksWBF4/MlBOpyXba5xOQ2sRwA0R7399E=";
}; };
virtualHosts."*.${domain}".extraConfig = '' virtualHosts."*.${domain}".extraConfig = ''
encode encode
-5
View File
@@ -1,5 +0,0 @@
{
imports = [
./flatpak.nix
];
}
-44
View File
@@ -1,44 +0,0 @@
# https://github.com/knightpp/nixos-cfg/blob/main/modules/workarounds/flatpak.nix
{
pkgs,
config,
lib,
...
}: let
cfg = config.workarounds.flatpak;
in {
options = {
workarounds.flatpak = {
enable = lib.mkEnableOption "flatpak workaround";
};
};
config = lib.mkIf cfg.enable {
system.fsPackages = [pkgs.bindfs];
fileSystems = let
mkRoSymBind = path: {
device = path;
fsType = "fuse.bindfs";
options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
};
aggregated = pkgs.buildEnv {
name = "system-fonts-and-icons";
paths = builtins.attrValues {
inherit (pkgs.kdePackages) breeze;
inherit
(pkgs)
noto-fonts
noto-fonts-color-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
;
};
pathsToLink = ["/share/fonts" "/share/icons"];
};
in {
# Create an FHS mount to support flatpak host icons/fonts
"/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons";
"/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts";
};
};
}