yep, more dotfiles

chore: bump to 25.11

wiro.world 27a6ff3e 6f79a1c8

verified
+90 -96
flake.lock
···
],
"nixpkgs": [
"nixpkgs"
-
]
+
],
+
"systems": "systems"
},
"locked": {
-
"lastModified": 1703089996,
-
"narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=",
-
"owner": "ryantm",
+
"lastModified": 1762618334,
+
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
+
"owner": "mrnossiom",
"repo": "agenix",
-
"rev": "564595d0ad4be7277e07fa63b5a991b3c645655d",
+
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
"type": "github"
},
"original": {
-
"owner": "ryantm",
-
"ref": "0.15.0",
+
"owner": "mrnossiom",
"repo": "agenix",
"type": "github"
}
···
"fromYaml": "fromYaml"
},
"locked": {
-
"lastModified": 1746562888,
-
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
+
"lastModified": 1755819240,
+
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
-
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
+
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
···
"base16-helix": {
"flake": false,
"locked": {
-
"lastModified": 1748408240,
-
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
+
"lastModified": 1752979451,
+
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
"owner": "tinted-theming",
"repo": "base16-helix",
-
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
+
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1673295039,
-
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
+
"lastModified": 1744478979,
+
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
-
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
+
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
···
"firefox-gnome-theme": {
"flake": false,
"locked": {
-
"lastModified": 1748383148,
-
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
+
"lastModified": 1758112371,
+
"narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
-
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
+
"rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1749398372,
-
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
+
"lastModified": 1756770412,
+
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
-
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
+
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
···
},
"flake-utils": {
"inputs": {
-
"systems": "systems_2"
+
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
···
"gnome-shell": {
"flake": false,
"locked": {
-
"lastModified": 1744584021,
-
"narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
+
"host": "gitlab.gnome.org",
+
"lastModified": 1762869044,
+
"narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=",
"owner": "GNOME",
"repo": "gnome-shell",
-
"rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
-
"type": "github"
+
"rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad",
+
"type": "gitlab"
},
"original": {
+
"host": "gitlab.gnome.org",
"owner": "GNOME",
-
"ref": "48.1",
+
"ref": "gnome-49",
"repo": "gnome-shell",
-
"type": "github"
+
"type": "gitlab"
}
},
"gomod2nix": {
···
]
},
"locked": {
-
"lastModified": 1758463745,
-
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
+
"lastModified": 1764398914,
+
"narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
+
"rev": "d0c5fdc48db6f19471b8adc954eca09194e68036",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
+
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
···
"locked": {
"lastModified": 1762912391,
"narHash": "sha256-4hpBE7bGd24SfD28rzMdUGXsLsNEYxCCrTipFdoqoNM=",
-
"owner": "LnL7",
+
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "d76299b2cd01837c4c271a7b5186e3d5d8ebd126",
"type": "github"
},
"original": {
-
"owner": "LnL7",
+
"owner": "nix-darwin",
"ref": "nix-darwin-25.05",
"repo": "nix-darwin",
"type": "github"
···
},
"nixos-hardware": {
"locked": {
-
"lastModified": 1762847253,
-
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
+
"lastModified": 1764440730,
+
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "nixos",
"repo": "nixos-hardware",
-
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
+
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1763049705,
-
"narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=",
+
"lastModified": 1764406085,
+
"narHash": "sha256-CYbMp8hwuOf4umokSNp+t1s4Hjd4vxXq4S5CD+xvgNs=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "3acb677ea67d4c6218f33de0db0955f116b7588c",
+
"rev": "9561691c9f450fad7c3526916e1c4f44be0d1192",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixos-25.05",
+
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
···
"nixpkgs": [
"stylix",
"nixpkgs"
-
],
-
"treefmt-nix": "treefmt-nix"
+
]
},
"locked": {
-
"lastModified": 1751320053,
-
"narHash": "sha256-3m6RMw0FbbaUUa01PNaMLoO7D99aBClmY5ed9V3vz+0=",
+
"lastModified": 1758998580,
+
"narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
"owner": "nix-community",
"repo": "NUR",
-
"rev": "cbde1735782f9c2bb2c63d5e05fba171a14a4670",
+
"rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1762737305,
-
"narHash": "sha256-5zN6jJ6KKBGiJeK3Q4+afZfJU7VyyUgehOAA3zYegTc=",
+
"lastModified": 1764205213,
+
"narHash": "sha256-VWKPkM4m5kGgJ0HY1WKfvlPkKka6tYwUR8snetAFTu8=",
"owner": "nix-community",
"repo": "srvos",
-
"rev": "c04379f95fca70b38cdd45a1a7affe6d4226912b",
+
"rev": "8b90cbaadae462563297a2d08870cccfd986ca28",
"type": "github"
},
"original": {
···
"nixpkgs"
],
"nur": "nur",
-
"systems": "systems",
+
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
···
"tinted-zed": "tinted-zed"
},
"locked": {
-
"lastModified": 1762295027,
-
"narHash": "sha256-5z5cGrp9F8g8iyQrM8WkB6pAwP4AaicljKZ15gx+X9Y=",
+
"lastModified": 1764193603,
+
"narHash": "sha256-guX30TWe8HRG2qPFiM9893F2uTw4B8D/xkE6Mq7MiYg=",
"owner": "nix-community",
"repo": "stylix",
-
"rev": "91b9a270523361268ba6a8772152fde31103869f",
+
"rev": "9bf8725a3d65b3ff0ba68ce13779657f5095e36b",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
+
"ref": "release-25.11",
"repo": "stylix",
"type": "github"
}
···
"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"
+
}
+
},
"tangled": {
"inputs": {
"actor-typeahead-src": "actor-typeahead-src",
···
"sqlite-lib-src": "sqlite-lib-src"
},
"locked": {
-
"lastModified": 1763089726,
-
"narHash": "sha256-lRTZLRcqWpVf6CzJmvg+ggp/YWWasT4u2lFKIiIopoM=",
+
"lastModified": 1764005195,
+
"narHash": "sha256-PzuWiW/nMxwQTX0i1bHwGazQF4ptLNI9OGwpmhDb9i0=",
"ref": "refs/heads/master",
-
"rev": "3eb9cefd98d13ab9864abb2e394fc41f89ffd923",
-
"revCount": 1660,
+
"rev": "7358ec6edfa4d17b8b8f543d99e83a4705901148",
+
"revCount": 1687,
"type": "git",
"url": "https://tangled.org/@tangled.org/core"
},
···
"tinted-schemes": {
"flake": false,
"locked": {
-
"lastModified": 1750770351,
-
"narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
+
"lastModified": 1757716333,
+
"narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
"owner": "tinted-theming",
"repo": "schemes",
-
"rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
+
"rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
"type": "github"
},
"original": {
···
"tinted-tmux": {
"flake": false,
"locked": {
-
"lastModified": 1751159871,
-
"narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
+
"lastModified": 1757811970,
+
"narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
-
"rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
+
"rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
"type": "github"
},
"original": {
···
"tinted-zed": {
"flake": false,
"locked": {
-
"lastModified": 1751158968,
-
"narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
+
"lastModified": 1757811247,
+
"narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
"owner": "tinted-theming",
"repo": "base16-zed",
-
"rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
+
"rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
"type": "github"
},
"original": {
···
"type": "github"
},
-
"treefmt-nix": {
-
"inputs": {
-
"nixpkgs": [
-
"stylix",
-
"nur",
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1733222881,
-
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
-
"owner": "numtide",
-
"repo": "treefmt-nix",
-
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
-
"type": "github"
-
},
-
"original": {
-
"owner": "numtide",
-
"repo": "treefmt-nix",
-
"type": "github"
-
}
-
},
"unixpkgs": {
"locked": {
-
"lastModified": 1762977756,
-
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
+
"lastModified": 1764242076,
+
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55",
+
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"type": "github"
},
"original": {
···
},
"locked": {
-
"lastModified": 1763097615,
-
"narHash": "sha256-qxpsf2FVzXrN0WDWRgeBz7RJ5vjHNFDy8oLqbC6gU3Y=",
+
"lastModified": 1764414951,
+
"narHash": "sha256-pZ2m2JmTTMyqiKB8WSigsSvAeoShI6OSRhzBuRO9SVY=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
-
"rev": "479ca480bf531285e88006aa1c70fd3bb5529f3d",
+
"rev": "10d2aa53ada9b14f6df2f9877d6a057f0a2b262f",
"type": "github"
},
"original": {
+11 -9
flake.nix
···
description = "NixOS and Home Manager configuration for Milo's laptops";
inputs = {
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
unixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
-
home-manager.url = "github:nix-community/home-manager/release-25.05";
+
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
-
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-25.05";
+
# nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
+
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
-
stylix.url = "github:nix-community/stylix/release-25.05";
+
stylix.url = "github:nix-community/stylix/release-25.11";
stylix.inputs.nixpkgs.follows = "nixpkgs";
## Miscellaneous
-
agenix.url = "github:ryantm/agenix/0.15.0";
+
# agenix.url = "github:ryantm/agenix/0.15.0";
+
agenix.url = "github:mrnossiom/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager";
···
flake-lib = import ./lib/flake (nixpkgs // { inherit self; });
-
forAllPkgs = func: forAllSystems (system: func pkgs.${system});
-
# This should be the only constructed nixpkgs instances in this flake
-
pkgs = forAllSystems (system: (import nixpkgs {
+
allPkgs = forAllSystems (system: (import nixpkgs {
inherit system;
config.allowUnfreePredicate = import ./lib/unfree.nix { lib = nixpkgs.lib; };
overlays = [ outputs.overlays.all ];
}));
+
+
forAllPkgs = func: forAllSystems (system: func allPkgs.${system});
in
{
formatter = forAllPkgs (pkgs: pkgs.nixpkgs-fmt);
···
lib = forAllPkgs (import ./lib);
templates = import ./templates;
-
apps = forAllPkgs (import ./apps { pkgs-per-system = pkgs; });
+
apps = forAllPkgs (import ./apps { pkgs-per-system = allPkgs; });
devShells = forAllPkgs (import ./shells.nix);
overlays = import ./overlays (nixpkgs // { inherit self; });
packages = forAllPkgs (import ./pkgs);
+4
home-manager/fragments/firefox.nix
···
enable = false;
profileNames = [ "default" ];
};
+
stylix.targets.zen-browser = {
+
enable = false;
+
profileNames = [ "default" ];
+
};
programs.zen-browser = {
enable = true;
+51 -48
home-manager/fragments/git.nix
···
enable = true;
lfs.enable = true;
-
userName = "Milo Moisson";
-
# TODO: this email should be behind a secret or at least a config
-
userEmail = "milo@wiro.world";
-
signing.signByDefault = true;
signing.key = "~/.ssh/id_ed25519.pub";
···
"result"
];
-
aliases = {
-
b = "branch --all";
-
brm = "branch --delete";
+
settings = {
+
user = {
+
name = "Milo Moisson";
+
# TODO: this email should be behind a secret or at least a config
+
email = "milo@wiro.world";
+
};
-
ll = "log --graph --oneline --pretty=custom";
-
lla = "log --graph --oneline --pretty=custom --all";
-
last = "log -1 HEAD --stat";
+
alias = {
+
b = "branch --all";
+
brm = "branch --delete";
-
st = "status --short --branch";
+
ll = "log --graph --oneline --pretty=custom";
+
lla = "log --graph --oneline --pretty=custom --all";
+
last = "log -1 HEAD --stat";
-
cm = "commit --message";
-
oups = "commit --amend";
+
st = "status --short --branch";
+
+
cm = "commit --message";
+
oups = "commit --amend";
-
ui = "!lazygit";
+
ui = "!lazygit";
-
rv = "remote --verbose";
+
rv = "remote --verbose";
-
ri = "rebase --interactive";
-
ris = "!git ri $(git slc)";
-
rc = "rebase --continue";
-
rs = "rebase --skip";
-
ra = "rebase --abort";
+
ri = "rebase --interactive";
+
ris = "!git ri $(git slc)";
+
rc = "rebase --continue";
+
rs = "rebase --skip";
+
ra = "rebase --abort";
-
# Select commit
-
slc = "!git log --oneline --pretty=custom | fzf | awk '{printf $1}'";
+
# Select commit
+
slc = "!git log --oneline --pretty=custom | fzf | awk '{printf $1}'";
-
a = "add";
-
al = "add --all";
-
ac = "add .";
-
ap = "add --patch";
+
a = "add";
+
al = "add --all";
+
ac = "add .";
+
ap = "add --patch";
-
pu = "push";
-
put = "push --follow-tags";
-
puf = "push --force-with-lease";
-
pl = "pull";
+
pu = "push";
+
put = "push --follow-tags";
+
puf = "push --force-with-lease";
+
pl = "pull";
-
f = "fetch";
+
f = "fetch";
-
s = "switch";
-
sc = "switch --create";
+
s = "switch";
+
sc = "switch --create";
-
ck = "checkout";
+
ck = "checkout";
-
cp = "cherry-pick";
+
cp = "cherry-pick";
-
df = "diff";
-
dfs = "diff --staged";
-
dfc = "diff --cached";
+
df = "diff";
+
dfs = "diff --staged";
+
dfc = "diff --cached";
-
m = "merge";
+
m = "merge";
-
rms = "restore --staged";
-
res = "restore";
+
rms = "restore --staged";
+
res = "restore";
-
sh = "stash";
-
shl = "stash list";
-
sha = "stash apply";
-
shp = "stash pop";
-
};
+
sh = "stash";
+
shl = "stash list";
+
sha = "stash apply";
+
shp = "stash pop";
+
};
-
extraConfig = {
fetch.prune = true;
color.ui = true;
init.defaultBranch = "main";
···
showCommandLog = false;
border = "single";
};
+
git = {
-
paging.externalDiffCommand = "difft --color=always";
+
pagers.externalDiffCommand = "difft --color=always";
};
# to be declarative or not to be declarative?
-1
home-manager/fragments/helix.nix
···
};
extraPackages = with pkgs; [
-
ansible-language-server
clang-tools
gopls
kotlin-language-server
+1 -2
home-manager/fragments/jujutsu.nix
···
signing = {
behavior = "own";
backend = "ssh";
-
key = keys.milomoisson;
-
+
key = keys.milo-ed25519;
git.sign-on-push = true;
};
+3
home-manager/fragments/stylix.nix
···
enable = true;
base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/onedark-dark.yaml";
+
# issues a warning because we use `useGlobalPkgs`
+
overlays.enable = false;
+
image = ../../assets/wallpaper-binary-cloud.png;
fonts = {
+1 -8
home-manager/fragments/sway.nix
···
-
{ self
-
, config
+
{ config
, lib
, pkgs
···
}:
let
-
inherit (self.outputs) homeManagerModules;
-
cfg = config.local.fragment.sway;
cfg-sway = config.wayland.windowManager.sway.config;
workspacesRange = lib.zipListsWith (key-idx: workspace-idx: { inherit key-idx workspace-idx; }) [ 1 2 3 4 5 6 7 8 9 0 ] (lib.range 1 10);
in
{
-
imports = [
-
homeManagerModules.wl-clip-persist
-
];
-
options.local.fragment.sway.enable = lib.mkEnableOption ''
Sway related
'';
+2 -2
home-manager/fragments/tools.nix
···
csvlens
delta
dogdns
-
du-dust
+
dust
encfs
fastfetch
fd
···
otree
ouch
parallel
+
perf
pv
restic
ripgrep
···
uni
unzip
vlock
-
wcurl
wormhole-rs
]) ++ lib.optionals (!flags.onlyCached) [ ];
+3 -1
home-manager/profiles/desktop.nix
···
programs.go = {
enable = true;
-
goPath = ".local/share/go";
+
env.GOPATH = ".local/share/go";
};
programs.gpg = {
···
enableFishIntegration = false;
enableZshIntegration = false;
};
+
+
programs.ssh.enableDefaultConfig = false;
};
}
+4 -1
lib/flake/default.nix
···
# local packages set
lpkgs = import ../../pkgs pkgs;
# unstable nixpkgs set
-
upkgs = import unixpkgs { inherit (pkgs) system config; };
+
upkgs = import unixpkgs {
+
config = pkgs.config;
+
system = pkgs.stdenv.hostPlatform.system;
+
};
# indicates if system is darwin
isDarwin = pkgs.stdenv.isDarwin;
};
+1
lib/flake/user.nix
···
} else {
home = "/home/${name}";
extraGroups = [
+
# TODO: remove or put under an condition
"wheel" # sudo access
"networkmanager" # needed for nm
];
+2 -3
modules/home-manager/default.nix
···
{
-
wakatime = import ./wakatime.nix;
-
wl-clip-persist = import ./wl-clip-persist.nix;
-
xcompose = import ./xcompose.nix;
+
wakatime = ./wakatime.nix;
+
xcompose = ./xcompose.nix;
}
-99
modules/home-manager/wl-clip-persist.nix
···
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
-
let
-
cfg = config.services.wl-clip-persist;
-
in
-
{
-
options.services.wl-clip-persist = with lib; {
-
enable = mkEnableOption "";
-
-
package = mkPackageOption pkgs "wl-clip-persist" { };
-
-
clipboard = mkOption {
-
description = "The clipboard type to operate on";
-
default = "regular";
-
type = types.enum [ "regular" "primary" "both" ];
-
};
-
-
display = mkOption {
-
description = "The wayland display to operate on";
-
default = null;
-
type = types.nullOr types.str;
-
};
-
-
ignoreEventOnError = mkOption {
-
description = "Only handle selection events where no error occurred";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
allMimeTypeRegex = mkOption {
-
description = "Only handle selection events where all offered MIME types have a match for the regex";
-
default = null;
-
type = types.nullOr types.str;
-
};
-
-
interruptOldClipboardRequests = mkOption {
-
description = "Interrupt trying to send the old clipboard to other programs when the clipboard has been updated";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
selectionSizeLimit = mkOption {
-
description = "Only handle selection events whose total data size does not exceed the size limit";
-
default = null;
-
type = types.nullOr types.int;
-
};
-
-
readTimeout = mkOption {
-
description = "Timeout for trying to get the current clipboard";
-
default = 500;
-
type = types.int;
-
};
-
-
ignoreEventOnTimeout = mkOption {
-
description = "Only handle selection events where no timeout occurred";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
writeTimeout = mkOption {
-
description = "Timeout for trying to send the current clipboard to other programs";
-
default = 3000;
-
type = types.int;
-
};
-
};
-
-
config = lib.mkIf cfg.enable {
-
systemd.user.services.wl-clip-persist = {
-
Unit = {
-
Description = "wl-clip-persist system service";
-
PartOf = [ "graphical-session.target" ];
-
BindsTo = [ "graphical-session.target" ];
-
};
-
-
Service = {
-
Type = "simple";
-
ExecStart = "${lib.getExe cfg.package} ${lib.cli.toGNUCommandLineShell {} {
-
clipboard = cfg.clipboard;
-
display = cfg.display;
-
ignore-event-on-error = cfg.ignoreEventOnError;
-
all-mime-type-regex = cfg.allMimeTypeRegex;
-
interrupt-old-clipboard-requests = cfg.interruptOldClipboardRequests;
-
selection-size-limit = cfg.selectionSizeLimit;
-
read-timeout = cfg.readTimeout;
-
ignore-event-on-timeout = cfg.ignoreEventOnTimeout;
-
write-timeout = cfg.writeTimeout;
-
}}";
-
Restart = "on-failure";
-
TimeoutStopSec = 15;
-
};
-
-
Install.WantedBy = lib.mkDefault [ "graphical-session.target" ];
-
};
-
};
-
}
-2
modules/nixos/default.nix
···
{
-
geoclue2 = ./geoclue2.nix;
-
headscale = ./headscale.nix;
logiops = ./logiops.nix;
}
-324
modules/nixos/geoclue2.nix
···
-
# Adapted from the original nixpkgs repo
-
#
-
# It supports static location fallback. This is a workaround waiting for an
-
# alternative to MLS (Mozilla Location Services).
-
-
# Target interface to manage the static file would be:
-
# static = {
-
# latitude = 48.8;
-
# longitude = 2.3;
-
# };
-
#
-
# I spent way too much time getting this to work with a submodule.
-
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
-
let
-
package = pkgs.geoclue2.override { withDemoAgent = config.services.geoclue2.enableDemoAgent; };
-
-
cfg = config.services.geoclue2;
-
-
defaultWhitelist = [ "gnome-shell" "io.elementary.desktop.agent-geoclue2" ];
-
-
appConfigModule = lib.types.submodule ({ name, ... }: with lib; {
-
options = {
-
desktopID = mkOption {
-
type = types.str;
-
description = "Desktop ID of the application.";
-
};
-
-
isAllowed = mkOption {
-
type = types.bool;
-
description = ''
-
Whether the application will be allowed access to location information.
-
'';
-
};
-
-
isSystem = mkOption {
-
type = types.bool;
-
description = ''
-
Whether the application is a system component or not.
-
'';
-
};
-
-
users = mkOption {
-
type = types.listOf types.str;
-
default = [ ];
-
description = ''
-
List of UIDs of all users for which this application is allowed location
-
info access, Defaults to an empty string to allow it for all users.
-
'';
-
};
-
};
-
-
config.desktopID = mkDefault name;
-
});
-
-
# staticModule = types.submodule ({ name, ... }: {
-
# options = {
-
# latitude = mkOption {
-
# type = types.float;
-
# example = 40.6893129;
-
# };
-
-
# longitude = mkOption {
-
# type = types.float;
-
# example = -74.0445531;
-
# };
-
-
# altitude = mkOption {
-
# type = types.float;
-
# default = 0;
-
# example = 96;
-
# };
-
-
# accuracyRadius = mkOption {
-
# type = types.float;
-
# default = 0;
-
# example = 1.83;
-
# };
-
# };
-
# });
-
-
appConfigToINICompatible = _: { desktopID, isAllowed, isSystem, users, ... }: {
-
name = desktopID;
-
value = {
-
allowed = isAllowed;
-
system = isSystem;
-
users = lib.concatStringsSep ";" users;
-
};
-
};
-
-
in
-
{
-
disabledModules = [ "services/desktops/geoclue2.nix" ];
-
-
options.services.geoclue2 = with lib; {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = ''
-
Whether to enable GeoClue 2 daemon, a DBus service
-
that provides location information for accessing.
-
'';
-
};
-
-
enableDemoAgent = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to use the GeoClue demo agent. This should be
-
overridden by desktop environments that provide their own
-
agent.
-
'';
-
};
-
-
enableNmea = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to fetch location from NMEA sources on local network.
-
'';
-
};
-
-
enable3G = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable 3G source.
-
'';
-
};
-
-
enableCDMA = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable CDMA source.
-
'';
-
};
-
-
enableModemGPS = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable Modem-GPS source.
-
'';
-
};
-
-
enableWifi = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable WiFi source.
-
'';
-
};
-
-
geoProviderUrl = mkOption {
-
type = types.str;
-
default = "https://location.services.mozilla.com/v1/geolocate?key=geoclue";
-
example = "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY";
-
description = ''
-
The url to the wifi GeoLocation Service.
-
'';
-
};
-
-
submitData = mkOption {
-
type = types.bool;
-
default = false;
-
description = ''
-
Whether to submit data to a GeoLocation Service.
-
'';
-
};
-
-
submissionUrl = mkOption {
-
type = types.str;
-
default = "https://location.services.mozilla.com/v1/submit?key=geoclue";
-
description = ''
-
The url to submit data to a GeoLocation Service.
-
'';
-
};
-
-
submissionNick = mkOption {
-
type = types.str;
-
default = "geoclue";
-
description = ''
-
A nickname to submit network data with.
-
Must be 2-32 characters long.
-
'';
-
};
-
-
appConfig = mkOption {
-
type = types.attrsOf appConfigModule;
-
default = { };
-
example = {
-
"com.github.app" = {
-
isAllowed = true;
-
isSystem = true;
-
users = [ "300" ];
-
};
-
};
-
description = ''
-
Specify extra settings per application.
-
'';
-
};
-
-
# static = mkOption {
-
# type = types.nullOr (types.attrsOf staticModule);
-
# default = null;
-
# description = ''
-
# Add a fallback location that will be overridden by other location services
-
# '';
-
# };
-
-
staticFile = mkOption {
-
type = types.nullOr (types.str);
-
default = null;
-
description = ''
-
Add a fallback location that will be overridden by other location services
-
'';
-
};
-
};
-
-
config = lib.mkIf cfg.enable {
-
environment.systemPackages = [ package ];
-
-
services.dbus.packages = [ package ];
-
-
systemd.packages = [ package ];
-
-
# we cannot use DynamicUser as we need the the geoclue user to exist for the
-
# dbus policy to work
-
users = {
-
users.geoclue = {
-
isSystemUser = true;
-
home = "/var/lib/geoclue";
-
group = "geoclue";
-
description = "Geoinformation service";
-
};
-
-
groups.geoclue = { };
-
};
-
-
systemd.services.geoclue = {
-
wants = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
after = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
# restart geoclue service when the configuration changes
-
restartTriggers = [
-
config.environment.etc."geoclue/geoclue.conf".source
-
];
-
serviceConfig.StateDirectory = "geoclue";
-
};
-
-
# this needs to run as a user service, since it's associated with the
-
# user who is making the requests
-
systemd.user.services = lib.mkIf cfg.enableDemoAgent {
-
geoclue-agent = {
-
description = "Geoclue agent";
-
# this should really be `partOf = [ "geoclue.service" ]`, but
-
# we can't be part of a system service, and the agent should
-
# be okay with the main service coming and going
-
wantedBy = [ "default.target" ];
-
wants = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
after = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
unitConfig.ConditionUser = "!@system";
-
serviceConfig = {
-
Type = "exec";
-
ExecStart = "${package}/libexec/geoclue-2.0/demos/agent";
-
Restart = "on-failure";
-
PrivateTmp = true;
-
};
-
};
-
};
-
-
services.geoclue2.appConfig = {
-
epiphany = { isAllowed = true; isSystem = false; };
-
firefox = { isAllowed = true; isSystem = false; };
-
};
-
-
environment.etc."geoclue/geoclue.conf".text =
-
lib.generators.toINI { } ({
-
agent = {
-
whitelist = lib.concatStringsSep ";"
-
(lib.optional cfg.enableDemoAgent "geoclue-demo-agent" ++ defaultWhitelist);
-
};
-
network-nmea = {
-
enable = cfg.enableNmea;
-
};
-
"3g" = {
-
enable = cfg.enable3G;
-
};
-
cdma = {
-
enable = cfg.enableCDMA;
-
};
-
modem-gps = {
-
enable = cfg.enableModemGPS;
-
};
-
wifi = {
-
enable = cfg.enableWifi;
-
url = cfg.geoProviderUrl;
-
submit-data = lib.boolToString cfg.submitData;
-
submission-url = cfg.submissionUrl;
-
submission-nick = cfg.submissionNick;
-
};
-
} // lib.mapAttrs' appConfigToINICompatible cfg.appConfig);
-
-
# environment.etc."geolocation" = mkIf (cfg.static != null) {
-
# text = ''
-
# ${toString cfg.static.latitude}
-
# ${toString cfg.static.longitude}
-
# ${toString cfg.static.altitude}
-
# ${toString cfg.static.accuracyRadius}
-
# '';
-
# };
-
-
environment.etc."geolocation" = lib.mkIf (cfg.staticFile != null) { text = cfg.staticFile; };
-
};
-
-
meta = with lib; {
-
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
-
};
-
}
-673
modules/nixos/headscale.nix
···
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
let
-
cfg = config.services.headscale;
-
-
dataDir = "/var/lib/headscale";
-
runDir = "/run/headscale";
-
-
cliConfig = {
-
# Turn off update checks since the origin of our package
-
# is nixpkgs and not Github.
-
disable_check_updates = true;
-
-
unix_socket = "${runDir}/headscale.sock";
-
};
-
-
settingsFormat = pkgs.formats.yaml { };
-
configFile = settingsFormat.generate "headscale.yaml" cfg.settings;
-
cliConfigFile = settingsFormat.generate "headscale.yaml" cliConfig;
-
-
assertRemovedOption = option: message: {
-
assertion = !lib.hasAttrByPath option cfg;
-
message =
-
"The option `services.headscale.${lib.options.showOption option}` was removed. " + message;
-
};
-
in
-
{
-
options = {
-
services.headscale = {
-
enable = lib.mkEnableOption "headscale, Open Source coordination server for Tailscale";
-
-
package = lib.mkPackageOption pkgs "headscale" { };
-
-
user = lib.mkOption {
-
default = "headscale";
-
type = lib.types.str;
-
description = ''
-
User account under which headscale runs.
-
-
::: {.note}
-
If left as the default value this user will automatically be created
-
on system activation, otherwise you are responsible for
-
ensuring the user exists before the headscale service starts.
-
:::
-
'';
-
};
-
-
group = lib.mkOption {
-
default = "headscale";
-
type = lib.types.str;
-
description = ''
-
Group under which headscale runs.
-
-
::: {.note}
-
If left as the default value this group will automatically be created
-
on system activation, otherwise you are responsible for
-
ensuring the user exists before the headscale service starts.
-
:::
-
'';
-
};
-
-
address = lib.mkOption {
-
type = lib.types.str;
-
default = "127.0.0.1";
-
description = ''
-
Listening address of headscale.
-
'';
-
example = "0.0.0.0";
-
};
-
-
port = lib.mkOption {
-
type = lib.types.port;
-
default = 8080;
-
description = ''
-
Listening port of headscale.
-
'';
-
example = 443;
-
};
-
-
settings = lib.mkOption {
-
description = ''
-
Overrides to {file}`config.yaml` as a Nix attribute set.
-
Check the [example config](https://github.com/juanfont/headscale/blob/main/config-example.yaml)
-
for possible options.
-
'';
-
type = lib.types.submodule {
-
freeformType = settingsFormat.type;
-
-
options = {
-
server_url = lib.mkOption {
-
type = lib.types.str;
-
default = "http://127.0.0.1:8080";
-
description = ''
-
The url clients will connect to.
-
'';
-
example = "https://myheadscale.example.com:443";
-
};
-
-
noise.private_key_path = lib.mkOption {
-
type = lib.types.path;
-
default = "${dataDir}/noise_private.key";
-
description = ''
-
Path to noise private key file, generated automatically if it does not exist.
-
'';
-
};
-
-
prefixes =
-
let
-
prefDesc = ''
-
Each prefix consists of either an IPv4 or IPv6 address,
-
and the associated prefix length, delimited by a slash.
-
It must be within IP ranges supported by the Tailscale
-
client - i.e., subnets of 100.64.0.0/10 and fd7a:115c:a1e0::/48.
-
'';
-
in
-
{
-
v4 = lib.mkOption {
-
type = lib.types.str;
-
default = "100.64.0.0/10";
-
description = prefDesc;
-
};
-
-
v6 = lib.mkOption {
-
type = lib.types.str;
-
default = "fd7a:115c:a1e0::/48";
-
description = prefDesc;
-
};
-
-
allocation = lib.mkOption {
-
type = lib.types.enum [
-
"sequential"
-
"random"
-
];
-
example = "random";
-
default = "sequential";
-
description = ''
-
Strategy used for allocation of IPs to nodes, available options:
-
- sequential (default): assigns the next free IP from the previous given IP.
-
- random: assigns the next free IP from a pseudo-random IP generator (crypto/rand).
-
'';
-
};
-
};
-
-
derp = {
-
urls = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ "https://controlplane.tailscale.com/derpmap/default" ];
-
description = ''
-
List of urls containing DERP maps.
-
See [How Tailscale works](https://tailscale.com/blog/how-tailscale-works/) for more information on DERP maps.
-
'';
-
};
-
-
paths = lib.mkOption {
-
type = lib.types.listOf lib.types.path;
-
default = [ ];
-
description = ''
-
List of file paths containing DERP maps.
-
See [How Tailscale works](https://tailscale.com/blog/how-tailscale-works/) for more information on DERP maps.
-
'';
-
};
-
-
auto_update_enable = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Whether to automatically update DERP maps on a set frequency.
-
'';
-
example = false;
-
};
-
-
update_frequency = lib.mkOption {
-
type = lib.types.str;
-
default = "24h";
-
description = ''
-
Frequency to update DERP maps.
-
'';
-
example = "5m";
-
};
-
-
server.private_key_path = lib.mkOption {
-
type = lib.types.path;
-
default = "${dataDir}/derp_server_private.key";
-
description = ''
-
Path to derp private key file, generated automatically if it does not exist.
-
'';
-
};
-
};
-
-
ephemeral_node_inactivity_timeout = lib.mkOption {
-
type = lib.types.str;
-
default = "30m";
-
description = ''
-
Time before an inactive ephemeral node is deleted.
-
'';
-
example = "5m";
-
};
-
-
database = {
-
type = lib.mkOption {
-
type = lib.types.enum [
-
"sqlite"
-
"sqlite3"
-
"postgres"
-
];
-
example = "postgres";
-
default = "sqlite";
-
description = ''
-
Database engine to use.
-
Please note that using Postgres is highly discouraged as it is only supported for legacy reasons.
-
All new development, testing and optimisations are done with SQLite in mind.
-
'';
-
};
-
-
sqlite = {
-
path = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = "${dataDir}/db.sqlite";
-
description = "Path to the sqlite3 database file.";
-
};
-
-
write_ahead_log = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Enable WAL mode for SQLite. This is recommended for production environments.
-
<https://www.sqlite.org/wal.html>
-
'';
-
example = true;
-
};
-
};
-
-
postgres = {
-
host = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "127.0.0.1";
-
description = "Database host address.";
-
};
-
-
port = lib.mkOption {
-
type = lib.types.nullOr lib.types.port;
-
default = null;
-
example = 3306;
-
description = "Database host port.";
-
};
-
-
name = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "headscale";
-
description = "Database name.";
-
};
-
-
user = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "headscale";
-
description = "Database user.";
-
};
-
-
password_file = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
example = "/run/keys/headscale-dbpassword";
-
description = ''
-
A file containing the password corresponding to
-
{option}`database.user`.
-
'';
-
};
-
};
-
};
-
-
log = {
-
level = lib.mkOption {
-
type = lib.types.str;
-
default = "info";
-
description = ''
-
headscale log level.
-
'';
-
example = "debug";
-
};
-
-
format = lib.mkOption {
-
type = lib.types.str;
-
default = "text";
-
description = ''
-
headscale log format.
-
'';
-
example = "json";
-
};
-
};
-
-
dns = {
-
magic_dns = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Whether to use [MagicDNS](https://tailscale.com/kb/1081/magicdns/).
-
'';
-
example = false;
-
};
-
-
base_domain = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
Defines the base domain to create the hostnames for MagicDNS.
-
This domain must be different from the {option}`server_url`
-
domain.
-
{option}`base_domain` must be a FQDN, without the trailing dot.
-
The FQDN of the hosts will be `hostname.base_domain` (e.g.
-
`myhost.tailnet.example.com`).
-
'';
-
example = "tailnet.example.com";
-
};
-
-
nameservers = {
-
global = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
List of nameservers to pass to Tailscale clients.
-
'';
-
};
-
};
-
-
search_domains = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Search domains to inject to Tailscale clients.
-
'';
-
example = [ "mydomain.internal" ];
-
};
-
};
-
-
oidc = {
-
issuer = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
URL to OpenID issuer.
-
'';
-
example = "https://openid.example.com";
-
};
-
-
client_id = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
OpenID Connect client ID.
-
'';
-
};
-
-
client_secret_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
description = ''
-
Path to OpenID Connect client secret file. Expands environment variables in format ''${VAR}.
-
'';
-
};
-
-
scope = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [
-
"openid"
-
"profile"
-
"email"
-
];
-
description = ''
-
Scopes used in the OIDC flow.
-
'';
-
};
-
-
extra_params = lib.mkOption {
-
type = lib.types.attrsOf lib.types.str;
-
default = { };
-
description = ''
-
Custom query parameters to send with the Authorize Endpoint request.
-
'';
-
example = {
-
domain_hint = "example.com";
-
};
-
};
-
-
allowed_domains = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Allowed principal domains. if an authenticated user's domain
-
is not in this list authentication request will be rejected.
-
'';
-
example = [ "example.com" ];
-
};
-
-
allowed_users = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Users allowed to authenticate even if not in allowedDomains.
-
'';
-
example = [ "alice@example.com" ];
-
};
-
};
-
-
tls_letsencrypt_hostname = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = "";
-
description = ''
-
Domain name to request a TLS certificate for.
-
'';
-
};
-
-
tls_letsencrypt_challenge_type = lib.mkOption {
-
type = lib.types.enum [
-
"TLS-ALPN-01"
-
"HTTP-01"
-
];
-
default = "HTTP-01";
-
description = ''
-
Type of ACME challenge to use, currently supported types:
-
`HTTP-01` or `TLS-ALPN-01`.
-
'';
-
};
-
-
tls_letsencrypt_listen = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = ":http";
-
description = ''
-
When HTTP-01 challenge is chosen, letsencrypt must set up a
-
verification endpoint, and it will be listening on:
-
`:http = port 80`.
-
'';
-
};
-
-
tls_cert_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
Path to already created certificate.
-
'';
-
};
-
-
tls_key_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
Path to key for already created certificate.
-
'';
-
};
-
-
policy = {
-
mode = lib.mkOption {
-
type = lib.types.enum [
-
"file"
-
"database"
-
];
-
default = "file";
-
description = ''
-
The mode can be "file" or "database" that defines
-
where the ACL policies are stored and read from.
-
'';
-
};
-
-
path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
If the mode is set to "file", the path to a
-
HuJSON file containing ACL policies.
-
'';
-
};
-
};
-
};
-
};
-
};
-
};
-
};
-
-
imports = with lib; [
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "autoUpdate" ]
-
[ "services" "headscale" "settings" "derp" "auto_update_enable" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "paths" ]
-
[ "services" "headscale" "settings" "derp" "paths" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "updateFrequency" ]
-
[ "services" "headscale" "settings" "derp" "update_frequency" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "urls" ]
-
[ "services" "headscale" "settings" "derp" "urls" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "ephemeralNodeInactivityTimeout" ]
-
[ "services" "headscale" "settings" "ephemeral_node_inactivity_timeout" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "logLevel" ]
-
[ "services" "headscale" "settings" "log" "level" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "clientId" ]
-
[ "services" "headscale" "settings" "oidc" "client_id" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "clientSecretFile" ]
-
[ "services" "headscale" "settings" "oidc" "client_secret_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "issuer" ]
-
[ "services" "headscale" "settings" "oidc" "issuer" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "serverUrl" ]
-
[ "services" "headscale" "settings" "server_url" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "certFile" ]
-
[ "services" "headscale" "settings" "tls_cert_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "keyFile" ]
-
[ "services" "headscale" "settings" "tls_key_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "challengeType" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_challenge_type" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "hostname" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_hostname" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "httpListen" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_listen" ]
-
)
-
-
(mkRemovedOptionModule [ "services" "headscale" "openIdConnect" "domainMap" ] ''
-
Headscale no longer uses domain_map. If you're using an old version of headscale you can still set this option via services.headscale.settings.oidc.domain_map.
-
'')
-
];
-
-
config = lib.mkIf cfg.enable {
-
assertions = [
-
{
-
assertion = with cfg.settings; dns.magic_dns -> dns.base_domain != "";
-
message = "dns.base_domain must be set when using MagicDNS";
-
}
-
(assertRemovedOption [ "settings" "acl_policy_path" ] "Use `policy.path` instead.")
-
(assertRemovedOption [ "settings" "db_host" ] "Use `database.postgres.host` instead.")
-
(assertRemovedOption [ "settings" "db_name" ] "Use `database.postgres.name` instead.")
-
(assertRemovedOption [
-
"settings"
-
"db_password_file"
-
] "Use `database.postgres.password_file` instead.")
-
(assertRemovedOption [ "settings" "db_path" ] "Use `database.sqlite.path` instead.")
-
(assertRemovedOption [ "settings" "db_port" ] "Use `database.postgres.port` instead.")
-
(assertRemovedOption [ "settings" "db_type" ] "Use `database.type` instead.")
-
(assertRemovedOption [ "settings" "db_user" ] "Use `database.postgres.user` instead.")
-
(assertRemovedOption [ "settings" "dns_config" ] "Use `dns` instead.")
-
(assertRemovedOption [ "settings" "dns_config" "domains" ] "Use `dns.search_domains` instead.")
-
(assertRemovedOption [
-
"settings"
-
"dns_config"
-
"nameservers"
-
] "Use `dns.nameservers.global` instead.")
-
];
-
-
services.headscale.settings = lib.mkMerge [
-
cliConfig
-
{
-
listen_addr = lib.mkDefault "${cfg.address}:${toString cfg.port}";
-
-
tls_letsencrypt_cache_dir = "${dataDir}/.cache";
-
}
-
];
-
-
environment = {
-
# Headscale CLI needs a minimal config to be able to locate the unix socket
-
# to talk to the server instance.
-
etc."headscale/config.yaml".source = cliConfigFile;
-
-
systemPackages = [ cfg.package ];
-
};
-
-
users.groups.headscale = lib.mkIf (cfg.group == "headscale") { };
-
-
users.users.headscale = lib.mkIf (cfg.user == "headscale") {
-
description = "headscale user";
-
home = dataDir;
-
group = cfg.group;
-
isSystemUser = true;
-
};
-
-
systemd.services.headscale = {
-
description = "headscale coordination server for Tailscale";
-
wants = [ "network-online.target" ];
-
after = [ "network-online.target" ];
-
wantedBy = [ "multi-user.target" ];
-
-
script = ''
-
${lib.optionalString (cfg.settings.database.postgres.password_file != null) ''
-
export HEADSCALE_DATABASE_POSTGRES_PASS="$(head -n1 ${lib.escapeShellArg cfg.settings.database.postgres.password_file})"
-
''}
-
-
exec ${lib.getExe cfg.package} serve --config ${configFile}
-
'';
-
-
serviceConfig =
-
let
-
capabilityBoundingSet = [ "CAP_CHOWN" ] ++ lib.optional (cfg.port < 1024) "CAP_NET_BIND_SERVICE";
-
in
-
{
-
Restart = "always";
-
Type = "simple";
-
User = cfg.user;
-
Group = cfg.group;
-
-
# Hardening options
-
RuntimeDirectory = "headscale";
-
# Allow headscale group access so users can be added and use the CLI.
-
RuntimeDirectoryMode = "0750";
-
-
StateDirectory = "headscale";
-
StateDirectoryMode = "0750";
-
-
ProtectSystem = "strict";
-
ProtectHome = true;
-
PrivateTmp = true;
-
PrivateDevices = true;
-
ProtectKernelTunables = true;
-
ProtectControlGroups = true;
-
RestrictSUIDSGID = true;
-
PrivateMounts = true;
-
ProtectKernelModules = true;
-
ProtectKernelLogs = true;
-
ProtectHostname = true;
-
ProtectClock = true;
-
ProtectProc = "invisible";
-
ProcSubset = "pid";
-
RestrictNamespaces = true;
-
RemoveIPC = true;
-
UMask = "0077";
-
-
CapabilityBoundingSet = capabilityBoundingSet;
-
AmbientCapabilities = capabilityBoundingSet;
-
NoNewPrivileges = true;
-
LockPersonality = true;
-
RestrictRealtime = true;
-
SystemCallFilter = [
-
"@system-service"
-
"~@privileged"
-
"@chown"
-
];
-
SystemCallArchitectures = "native";
-
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX";
-
};
-
};
-
};
-
-
meta.maintainers = with lib.maintainers; [
-
kradalby
-
misterio77
-
];
-
}
+5 -7
modules/nixos/logiops.nix
···
rendered-config = libconfig-format.generate "logid.cfg" cfg.settings;
in
{
-
options.services.logiops = with lib; {
-
enable = mkEnableOption (mdDoc "Logiops HID++ configuration");
+
options.services.logiops = {
+
enable = lib.mkEnableOption "Logiops HID++ configuration";
-
package = mkPackageOption pkgs "logiops" { };
+
package = lib.mkPackageOption pkgs "logiops_0_2_3" { };
-
settings = mkOption {
+
settings = lib.mkOption {
type = libconfig-format.type;
default = { };
example = {
···
];
}];
};
-
description = mdDoc ''
+
description = lib.mdDoc ''
Logid configuration. Refer to
[the `logiops` wiki](https://github.com/PixlOne/logiops/wiki/Configuration)
for details on supported values.
···
restartTriggers = [ rendered-config ];
};
};
-
-
meta.maintainers = with lib.maintainers; [ ckie ];
}
-2
nixos/fragments/logiops.nix
···
{ self
, config
, lib
-
, pkgs
, ...
}:
···
config.services.logiops = lib.mkIf cfg.enable {
enable = true;
-
package = pkgs.logiops_0_2_3;
settings =
let
+8 -9
nixos/fragments/security.nix
···
security.polkit.enable = true;
security.rtkit.enable = true;
-
# Systemd Login
-
services.logind = {
-
lidSwitch = "suspend";
-
extraConfig = lib.generators.toKeyValue { } {
-
IdleAction = "lock";
-
# Don’t shutdown when power button is short-pressed
-
HandlePowerKey = "lock";
-
HandlePowerKeyLongPress = "suspend";
-
};
+
# Systemd Login
+
services.logind.settings.Login = {
+
HandleLidSwitch = "suspend";
+
IdleAction = "lock";
+
# Don’t shutdown when power button is short-pressed
+
HandlePowerKey = "lock";
+
HandlePowerKeyLongPress = "suspend";
};
# `swaylock` pam service must be at least declared to work properly
···
# Signing
programs.gnupg.agent.enable = true;
services.gnome.gnome-keyring.enable = true;
+
services.gnome.gcr-ssh-agent.enable = false;
# SSH
services.openssh = {
+5 -18
nixos/profiles/laptop.nix
···
-
{ self
-
, config
+
{ config
, pkgs
, ...
}:
-
let
-
inherit (self.outputs) nixosModules;
-
in
{
-
imports = [
-
# Replaces nixpkgs module with a custom one that support fallback static location
-
nixosModules.geoclue2
-
];
-
config = {
local.fragment = {
agenix.enable = true;
···
kernel.sysctl."kernel.perf_event_paranoid" = -1;
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
-
extraModulePackages = with config.boot.kernelPackages; [ perf xone ];
+
extraModulePackages = with config.boot.kernelPackages; [ xone ];
loader = {
systemd-boot.enable = true;
···
# Once in a while, the session stop job hangs and lasts the full default
# time (1min30). I just want to shutdown my computer please.
-
systemd.extraConfig = ''
-
DefaultTimeoutStopSec = 10s
-
'';
+
systemd.settings.Manager.DefaultTimeoutStopSec = "10s";
programs.dconf.enable = true;
···
};
};
-
programs.command-not-found.enable = false;
-
# This is needed for services like `darkman` and `gammastep`
services.geoclue2 = {
enable = true;
-
# Fallback using custom geoclue2 module waitng for an alternative to MLS
+
# Fallback using custom geoclue2 module waiting for an alternative to MLS
# (Mozilla Location Services). See related module in repo.
# INFO: lat vvvv vvv long → Paris rough location
-
staticFile = "48.8\n2.3\n0\n0\n";
+
# staticFile = "48.8\n2.3\n0\n0\n";
};
programs.wireshark = {
+6 -13
nixos/profiles/server.nix
···
{ self
, config
, pkgs
-
, upkgs
, ...
}:
let
-
inherit (self.inputs) unixpkgs srvos hypixel-bank-tracker tangled;
+
inherit (self.inputs) srvos hypixel-bank-tracker tangled;
json-format = pkgs.formats.json { };
···
authelia-metrics-port = 9004;
in
{
-
disabledModules = [ "services/networking/headscale.nix" ];
-
imports = [
srvos.nixosModules.server
srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.mixins-terminfo
-
self.nixosModules.headscale
-
hypixel-bank-tracker.nixosModules.default
tangled.nixosModules.knot
tangled.nixosModules.spindle
-
-
"${unixpkgs}/nixos/modules/services/matrix/tuwunel.nix"
];
config = {
···
};
age.secrets.pds-env.file = ../../secrets/pds-env.age;
-
services.pds = {
+
services.bluesky-pds = {
enable = true;
-
package = upkgs.bluesky-pds;
settings = {
PDS_HOSTNAME = "pds.wiro.world";
···
# TODO: add dependency on authelia
services.headscale = {
enable = true;
-
package = upkgs.headscale;
port = headscale-port;
settings = {
···
};
age.secrets.lldap-env.file = ../../secrets/lldap-env.age;
+
age.secrets.lldap-user-pass = { file = ../../secrets/lldap-user-pass.age; };
services.lldap = {
enable = true;
settings = {
http_url = "https://${lldap-hostname}";
http_port = lldap-port;
+
ldap_user_pass_file = config.age.secrets.lldap-user-pass.path;
+
force_ldap_user_pass_reset = "always";
+
ldap_base_dn = "dc=wiro,dc=world";
};
environmentFile = config.age.secrets.lldap-env.path;
···
age.secrets.tuwunel-registration-tokens = { file = ../../secrets/tuwunel-registration-tokens.age; owner = config.services.matrix-tuwunel.user; };
services.matrix-tuwunel = {
enable = true;
-
package = upkgs.matrix-tuwunel;
settings.global = {
address = [ "127.0.0.1" ];
···
age.secrets.vaultwarden-env.file = ../../secrets/vaultwarden-env.age;
services.vaultwarden = {
enable = true;
-
package = upkgs.vaultwarden;
environmentFile = config.age.secrets.vaultwarden-env.path;
config = {
+13 -6
pkgs/default.nix
···
-
{ self, system, ... }@pkgs:
+
{ self
+
+
, stdenv
+
, callPackage
+
, ...
+
}:
let
+
inherit (stdenv.hostPlatform) system;
+
inherit (self.inputs)
agenix
git-leave
···
;
in
{
-
asak = pkgs.callPackage ./asak.nix { };
-
ebnfer = pkgs.callPackage ./ebnfer.nix { };
-
find-unicode = pkgs.callPackage ./find-unicode.nix { };
-
names = pkgs.callPackage ./names.nix { };
-
probe-rs-udev-rules = pkgs.callPackage ./probe-rs-udev-rules.nix { };
+
asak = callPackage ./asak.nix { };
+
ebnfer = callPackage ./ebnfer.nix { };
+
find-unicode = callPackage ./find-unicode.nix { };
+
names = callPackage ./names.nix { };
+
probe-rs-udev-rules = callPackage ./probe-rs-udev-rules.nix { };
# Import packages defined in foreign repositories
inherit (agenix.packages.${system}) agenix;
+10 -10
secrets/keys.nix
···
rec {
# Machine SSH key (/etc/ssh/ssh_host_ed25519_key.pub)
-
archaic = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDuBHC0f7N0q1KRczJMoaBVdY0JFOtcpPy6WlYsoxUh";
-
neo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR1/9o1HLnSRkXt3xxAM5So1YCCNdJpBN1leSu7giuR";
-
systems = [ archaic neo ];
+
archaic-wiro-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDuBHC0f7N0q1KRczJMoaBVdY0JFOtcpPy6WlYsoxUh";
+
neo-wiro-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR1/9o1HLnSRkXt3xxAM5So1YCCNdJpBN1leSu7giuR";
+
systems = [ archaic-wiro-laptop neo-wiro-laptop ];
-
weird-row = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII5sThvKuIj8yfeZzUPYfxWxnjTTdNtSID2OL4czE8AL";
-
servers = [ weird-row ];
+
weird-row-server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII5sThvKuIj8yfeZzUPYfxWxnjTTdNtSID2OL4czE8AL";
+
servers = [ weird-row-server ];
# Sessions specific age key (~/.ssh/id_home_manager.pub)
-
neo-milomoisson = "age1vz2zmduaqhaw5jrqh277pmp36plyth8rz5k9ccxeftfcl2nlhalqwvx5xz";
-
sessions = [ neo-milomoisson ];
+
neo-milo = "age1vz2zmduaqhaw5jrqh277pmp36plyth8rz5k9ccxeftfcl2nlhalqwvx5xz";
+
sessions = [ neo-milo ];
-
# User keys (~/.ssh/id_ed25519.pub)
-
milomoisson = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdt7atyPTOfaBIsgDYYb0DG1yid2u78abaCDji6Uxgi";
+
# User keys (~/.ssh/id_{ed25519,ecdsa}.pub)
+
milo-ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdt7atyPTOfaBIsgDYYb0DG1yid2u78abaCDji6Uxgi";
wirody = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMdW6ijH9oTsrswUJmQBF2LQkhjrMFkJ1LktnirPuL2S";
-
users = [ milomoisson wirody ];
+
users = [ milo-ed25519 wirody ];
}
+11
secrets/lldap-user-pass.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg rkX6nxV4pATfwzkzJtI08/Z0bvi0wYwnLJsppUAsz20
+
X+znUc5AKAunPqr1jdq10obvQBU+rqs/LmeQaZzI+F4
+
-> ssh-ed25519 SmMcWg xaZtLP6GOocdiMf3hgoujWigGgi7KxDUMGuPYNqS8WU
+
00Y+8L4QssKFqRlGB2e0yiv9SyoqbxeZ/lWL6DCLlpo
+
-> ssh-ed25519 Q8rMFA kHA5wVVhmpodSn3OcZuc78xttymjOoy9voa8GqIE+F8
+
a7HpZf6sjmxr49QoV9tXrATheu8u20JmKCEIkmAZdhA
+
-> U=6S`1*-grease \8na]onc
+
PP5XQ1vbpadHeiMBOkmEccTIAg
+
--- 1hkJN6ZLX8GJ8y0WuFcMEv66om+Phc0wYJFKCB8Amzg
+
�M� ��}ޘ*;f��y��]����2ef���}�d��� ���J�\��8�h��1�u� ������SHN��yS�D>W��x�J���yh������
+1
secrets/secrets.nix
···
"pds-env.age".publicKeys = deploy;
# Defines `LLDAP_JWT_SECRET`, `LLDAP_KEY_SEED`.
"lldap-env.age".publicKeys = deploy;
+
"lldap-user-pass.age".publicKeys = deploy;
"headscale-oidc-secret.age".publicKeys = deploy;
"grafana-oidc-secret.age".publicKeys = deploy;
"authelia-jwt-secret.age".publicKeys = deploy;
+1 -1
templates/blank/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
+1 -1
templates/c/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
+1 -1
templates/rust-pkg/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
+1 -1
templates/rust/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";