all repos — nixfiles @ 93dba07db6a1db2d7d84adf56da0f9cc2d31bc81

System and user configuration, managed by nix and home-manager

Switch back to flakes (again) This reverts commit b5bcdf72cbc998550bf55af1842fe65f8c9ef0bf.

Alan Pearce
commit

93dba07db6a1db2d7d84adf56da0f9cc2d31bc81

parent

0996780254c9d819f0a8be3a63b643ad11dc66be

M .envrc.envrc
@@ -1,8 +1,10 @@
watch_file npins/sources.json if type -P lorri &>/dev/null; then - eval "$(lorri direnv)" + if test -n "$TMPDIR"; then + export TMPDIR="$(readlink -f $TMPDIR)" + fi + eval "$(lorri direnv --flake .)" else echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' use nix fi -PATH_add bin
M .gitignore.gitignore
@@ -1,3 +1,2 @@
/result /secrets/key.txt -/system/configuration.nix
M REUSE.tomlREUSE.toml
@@ -10,11 +10,6 @@ SPDX-FileCopyrightText = "2024 Alan Pearce <alan@alanpearce.eu>"
SPDX-License-Identifier = "MIT" [[annotations]] -path = ["npins/*"] -SPDX-FileCopyrightText = "NONE" -SPDX-License-Identifier = "CC0-1.0" - -[[annotations]] path = "**/*.el" SPDX-FileCopyrightText = "2024 Alan Pearce <alan@alanpearce.eu>" SPDX-License-Identifier = "GPL-3.0-or-later"
D bin/darwin-rebuild
@@ -1,1 +0,0 @@
-home-manager
D bin/home-manager
@@ -1,156 +0,0 @@
-#!/usr/bin/env fish - -if not set --query HOME - echo "error: no HOME" - exit 1 -end - -set --query XDG_STATE_HOME || set --function XDG_STATE_HOME $HOME/.local/state -set --function nix_state_home $XDG_STATE_HOME/nix -set --function channel_root $nix_state_home/profiles/channels -set --function user_nixpkgs $HOME/.config/nixpkgs -set --function darwin_config /etc/nix-darwin/ -set --function nixfiles (path resolve (status dirname)/..) - -if set --query XDG_CONFIG_HOME - set --function hm_config_dir $XDG_CONFIG_HOME/home-manager -else - set --function hm_config_dir $HOME/.config/home-manager -end - -set --function current_script_name (status basename) -for i in 1 - if test ! -d $darwin_config - if test ! -e $darwin_config && test -L $darwin_config - echo "$darwin_config is a broken symlink, deleting it [sudo]" - sudo rm $darwin_config - end - echo "darwin configuration folder $darwin_config does not exist, creating it [sudo]" - sudo mkdir -p $darwin_config - end - if test ! -d $user_nixpkgs - if test ! -e $user_nixpkgs && test -L $user_nixpkgs - echo "~/.config/nixpkgs is a broken symlink, deleting it" - rm $user_nixpkgs - end - echo "user nixpkgs folder $user_nixpkgs does not exist, creating it" - mkdir -p $user_nixpkgs - end - if test -L $hm_config_dir -a (path resolve $hm_config_dir) = (path resolve (status basename)) - if test y = (read --nchars=1 --prompt-str="$hm_config_dir already exists as a symlink to the current directory. Remove it [yN]? ") - unlink $hm_config_dir - end - end - if test ! -d $hm_config_dir - echo "user home-manager configuration folder $hm_config_dir does not exist, creating it" - mkdir -p $hm_config_dir - end - if test ! -e $channel_root - if test -L $channel_root - # broken symlink - rm $channel_root - end - echo "channel root $channel_root does not exist, creating it" - mkdir -p $channel_root - else - if test ! -d $channel_root - echo "error: $channel_root is not a directory" - else if test -L $channel_root - echo "error: $channel_root is a symlink, please remove it" - else if path is --invert --perm write $channel_root - echo "error: $channel_root is not writable; might be a symlink" - else if path is --invert --type link $channel_root/* - for p in (path filter --invert --type link $channel_root/*) - # might be a broken symlink - if test -L $p -a ! -e $p - rm $p - else - echo "error: channel $p is not a broken symlink, don't know what to do with it" - end - end - # check again and fail if there are still unknown files - if path is --invert --type link $channel_root/* - echo "error: non-link(s) in $channel_root" - path filter --invert --type link $channel_root/* - else - continue - end - else - continue # with script - end - exit 1 - end -end - -set --function current_script_name (status basename) -switch $current_script_name - case darwin-rebuild - set --local darwin_config_source $nixfiles/system/$hostname.nix - set --local darwin_config_target $darwin_config/configuration.nix - if test ! -e $darwin_config_target - echo "Need to link $darwin_config_target" - sudo ln -s $darwin_config_source $darwin_config_target - end - set --append argv -I darwin-config=$darwin_config_target - case nixos-rebuild - set --local nixos_config_source $nixfiles/system/$hostname.nix - set --local nixos_config_target $user_nixpkgs/configuration.nix - if test ! -e $nixos_config_target - ln -s $nixos_config_source $nixos_config_target - end - if ! fish_is_root_user - set --append argv --use-remote-sudo - end - set --append argv -I nixos-config=$nixos_config_source - case home-manager - set --local hm_config_source $nixfiles/user/$hostname.nix - set --export HOME_MANAGER_CONFIG $hm_config_source -end - -set --function old_channels (path basename $channel_root/*) - -function update_link --argument-names new_src target - set --function current_src (path resolve $target) - if test -e $current_src - if test $current_src = $new_src - # no need to re-link it - return - else - unlink $target - end - end - ln -s $new_src $target -end - -for np in $NIX_PATH - if string match --quiet --entire "=" $np - echo $np | read --function --delimiter "=" channel new_src_rel - set --local new_src (path resolve $new_src_rel) - - if set --local i (contains --index $channel $old_channels) - set --erase old_channels[$i] - end - - update_link $new_src $channel_root/$channel - end -end - -for old in $channel_root/$old_channels - rm $old -end - -if set --function i (contains --index (status dirname) $PATH) && test -n $i - set --erase PATH[$i] -end - -set --function cmd $current_script_name $argv - -if contains -- -n $argv - set --prepend cmd echo -end - -if set --query IN_NIX_SHELL - $cmd -else - nix-shell --run "$cmd" -end
D bin/nixos-rebuild
@@ -1,1 +0,0 @@
-home-manager
A flake.lock
@@ -0,0 +1,1074 @@
+{ + "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1747575206, + "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", + "owner": "ryantm", + "repo": "agenix", + "rev": "4835b1dc898959d8547a871ef484930675cb47f1", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "angrr": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1749226797, + "narHash": "sha256-EsMIp5zoW4VaPPcKdGhfHENZQyYqHjMPBB/k4l+3kY4=", + "owner": "linyinfeng", + "repo": "angrr", + "rev": "8f79c69ded2090f214d7027ef8114716f1254702", + "type": "github" + }, + "original": { + "owner": "linyinfeng", + "repo": "angrr", + "type": "github" + } + }, + "crane": { + "locked": { + "lastModified": 1748970125, + "narHash": "sha256-UDyigbDGv8fvs9aS95yzFfOKkEjx1LO3PL3DsKopohA=", + "owner": "ipetkov", + "repo": "crane", + "rev": "323b5746d89e04b22554b061522dfce9e4c49b18", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "darwin_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749194393, + "narHash": "sha256-vt6hM9DNywnXXuW1qPDLzECmbDcmxhh58wpb0EEQjAo=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "19346808c445f23b08652971be198b9df6c33edc", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1749105467, + "narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "6bc76b872374845ba9d645a2f012b764fecd765f", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "elgit": { + "inputs": { + "flake-utils": "flake-utils", + "gomod2nix": "gomod2nix", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1749531561, + "narHash": "sha256-zWsvOlC/u1K9L9VemiIhRGeChg0C2HtWoVh34MRT7uA=", + "ref": "refs/heads/main", + "rev": "dffc16df68df06151f177bc1702e7bb3eb190228", + "revCount": 211, + "type": "git", + "url": "https://git.alin.ovh/elgit" + }, + "original": { + "type": "git", + "url": "https://git.alin.ovh/elgit" + } + }, + "emacs-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1749521434, + "narHash": "sha256-iYuO2A6EeCk3yt7i+u5BbKpYUKBWZrWwEvyMzx7JL8o=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "a1fc4a1252cf8f730d39a6570d36b9b95b478cd5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "angrr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748821116, + "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_8" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "searchix", + "pre-commit-hooks", + "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" + } + }, + "golink": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1748546644, + "narHash": "sha256-HMoXUvYz+p3vTK0hp445Vc7Od9F6oHV0FrRBPx1b2Fs=", + "owner": "tailscale", + "repo": "golink", + "rev": "a98f4c4dffd89d9e2052904ac5abfa5b11016382", + "type": "github" + }, + "original": { + "owner": "tailscale", + "repo": "golink", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "flake-utils": [ + "elgit", + "flake-utils" + ], + "nixpkgs": [ + "elgit", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745875161, + "narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, + "gomod2nix_2": { + "inputs": { + "flake-utils": [ + "searchix", + "flake-utils" + ], + "nixpkgs": [ + "searchix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745875161, + "narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749526396, + "narHash": "sha256-UL9F76abAk87llXOrcQRjhd5OaOclUd6MIltsqcUZmo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "427c96044f11a5da50faf6adaf38c9fa47e6d044", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748294338, + "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.8", + "repo": "ixx", + "type": "github" + } + }, + "mycal": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_4", + "pyproject-build-systems": "pyproject-build-systems", + "pyproject-nix": "pyproject-nix", + "uv2nix": "uv2nix" + }, + "locked": { + "lastModified": 1749499698, + "narHash": "sha256-wbQUr+tK4Vjjp6UtsnrN1lN3B26VKQ5Gn24CN/Xap0M=", + "ref": "refs/heads/main", + "rev": "eacbbc2d022f8b992d7e9f9440ec532eb033b921", + "revCount": 33, + "type": "git", + "url": "https://git.alin.ovh/mycal" + }, + "original": { + "type": "git", + "url": "https://git.alin.ovh/mycal" + } + }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749355504, + "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", + "owner": "Mic92", + "repo": "nix-index-database", + "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-index-database", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1749195551, + "narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "4602f7e1d3f197b3cb540d5accf5669121629628", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1743014863, + "narHash": "sha256-jAIUqsiN2r3hCuHji80U7NNEafpIMBXiwKlSrjWMlpg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bd3bac8bfb542dbde7ffffb6987a1a1f9d41699f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1749173751, + "narHash": "sha256-ENY3y3v6S9ZmLDDLI3LUT8MXmfXg/fSt2eA4GCnMVCE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed29f002b6d6e5e7e32590deb065c34a31dc3e91", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1748406211, + "narHash": "sha256-B3BsCRbc+x/d0WiG1f+qfSLUy+oiIfih54kalWBi+/M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3d1f29646e4b57ed468d60f9d286cde23a8d1707", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1749411262, + "narHash": "sha256-gRBkeW9l5lb/90lv1waQFNT+18OhITs11HENarh6vNo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fc422d6c394191338c9d6a05786c63fc52a0f29", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "systems": "systems_7" + }, + "locked": { + "lastModified": 1749496904, + "narHash": "sha256-eNDMzrcDBOprdJs7DpMOJfCEcxribxDJP2OjozSC3Wo=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "e0b3d8bc3a0ab5a7cc0792c7705e92f9c5c598f3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_3", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748298102, + "narHash": "sha256-PP11GVwUt7F4ZZi5A5+99isuq39C59CKc5u5yVisU/U=", + "owner": "NuschtOS", + "repo": "search", + "rev": "f8a1c221afb8b4c642ed11ac5ee6746b0fe1d32f", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore", + "nixpkgs": [ + "searchix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pyproject-build-systems": { + "inputs": { + "nixpkgs": [ + "mycal", + "nixpkgs" + ], + "pyproject-nix": [ + "mycal", + "pyproject-nix" + ], + "uv2nix": [ + "mycal", + "uv2nix" + ] + }, + "locked": { + "lastModified": 1744599653, + "narHash": "sha256-nysSwVVjG4hKoOjhjvE6U5lIKA8sEr1d1QzEfZsannU=", + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "rev": "7dba6dbc73120e15b558754c26024f6c93015dd7", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "type": "github" + } + }, + "pyproject-nix": { + "inputs": { + "nixpkgs": [ + "mycal", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746540146, + "narHash": "sha256-QxdHGNpbicIrw5t6U3x+ZxeY/7IEJ6lYbvsjXmcxFIM=", + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "rev": "e09c10c24ebb955125fda449939bfba664c467fd", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "agenix": "agenix", + "angrr": "angrr", + "darwin": "darwin_2", + "deploy-rs": "deploy-rs", + "elgit": "elgit", + "emacs-overlay": "emacs-overlay", + "golink": "golink", + "home-manager": "home-manager_2", + "mycal": "mycal", + "nix-index-database": "nix-index-database", + "nixos-hardware": "nixos-hardware", + "nixpkgs": [ + "srvos", + "nixpkgs" + ], + "nixvim": "nixvim", + "searchix": "searchix", + "srvos": "srvos", + "utils": "utils_2" + } + }, + "searchix": { + "inputs": { + "flake-utils": "flake-utils_4", + "gomod2nix": "gomod2nix_2", + "nixpkgs": "nixpkgs_5", + "pre-commit-hooks": "pre-commit-hooks", + "simple-css": "simple-css" + }, + "locked": { + "lastModified": 1749499050, + "narHash": "sha256-rTwHdCsSb1j0oQeYa41zdxU9QASB/StiY+tG82/5RHY=", + "ref": "refs/heads/main", + "rev": "7b72c9cc5589f2fd1693e114220ac9176687d5e9", + "revCount": 450, + "type": "git", + "url": "https://git.alin.ovh/searchix" + }, + "original": { + "type": "git", + "url": "https://git.alin.ovh/searchix" + } + }, + "simple-css": { + "flake": false, + "locked": { + "narHash": "sha256-mpWXLxBYpwcdO2bY9uDhkEYvkdslngGfOSO/l/rU1tM=", + "type": "file", + "url": "https://raw.githubusercontent.com/kevquirk/simple.css/v2.3.4/simple.css" + }, + "original": { + "type": "file", + "url": "https://raw.githubusercontent.com/kevquirk/simple.css/v2.3.4/simple.css" + } + }, + "srvos": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1749431367, + "narHash": "sha256-gW+9PVxQ0WFYAZTZIs++c++djQBQtLdfPEuoysW14bw=", + "owner": "nix-community", + "repo": "srvos", + "rev": "0f68c14174fc0cd94d9aad9ca2cb7947265e379b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "srvos", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_8": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_9": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "angrr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749194973, + "narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "inputs": { + "systems": "systems_9" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "uv2nix": { + "inputs": { + "nixpkgs": [ + "mycal", + "nixpkgs" + ], + "pyproject-nix": [ + "mycal", + "pyproject-nix" + ] + }, + "locked": { + "lastModified": 1747949765, + "narHash": "sha256-1v8SFHOwUCvHDXFmQRjHZYawY19nxmtZ7zH/kwAGgj0=", + "owner": "pyproject-nix", + "repo": "uv2nix", + "rev": "ec0502250b48116fd3aa8e1347a2d0254bacd05e", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "uv2nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +}
A flake.nix
@@ -0,0 +1,218 @@
+{ + inputs = { + srvos.url = "github:nix-community/srvos"; + nixpkgs.follows = "srvos/nixpkgs"; + nixos-hardware.url = "github:NixOS/nixos-hardware"; + nix-index-database.url = "github:Mic92/nix-index-database"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; + darwin.url = "github:lnl7/nix-darwin/master"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; + emacs-overlay.url = "github:nix-community/emacs-overlay"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + utils.url = "github:numtide/flake-utils"; + angrr.url = "github:linyinfeng/angrr"; + angrr.inputs.nixpkgs.follows = "nixpkgs"; + agenix.url = "github:ryantm/agenix"; + agenix.inputs.nixpkgs.follows = "nixpkgs"; + deploy-rs.url = "github:serokell/deploy-rs"; + mycal.url = "git+https://git.alin.ovh/mycal"; + elgit.url = "git+https://git.alin.ovh/elgit"; + searchix.url = "git+https://git.alin.ovh/searchix"; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + golink = { + url = "github:tailscale/golink"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + inputs@ + { self + , utils + , srvos + , nixpkgs + , nixos-hardware + , emacs-overlay + , home-manager + , darwin + , nix-index-database + , nixvim + , angrr + , agenix + , deploy-rs + , elgit + , mycal + , searchix + , golink + , ... + }: + let + readOverlays = path: + let content = builtins.readDir path; in + map (n: import (path + ("/" + n))) + (builtins.filter + (n: + (builtins.match ".*\\.nix" n != null && + # ignore Emacs lock files (.#foo.nix) + builtins.match "\\.#.*" n == null) || + builtins.pathExists (path + ("/" + n + "/default.nix"))) + (builtins.attrNames content)); + + mkHomeConfiguration = { modules, system }: home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + overlays = readOverlays (toString ./overlays) ++ [ + agenix.overlays.default + angrr.overlays.default + emacs-overlay.overlays.default + (self: super: { + personal = import ./packages/overlay.nix self super; + enchant = super.enchant.override { + withHspell = false; + withAspell = false; + }; + }) + ]; + }; + + inherit modules; + extraSpecialArgs = { + inherit inputs system; + }; + }; + in + { + nixosConfigurations.prefect = nixpkgs.lib.nixosSystem { + system = utils.lib.system.x86_64-linux; + specialArgs = { inherit inputs; }; + modules = [ + ./system/prefect.nix + ] ++ (with nixos-hardware.nixosModules; [ + common-cpu-amd + common-cpu-amd-pstate + common-pc-ssd + common-pc + common-gpu-nvidia-nonprime + ]); + }; + nixosConfigurations.nano = nixpkgs.lib.nixosSystem { + system = utils.lib.system.aarch64-linux; + specialArgs = { inherit inputs; }; + modules = [ + agenix.nixosModules.default + srvos.nixosModules.server + srvos.nixosModules.mixins-systemd-boot + ./system/nano.nix + ./system/nano-hardware.nix + ]; + }; + nixosConfigurations.linde = nixpkgs.lib.nixosSystem { + system = utils.lib.system.aarch64-linux; + specialArgs = { inherit inputs; }; + modules = [ + srvos.nixosModules.server + srvos.nixosModules.hardware-hetzner-cloud-arm + agenix.nixosModules.default + elgit.nixosModules.default + mycal.nixosModules.default + searchix.nixosModules.web + golink.nixosModules.default + ./packages/modules/nixos/laminar.nix + ./system/linde.nix + ]; + }; + darwinConfigurations.marvin = darwin.lib.darwinSystem { + system = utils.lib.system.aarch64-darwin; + specialArgs = { inherit inputs; }; + modules = [ + srvos.darwinModules.desktop + ./system/marvin.nix + ./packages/modules/darwin/caddy + ]; + }; + homeConfigurations."alan@marvin" = mkHomeConfiguration { + system = utils.lib.system.aarch64-darwin; + modules = [ + ./user/marvin.nix + ./private/tabnine.nix + ./private/ssh.nix + nix-index-database.hmModules.nix-index + nixvim.homeModules.nixvim + ]; + }; + homeConfigurations."alan@prefect" = mkHomeConfiguration { + system = utils.lib.system.x86_64-linux; + modules = [ + ./user/prefect.nix + ./private/tabnine.nix + ./private/ssh.nix + nix-index-database.hmModules.nix-index + ]; + }; + homeConfigurations."alan@nano" = mkHomeConfiguration { + system = utils.lib.system.aarch64-linux; + modules = [ + ./user/nano.nix + nix-index-database.hmModules.nix-index + ]; + }; + homeConfigurations."alan@linde" = mkHomeConfiguration { + system = utils.lib.system.aarch64-linux; + modules = [ + ./user/server.nix + nix-index-database.hmModules.nix-index + ]; + }; + + deploy = { + nodes.linde = { + hostname = "linde"; + profiles.system = { + user = "root"; + sshUser = "root"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos + self.nixosConfigurations.linde; + }; + profiles.alan = { + user = "alan"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@linde"; + }; + }; + nodes.nano = { + hostname = "nano"; + profiles.system = { + user = "root"; + sshUser = "root"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos + self.nixosConfigurations.nano; + }; + profiles.alan = { + user = "alan"; + sshUser = "alan"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@nano"; + }; + }; + }; + } // utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = { + default = pkgs.mkShell { + packages = with pkgs; [ + home-manager + colmena + deploy-rs.packages.${system}.default + agenix.packages.${system}.default + ]; + }; + }; + }); +}
D npins/default.nix
@@ -1,146 +0,0 @@
-/* - This file is provided under the MIT licence: - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -# Generated by npins. Do not modify; will be overwritten regularly -let - data = builtins.fromJSON (builtins.readFile ./sources.json); - version = data.version; - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = - first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 - stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 - stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); - concatMapStrings = f: list: concatStrings (map f list); - concatStrings = builtins.concatStringsSep ""; - - # If the environment variable NPINS_OVERRIDE_${name} is set, then use - # the path directly as opposed to the fetched source. - # (Taken from Niv for compatibility) - mayOverride = - name: path: - let - envVarName = "NPINS_OVERRIDE_${saneName}"; - saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; - ersatz = builtins.getEnv envVarName; - in - if ersatz == "" then - path - else - # this turns the string into an actual Nix path (for both absolute and - # relative paths) - builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( - if builtins.substring 0 1 ersatz == "/" then - /. + ersatz - else - /. + builtins.getEnv "PWD" + "/${ersatz}" - ); - - mkSource = - name: spec: - assert spec ? type; - let - path = - if spec.type == "Git" then - mkGitSource spec - else if spec.type == "GitRelease" then - mkGitSource spec - else if spec.type == "PyPi" then - mkPyPiSource spec - else if spec.type == "Channel" then - mkChannelSource spec - else if spec.type == "Tarball" then - mkTarballSource spec - else - builtins.throw "Unknown source type ${spec.type}"; - in - spec // { outPath = mayOverride name path; }; - - mkGitSource = - { - repository, - revision, - url ? null, - submodules, - hash, - branch ? null, - ... - }: - assert repository ? type; - # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository - # In the latter case, there we will always be an url to the tarball - if url != null && !submodules then - builtins.fetchTarball { - inherit url; - sha256 = hash; # FIXME: check nix version & use SRI hashes - } - else - let - url = - if repository.type == "Git" then - repository.url - else if repository.type == "GitHub" then - "https://github.com/${repository.owner}/${repository.repo}.git" - else if repository.type == "GitLab" then - "${repository.server}/${repository.repo_path}.git" - else - throw "Unrecognized repository type ${repository.type}"; - urlToName = - url: rev: - let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; - - short = builtins.substring 0 7 rev; - - appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; - in - "${if matched == null then "source" else builtins.head matched}${appendShort}"; - name = urlToName url revision; - in - builtins.fetchGit { - rev = revision; - inherit name; - # hash = hash; - inherit url submodules; - }; - - mkPyPiSource = - { url, hash, ... }: - builtins.fetchurl { - inherit url; - sha256 = hash; - }; - - mkChannelSource = - { url, hash, ... }: - builtins.fetchTarball { - inherit url; - sha256 = hash; - }; - - mkTarballSource = - { - url, - locked_url ? url, - hash, - ... - }: - builtins.fetchTarball { - url = locked_url; - sha256 = hash; - }; -in -if version == 5 then - builtins.mapAttrs mkSource data.pins -else - throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"
D npins/sources.json
@@ -1,187 +0,0 @@
-{ - "pins": { - "agenix": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "ryantm", - "repo": "agenix" - }, - "branch": "main", - "submodules": false, - "revision": "4835b1dc898959d8547a871ef484930675cb47f1", - "url": "https://github.com/ryantm/agenix/archive/4835b1dc898959d8547a871ef484930675cb47f1.tar.gz", - "hash": "0ngkhf7qamibhbl9z1dryzscd36y4fz1m1h6fb2z6fylw0b8029p" - }, - "angrr": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "alanpearce", - "repo": "angrr" - }, - "branch": "main", - "submodules": false, - "revision": "2f1aa3e7b6bebc5db59b37cc94ca3e74889026bf", - "url": "https://github.com/alanpearce/angrr/archive/2f1aa3e7b6bebc5db59b37cc94ca3e74889026bf.tar.gz", - "hash": "0b4jw5sksm46yjdh296dn8d781842blayq7m64ysw2qdccx2m9g7" - }, - "darwin": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "lnl7", - "repo": "nix-darwin" - }, - "branch": "master", - "submodules": false, - "revision": "19346808c445f23b08652971be198b9df6c33edc", - "url": "https://github.com/lnl7/nix-darwin/archive/19346808c445f23b08652971be198b9df6c33edc.tar.gz", - "hash": "02lc210x0nqaydwiiii66xnach6crgqaidg5bvbhkjyds0rs3pmy" - }, - "elgit": { - "type": "Git", - "repository": { - "type": "Forgejo", - "server": "https://codeberg.org/", - "owner": "alanpearce", - "repo": "elgit" - }, - "branch": "main", - "submodules": false, - "revision": "6fc0ce917cc6ac9c1faaab61f14d686aa5bc0ab6", - "url": "https://codeberg.org/alanpearce/elgit/archive/6fc0ce917cc6ac9c1faaab61f14d686aa5bc0ab6.tar.gz", - "hash": "09wcv8b5sxm26rh71cphgb4n3jqikb1cbjyr8pdx7916i3lcpnm1" - }, - "golink": { - "type": "GitRelease", - "repository": { - "type": "GitHub", - "owner": "tailscale", - "repo": "golink" - }, - "pre_releases": false, - "version_upper_bound": null, - "release_prefix": null, - "submodules": false, - "version": "v1.0.0", - "revision": "b1db61ed5e5c1ee78403a6f1930f266f8f43eea6", - "url": "https://api.github.com/repos/tailscale/golink/tarball/v1.0.0", - "hash": "0l4b24h0r1ap7jl0pws7qpnyanjp4r1ix2r48ff3vrh5xk8sb2bh" - }, - "home-manager": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "home-manager" - }, - "branch": "master", - "submodules": false, - "revision": "96482a538e6103579d254b139759d0536177370b", - "url": "https://github.com/nix-community/home-manager/archive/96482a538e6103579d254b139759d0536177370b.tar.gz", - "hash": "0sv72gvlds6f3bffd2hxbkk4a1ssy1j2aqdfnpk20zz5zywfkals" - }, - "mycal": { - "type": "Git", - "repository": { - "type": "Git", - "url": "ssh://gitolite@git.alanpearce.eu/mycal" - }, - "branch": "main", - "submodules": false, - "revision": "f44aed1f50ff642c18b8737c1b0617ba2be0a255", - "url": null, - "hash": "0klrkd8ivvrfc5j7gqphigda4sb4rc48i96bhqy9bajmvcmwdila" - }, - "nix-index-database": { - "type": "GitRelease", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nix-index-database" - }, - "pre_releases": true, - "version_upper_bound": null, - "release_prefix": null, - "submodules": false, - "version": "2025-06-01-035302", - "revision": "b02432d99cfa5a2083efaa5f361591e54988b762", - "url": "https://api.github.com/repos/nix-community/nix-index-database/tarball/2025-06-01-035302", - "hash": "0wjcnrffpv273qga2v9ckzrldxaih5y0iqaqyzw55iwy2flp8adp" - }, - "nixos-hardware": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "NixOS", - "repo": "nixos-hardware" - }, - "branch": "master", - "submodules": false, - "revision": "4602f7e1d3f197b3cb540d5accf5669121629628", - "url": "https://github.com/NixOS/nixos-hardware/archive/4602f7e1d3f197b3cb540d5accf5669121629628.tar.gz", - "hash": "1qq9gb0rxw43l2hhdnbf6c24r6051nhnqv7z72zxd79fg108m4av" - }, - "nixpkgs": { - "type": "Channel", - "name": "nixos-unstable", - "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre810143.c2a03962b8e2/nixexprs.tar.xz", - "hash": "02rddzffxhlh7lxyi9c4422m4fdp8d7gksxj4r76njxh0rr000g5" - }, - "nixvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nixvim" - }, - "branch": "main", - "submodules": false, - "revision": "00524c7935f05606fd1b09e8700e9abcc4af7be8", - "url": "https://github.com/nix-community/nixvim/archive/00524c7935f05606fd1b09e8700e9abcc4af7be8.tar.gz", - "hash": "1zib03q5wj4ybd58zpdm1p6w3fgsdlmvgrk4d9lz549wfa6qszr2" - }, - "nur": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "NUR" - }, - "branch": "main", - "submodules": false, - "revision": "2e6e71681b88ec9bc9c9914b413d1e875f8328c9", - "url": "https://github.com/nix-community/NUR/archive/2e6e71681b88ec9bc9c9914b413d1e875f8328c9.tar.gz", - "hash": "0536c56ll62f5prqb8q9rbksxqp98dg902f6b1l6hws9kzbk27vb" - }, - "searchix": { - "type": "Git", - "repository": { - "type": "Forgejo", - "server": "https://codeberg.org/", - "owner": "alanpearce", - "repo": "searchix" - }, - "branch": "main", - "submodules": false, - "revision": "7514e6182832fc7806d2d45d32ea87ad3cdc668c", - "url": "https://codeberg.org/alanpearce/searchix/archive/7514e6182832fc7806d2d45d32ea87ad3cdc668c.tar.gz", - "hash": "1134ymnv98fdl3i5x1zni6lnhr62j9ys495i47m1jyrl7b83yh2x" - }, - "srvos": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "srvos" - }, - "branch": "main", - "submodules": false, - "revision": "0bd69fd1d82f6eab4ca95109cba617dfd06109d0", - "url": "https://github.com/nix-community/srvos/archive/0bd69fd1d82f6eab4ca95109cba617dfd06109d0.tar.gz", - "hash": "1a70yjnfgi025dbz0qxbl2s2nj2ymhi1c9ksmr88jxmbk5z1jqxn" - } - }, - "version": 5 -}
D overlays/angrr.nix
@@ -1,3 +0,0 @@
-self: super: { - angrr = import <angrr>; -}
D overlays/nix-index-database.nix
@@ -1,5 +0,0 @@
-self: super: { - nix-index-db = import <nix-index-database> { - pkgs = super; - }; -}
D shell.nix
@@ -1,22 +0,0 @@
-let - inherit (import ./sources.nix) nixPath sources; - - pkgs = import sources.nixpkgs { }; -in -pkgs.mkShell -{ - - name = "nixfiles-shell"; - - buildInputs = with pkgs; [ - npins - fish - colmena - (pkgs.callPackage "${sources.agenix}/pkgs/agenix.nix" { }) - (import sources.home-manager { inherit pkgs; }).home-manager - ]; - - shellHook = '' - export NIX_PATH="${builtins.concatStringsSep ":" nixPath}"; - ''; -}
D sources.nix
@@ -1,38 +0,0 @@
-let - npins = import ./npins; - pkgs = import npins.nixpkgs { }; - - inherit (pkgs) lib; - - mkPathable = s: toString ( - if lib.path.subpath.isValid s - then (lib.path.append ../. s) - else s - ); - - kvPath = k: v: "${k}=${v}"; - - fromNpins = sources: - lib.attrsets.mapAttrs - (k: v: v.outPath) - sources; - - config = - if pkgs.stdenv.isDarwin - then "darwin-config" - else "nixos-config"; - - sources = { - personal = ./packages; - nixpkgs-overlays = ./overlays; - private = ./private; - ${config} = ./system/configuration.nix; - } // (fromNpins npins); -in -{ - inherit sources; - - nixPath = lib.attrsets.mapAttrsToList - (k: v: kvPath k (mkPathable v)) - sources; -}
M system/linde.nixsystem/linde.nix
@@ -22,14 +22,10 @@ in
{ imports = [ - <personal/modules/nixos/laminar.nix> - <home-manager/nixos> - <agenix/modules/age.nix> # Include the results of the hardware scan. ./linde-hardware.nix ./settings/configuration/nix-linux.nix - ./settings/pin.nix ./settings/services/git-server.nix ./settings/colmena-auto-upgrade.nix ];
M system/marvin.nixsystem/marvin.nix
@@ -1,18 +1,12 @@
{ pkgs , lib , ... -}: -let - srvos = import <srvos>; -in -{ +}: { imports = [ ./settings/darwin.nix ./settings/dev.nix ./settings/programs/shell.nix ./settings/programs/base.nix - <personal/modules/darwin/caddy> - srvos.modules.darwin.desktop ]; local.web = {
M system/prefect.nixsystem/prefect.nix
@@ -25,11 +25,6 @@ ./settings/programs/shell.nix
./settings/programs/docker.nix ./settings/dev.nix ./settings/gaming.nix - <nixos-hardware/common/cpu/amd> - <nixos-hardware/common/cpu/amd/pstate.nix> - <nixos-hardware/common/pc/ssd> - <nixos-hardware/common/pc> - <nixos-hardware/common/gpu/nvidia> ]; virtualisation.vmVariant = {
M system/settings/configuration/nix.nixsystem/settings/configuration/nix.nix
@@ -3,7 +3,6 @@ , pkgs
, lib , ... }: { - imports = [ ../pin.nix ]; nix = { package = pkgs.lix; settings = {
@@ -29,5 +28,16 @@ gc = {
automatic = lib.mkDefault true; options = lib.mkDefault "--delete-older-than 14d"; }; + + registry = + if pkgs.stdenv.isDarwin + then { + nixpkgs.flake = inputs.nixpkgs; + } else { + nixpkgs.to = { + type = "path"; + path = pkgs.path; + }; + }; }; }
D system/settings/pin.nix
@@ -1,14 +0,0 @@
-let - inherit (import ../../sources.nix) sources; -in -{ - nix = { - nixPath = [ - "nixpkgs=flake:nixpkgs" - ]; - registry.nixpkgs.to = { - type = "path"; - path = sources.nixpkgs; - }; - }; -}
M user/server.nixuser/server.nix
@@ -7,7 +7,6 @@ ./settings/base.nix
./settings/git.nix ./settings/fish.nix ./settings/nixos.nix - ./settings/development/base.nix ]; home = { username = "alan";
M user/settings/darwin.nixuser/settings/darwin.nix
@@ -10,7 +10,7 @@ ];
programs.emacs.package = pkgs.personal.emacs-unlimited-select.override { emacs = pkgs.emacs.override { - withNativeCompilation = false; # https://github.com/NixOS/nixpkgs/issues/395170 + withNativeCompilation = false; # https://github.com/NixOS/nixpkgs/issues/395170 }; };
@@ -83,7 +83,8 @@ };
home.shellAliases = { rb = "darwin-rebuild"; - rbs = "darwin-rebuild switch"; + srb = "sudo darwin-rebuild"; + rbs = "sudo darwin-rebuild switch --flake '.?submodules=1'"; dig = "dig +noall +answer";
M user/settings/neovim.nixuser/settings/neovim.nix
@@ -1,14 +1,6 @@
{ config , ... -}: -let - nixvim = import <nixvim>; -in -{ - imports = [ - nixvim.homeManagerModules.nixvim - ]; - +}: { home.sessionVariables = { MANPAGER = "nvim +Man!"; };
M user/settings/nix.nixuser/settings/nix.nix
@@ -20,14 +20,13 @@ programs.nix-init = {
enable = true; settings = { maintainers = [ "alanpearce" ]; - nixpkgs = "<nixpkgs>"; + nixpkgs = "builtins.getFlake \"nixpkgs\""; }; }; home.packages = with pkgs; [ cached-nix-shell nixd - npins angrr nix-prefetch-scripts nix-update
M user/settings/nixos.nixuser/settings/nixos.nix
@@ -5,8 +5,8 @@ ./nixpkgs.nix
]; home.shellAliases = { - rbs = "nixos-rebuild switch"; - rbb = "nixos-rebuild boot"; + rbs = "nixos-rebuild switch --flake '.?submodules=1'"; + rbb = "nixos-rebuild boot --flake '.?submodules=1'"; rbr = "nixos-rebuild switch --rollback"; }; }
M user/settings/shell.nixuser/settings/shell.nix
@@ -113,8 +113,8 @@ grup = "git rup";
ho = "home-manager"; hob = "home-manager build"; - hos = "home-manager switch"; - hon = "home-manager news"; + hos = "home-manager switch --flake '.?submodules=1' -b hm_bak_$(date +%Y%m%d%H%M)"; + hon = "home-manager news --flake '.?submodules=1'"; hoh = "home-manager help"; hop = "home-manager packages"; hol = "home-manager generations";
@@ -128,8 +128,8 @@
lw = "lorri watch"; lwo = "lorri watch --once"; - nsh = "nix-shell"; - nb = "nix-build"; + nsh = "nix shell"; + nb = "nix build"; nd = "nix develop"; nl = "nix log"; # shadows `coreutils.nl`, but I've never used that yet nr = "nix run";
M user/settings/workstation.nixuser/settings/workstation.nix
@@ -15,12 +15,14 @@ nuspell
git-extras # delete-merged-branches and friends git-worktree-switcher gitui - nix-index-db.nix-index-with-db - nix-index-db.comma-with-db ] ++ (with pkgs.hunspellDicts; [ en-gb-large de-de ]); + + programs.nix-index-database = { + comma.enable = true; + }; home.shellAliases = { wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";