Compare commits
23 commits
1f936258f2
...
ea450ca4df
Author | SHA1 | Date | |
---|---|---|---|
ea450ca4df | |||
daae64b03e | |||
32681a413a | |||
e0675973ed | |||
603bd044d8 | |||
c43055ebe8 | |||
327b919d7d | |||
ea37772c34 | |||
a33554036b | |||
b704b5434f | |||
cde0bc94e8 | |||
0476c020ea | |||
b00404565c | |||
4530b5e6a6 | |||
ecaad3220c | |||
cfdabda225 | |||
6526f3b4e5 | |||
9345ef7c12 | |||
5c892cd2e5 | |||
79a4ee511e | |||
e8744a168b | |||
b1659b13fe | |||
c87a851207 |
39 changed files with 650 additions and 646 deletions
|
@ -8,4 +8,5 @@ jobs:
|
||||||
runs-on: native
|
runs-on: native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: nix flake check --all-systems
|
- run: nix-build -A ci.check
|
||||||
|
- run: ./result
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
.direnv
|
.direnv
|
||||||
|
result
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ lib, ... }:
|
{ lib }:
|
||||||
{
|
{
|
||||||
options.assets = lib.mkOption {
|
options.assets = lib.options.create {
|
||||||
type = lib.types.unspecified;
|
type = lib.types.raw;
|
||||||
readOnly = true;
|
writable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.assets = {
|
config.assets = {
|
||||||
|
|
8
default.nix
Normal file
8
default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
let
|
||||||
|
nilla = import ./nilla.nix { };
|
||||||
|
getPackage = name: nilla.packages.${name}.result.${builtins.currentSystem};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
ci.check = getPackage "ci-check";
|
||||||
|
formatter = getPackage "formatter";
|
||||||
|
}
|
261
flake.lock
generated
261
flake.lock
generated
|
@ -3,11 +3,11 @@
|
||||||
"__flake-compat": {
|
"__flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742412704,
|
"lastModified": 1743033641,
|
||||||
"narHash": "sha256-mhazLo8DuZ3c6r5I7hDxxag8ftAM4W0aUjFjQuw8q5c=",
|
"narHash": "sha256-7L0/So1J21N4VHaZRzdK6Ywj3+NLdHfM8z0o5XVuPeo=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "f7a7752f237bbc59b868058f70cffd3e436b49b7",
|
"rev": "5bbdeaea85d5f396f01e8af94bcb6f29d5af22f7",
|
||||||
"revCount": 69,
|
"revCount": 83,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
},
|
},
|
||||||
|
@ -44,24 +44,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attic": {
|
"attic": {
|
||||||
"inputs": {
|
"flake": false,
|
||||||
"crane": [
|
|
||||||
"crane"
|
|
||||||
],
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"lix": [
|
|
||||||
"lix"
|
|
||||||
],
|
|
||||||
"lix-module": [
|
|
||||||
"lix-module"
|
|
||||||
],
|
|
||||||
"nix-github-actions": "nix-github-actions",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742679462,
|
"lastModified": 1742679462,
|
||||||
"narHash": "sha256-L9q9KDqiJEREM/GRnSo4vB9VCvclmdRT9vXuFwBmb9Y=",
|
"narHash": "sha256-L9q9KDqiJEREM/GRnSo4vB9VCvclmdRT9vXuFwBmb9Y=",
|
||||||
|
@ -95,11 +78,11 @@
|
||||||
"conduit-src": {
|
"conduit-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742005420,
|
"lastModified": 1742789401,
|
||||||
"narHash": "sha256-v4LCx7VUZ+8Hy1+6ziREVY/QEADjZbo8c0h9eU7nMVY=",
|
"narHash": "sha256-oZ8TPrtzPwXupsAfwMjLRI/s0/PokqL3q1ejeGVn5lE=",
|
||||||
"owner": "famedly",
|
"owner": "famedly",
|
||||||
"repo": "conduit",
|
"repo": "conduit",
|
||||||
"rev": "063d13a0e10619f17bc21f0dd291c5a733581394",
|
"rev": "a7e6f60b41122761422df2b7bcc0c192416f9a28",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -110,12 +93,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"crane": {
|
"crane": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742394900,
|
"lastModified": 1745454774,
|
||||||
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
|
"narHash": "sha256-oLvmxOnsEKGtwczxp/CwhrfmQUG2ym24OMWowcoRhH8=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
|
"rev": "efd36682371678e2b6da3f108fdb5c613b3ec598",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"crane_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745454774,
|
||||||
|
"narHash": "sha256-oLvmxOnsEKGtwczxp/CwhrfmQUG2ym24OMWowcoRhH8=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "efd36682371678e2b6da3f108fdb5c613b3ec598",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -131,11 +130,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742382197,
|
"lastModified": 1743359449,
|
||||||
"narHash": "sha256-5OtFbbdKAkWDVuzjs1J9KwdFuDxsEvz0FZX3xR2jEUM=",
|
"narHash": "sha256-unjpn5SCn55Ma+/grXuTybICgUa/bcPGKxJMt9lLoIg=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "643b57fd32135769f809913663130a95fe6db49e",
|
"rev": "fe625481e50d05aa452d684d5228e5059b4942d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -165,27 +164,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fenix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1742452566,
|
|
||||||
"narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"firefox-darwin": {
|
"firefox-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -193,11 +171,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742432361,
|
"lastModified": 1743383039,
|
||||||
"narHash": "sha256-FlqTrkzSn6oPR5iJTPsCQDd0ioMGzzxnPB+2wve9W2w=",
|
"narHash": "sha256-Palj4EeFRS3tLl2aK0FgE01SBWRbqD4vKE+SNBJaYo4=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "c868ff433ea5123e837a62ae689543045187d7a4",
|
"rev": "96f1d9e12f0efbbc4cea47c0a06a1667ed90e5f8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -207,22 +185,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"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_2": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
@ -239,47 +201,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"attic",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741352980,
|
|
||||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1741352980,
|
|
||||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts_3": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
|
@ -375,11 +296,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742479163,
|
"lastModified": 1743346877,
|
||||||
"narHash": "sha256-YC0zdGyZMu7seA2Jm1mxtcxE4lSeVwvCPMfWzJ8+o/c=",
|
"narHash": "sha256-WczB9koq4xvdBZoMLW8VFT16RGaDrJXyA0rDTg2GFVU=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "b7d735ffe66a03ab5970e5f860923aada50d4e4c",
|
"rev": "e148d8b3110ace99505c0871714cd64391cc4ba3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -395,11 +316,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742501496,
|
"lastModified": 1743360001,
|
||||||
"narHash": "sha256-LYwyZmhckDKK7i4avmbcs1pBROpOaHi98lbjX1fmVpU=",
|
"narHash": "sha256-HtpS/ZdgWXw0y+aFdORcX5RuBGTyz3WskThspNR70SM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d725df5ad8cee60e61ee6fe3afb735e4fbc1ff41",
|
"rev": "b6fd653ef8fbeccfd4958650757e91767a65506d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -411,11 +332,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742411066,
|
"lastModified": 1743274305,
|
||||||
"narHash": "sha256-8vXOKPQFRzTjapsRnTJ1nuFjUfC+AGI2ybdK5cAEHZ8=",
|
"narHash": "sha256-gsPA3AAGi3pucRpzJbhWWyyOBv2/2OjAjU/SlcSE8Vc=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "2491b7cc2128ee440d24768c4521c38b1859fc28",
|
"rev": "d169c092fc28838a253be136d17fe7de1292c728",
|
||||||
"revCount": 17705,
|
"revCount": 17746,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.lix.systems/lix-project/lix.git"
|
"url": "https://git.lix.systems/lix-project/lix.git"
|
||||||
},
|
},
|
||||||
|
@ -436,11 +357,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741894565,
|
"lastModified": 1742945498,
|
||||||
"narHash": "sha256-2FD0NDJbEjUHloVrtEIms5miJsj1tvQCc/0YK5ambyc=",
|
"narHash": "sha256-MB/b/xcDKqaVBxJIIxwb81r8ZiGLeKEcqokATRRroo8=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "a6da43f8193d9e329bba1795c42590c27966082e",
|
"rev": "fa69ae26cc32dda178117b46487c2165c0e08316",
|
||||||
"revCount": 136,
|
"revCount": 138,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
||||||
},
|
},
|
||||||
|
@ -452,7 +373,7 @@
|
||||||
"mailserver": {
|
"mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
|
@ -474,7 +395,7 @@
|
||||||
},
|
},
|
||||||
"niko-nur": {
|
"niko-nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -494,11 +415,11 @@
|
||||||
"nilla": {
|
"nilla": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742722370,
|
"lastModified": 1743409018,
|
||||||
"narHash": "sha256-MqdseA78bo2M3zfb0mjcBPYU2Qn9CF/KH5LZivWRtB0=",
|
"narHash": "sha256-fghnO1XmDnM0U6PdFu0GquNIRQNxH2IQ1AgifyZk6Wk=",
|
||||||
"owner": "nilla-nix",
|
"owner": "nilla-nix",
|
||||||
"repo": "nilla",
|
"repo": "nilla",
|
||||||
"rev": "b30b5a225843ab649a9b140eb3cbbcc8030a7eaf",
|
"rev": "6747fe62879d7d15c96808bc370a52941287772c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -507,27 +428,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-github-actions": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"attic",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1737420293,
|
|
||||||
"narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723603349,
|
"lastModified": 1723603349,
|
||||||
|
@ -571,29 +471,13 @@
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735563628,
|
|
||||||
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742395137,
|
"lastModified": 1743259260,
|
||||||
"narHash": "sha256-WWNNjCSzQCtATpCFEijm81NNG1xqlLMVbIzXAiZysbs=",
|
"narHash": "sha256-ArWLUgRm1tKHiqlhnymyVqi5kLNCK5ghvm06mfCl4QY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2a725d40de138714db4872dc7405d86457aa17ad",
|
"rev": "eb0e0f21f15c559d2ac7633dc81d079d1caf5f5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -632,9 +516,7 @@
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"fenix": "fenix",
|
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"helix": "helix",
|
"helix": "helix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lix": "lix",
|
"lix": "lix",
|
||||||
|
@ -650,23 +532,6 @@
|
||||||
"zjstatus": "zjstatus"
|
"zjstatus": "zjstatus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1742296961,
|
|
||||||
"narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=",
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"ref": "nightly",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -776,11 +641,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742370146,
|
"lastModified": 1743081648,
|
||||||
"narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=",
|
"narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "adc195eef5da3606891cedf80c0d9ce2d3190808",
|
"rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -838,9 +703,7 @@
|
||||||
},
|
},
|
||||||
"zjstatus": {
|
"zjstatus": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": [
|
"crane": "crane_2",
|
||||||
"crane"
|
|
||||||
],
|
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -848,11 +711,11 @@
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741803511,
|
"lastModified": 1743151937,
|
||||||
"narHash": "sha256-DcCGBWvAvt+OWI+EcPRO+/IXZHkFgPxZUmxf2VLl8no=",
|
"narHash": "sha256-SjfGN+3wrzgRvzpziowTQUIr/o6ac5iMniua0ra6elo=",
|
||||||
"owner": "dj95",
|
"owner": "dj95",
|
||||||
"repo": "zjstatus",
|
"repo": "zjstatus",
|
||||||
"rev": "df9c77718f7023de8406e593eda6b5b0bc09cddd",
|
"rev": "2772e18d1bf57b5fe24c7e2c86a6cbec0475cd88",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
119
flake.nix
119
flake.nix
|
@ -1,86 +1,8 @@
|
||||||
{
|
{
|
||||||
outputs =
|
outputs = inputs: (import ./nilla.nix { inherit inputs; }).flake;
|
||||||
inputs@{ flake-parts, ... }:
|
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
||||||
systems = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
inputs.treefmt.flakeModule
|
|
||||||
|
|
||||||
./assets
|
|
||||||
./hosts
|
|
||||||
./modules
|
|
||||||
./wrappers
|
|
||||||
./pkgs
|
|
||||||
./services
|
|
||||||
];
|
|
||||||
|
|
||||||
perSystem =
|
|
||||||
{
|
|
||||||
inputs',
|
|
||||||
self',
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
|
||||||
packages = [
|
|
||||||
inputs'.agenix.packages.agenix
|
|
||||||
self'.packages.attic-client
|
|
||||||
# TODO: Contribute darwin support to nh
|
|
||||||
pkgs.nh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = {
|
|
||||||
# Re-export it for convenience and for caching
|
|
||||||
inherit (inputs'.attic.packages) attic-client attic-server;
|
|
||||||
base-packages = pkgs.symlinkJoin {
|
|
||||||
name = "settei-base";
|
|
||||||
paths = with self'.packages; [
|
|
||||||
helix
|
|
||||||
fish
|
|
||||||
git-commit-last
|
|
||||||
git-fixup
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
treefmt = {
|
|
||||||
programs.deadnix.enable = true;
|
|
||||||
programs.nixfmt.enable = true;
|
|
||||||
programs.statix.enable = true;
|
|
||||||
programs.fish_indent.enable = true;
|
|
||||||
programs.deno.enable = true;
|
|
||||||
programs.stylua.enable = true;
|
|
||||||
programs.shfmt.enable = true;
|
|
||||||
settings.global.excludes = [
|
|
||||||
# agenix
|
|
||||||
"*.age"
|
|
||||||
|
|
||||||
# racket
|
|
||||||
"*.rkt"
|
|
||||||
"**/rashrc"
|
|
||||||
|
|
||||||
# custom assets
|
|
||||||
"*.png"
|
|
||||||
"*.svg"
|
|
||||||
];
|
|
||||||
settings.on-unmatched = "fatal";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
||||||
flake-parts = {
|
|
||||||
url = "github:hercules-ci/flake-parts";
|
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -125,13 +47,6 @@
|
||||||
url = "gitlab:famedly/conduit?ref=next";
|
url = "gitlab:famedly/conduit?ref=next";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
fenix = {
|
|
||||||
url = "github:nix-community/fenix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
crane = {
|
|
||||||
url = "github:ipetkov/crane";
|
|
||||||
};
|
|
||||||
firefox-darwin = {
|
firefox-darwin = {
|
||||||
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -141,10 +56,11 @@
|
||||||
};
|
};
|
||||||
attic = {
|
attic = {
|
||||||
url = "git+https://git.lix.systems/nrabulinski/attic.git";
|
url = "git+https://git.lix.systems/nrabulinski/attic.git";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
flake = false;
|
||||||
inputs.crane.follows = "crane";
|
};
|
||||||
inputs.lix.follows = "lix";
|
crane = {
|
||||||
inputs.lix-module.follows = "lix-module";
|
url = "github:ipetkov/crane";
|
||||||
|
flake = false;
|
||||||
};
|
};
|
||||||
helix = {
|
helix = {
|
||||||
url = "github:helix-editor/helix";
|
url = "github:helix-editor/helix";
|
||||||
|
@ -153,7 +69,6 @@
|
||||||
zjstatus = {
|
zjstatus = {
|
||||||
url = "github:dj95/zjstatus";
|
url = "github:dj95/zjstatus";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.crane.follows = "crane";
|
|
||||||
};
|
};
|
||||||
lix = {
|
lix = {
|
||||||
url = "git+https://git.lix.systems/lix-project/lix.git";
|
url = "git+https://git.lix.systems/lix-project/lix.git";
|
||||||
|
@ -177,26 +92,4 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
TODO: Uncomment once (if ever?) nixConfig makes sense in flakes
|
|
||||||
nixConfig = {
|
|
||||||
extra-substituters = [
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
"https://cache.garnix.io"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://hercules-ci.cachix.org"
|
|
||||||
"https://nrabulinski.cachix.org"
|
|
||||||
"https://cache.nrab.lol"
|
|
||||||
];
|
|
||||||
extra-trusted-public-keys = [
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"hercules-ci.cachix.org-1:ZZeDl9Va+xe9j+KqdzoBZMFJHVQ42Uu/c/1/KMC5Lw0="
|
|
||||||
"nrabulinski.cachix.org-1:Q5FD7+1c68uH74CQK66UWNzxhanZW8xcg1LFXxGK8ic="
|
|
||||||
"cache.nrab.lol-1:CJl1TouOyuJ1Xh4tZSXLwm3Upt06HzUNZmeyuEB9EZg="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
self,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
includes = [
|
||||||
./kazuki
|
./kazuki
|
||||||
./hijiri-vm
|
./hijiri-vm
|
||||||
./hijiri
|
./hijiri
|
||||||
|
@ -16,58 +14,40 @@
|
||||||
./youko
|
./youko
|
||||||
];
|
];
|
||||||
|
|
||||||
builders =
|
config.systems.builders =
|
||||||
let
|
let
|
||||||
sharedOptions = {
|
sharedOptions = {
|
||||||
_file = ./default.nix;
|
_file = ./default.nix;
|
||||||
|
|
||||||
settei.sane-defaults.allSshKeys = config.assets.sshKeys.user;
|
settei.sane-defaults.allSshKeys = config.assets.sshKeys.user;
|
||||||
settei.flake-qol.inputs = inputs // {
|
settei.flake-qol.inputs = inputs // {
|
||||||
settei = self;
|
settei = inputs.self;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
baseNixos = inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
self.nixosModules.combined
|
|
||||||
sharedOptions
|
|
||||||
];
|
|
||||||
specialArgs.configurationName = "base";
|
|
||||||
};
|
|
||||||
|
|
||||||
baseDarwin = inputs.darwin.lib.darwinSystem {
|
|
||||||
modules = [
|
|
||||||
self.darwinModules.combined
|
|
||||||
sharedOptions
|
|
||||||
];
|
|
||||||
specialArgs.configurationName = "base";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixos =
|
nixos =
|
||||||
name: module:
|
name: module:
|
||||||
baseNixos.extendModules {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
|
config.nixosModules.combined
|
||||||
|
sharedOptions
|
||||||
module
|
module
|
||||||
config.__extraHostConfigs.${name} or { }
|
config.extraHostConfigs.${name} or { }
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
|
|
||||||
darwin =
|
darwin =
|
||||||
name: module:
|
name: module:
|
||||||
let
|
inputs.darwin.lib.darwinSystem {
|
||||||
eval = baseDarwin._module.args.extendModules {
|
|
||||||
modules = [
|
modules = [
|
||||||
|
config.darwinModules.combined
|
||||||
|
sharedOptions
|
||||||
module
|
module
|
||||||
config.__extraHostConfigs.${name} or { }
|
config.extraHostConfigs.${name} or { }
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
in
|
|
||||||
eval
|
|
||||||
// {
|
|
||||||
system = eval.config.system.build.toplevel;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.hijiri-vm =
|
config.systems.nixos.hijiri-vm.module =
|
||||||
{
|
{
|
||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.hijiri =
|
config.systems.darwin.hijiri.module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
configurations.nixos =
|
config.configurations.nixos =
|
||||||
let
|
let
|
||||||
mkInstaller =
|
mkInstaller =
|
||||||
system:
|
system:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.kazuki =
|
config.systems.nixos.kazuki.module =
|
||||||
{
|
{
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.darwin.kogata =
|
config.systems.darwin.kogata.module =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.system = "aarch64-darwin";
|
nixpkgs.system = "aarch64-darwin";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.ude =
|
config.systems.nixos.ude.module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
configurations.nixos.youko =
|
config.systems.nixos.youko.module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -6,6 +6,11 @@ let
|
||||||
url = "${url}/archive/${rev}.tar.gz";
|
url = "${url}/archive/${rev}.tar.gz";
|
||||||
sha256 = narHash;
|
sha256 = narHash;
|
||||||
};
|
};
|
||||||
flake = import flake-compat { src = ./.; };
|
flake = import flake-compat {
|
||||||
|
src = ./.;
|
||||||
|
copySourceTreeToStore = false;
|
||||||
|
useBuiltinsFetchTree = true;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
flake.inputs
|
# Workaround for https://github.com/nilla-nix/nilla/issues/14
|
||||||
|
builtins.mapAttrs (_: input: input // { type = "derivation"; }) flake.inputs
|
||||||
|
|
|
@ -1,29 +1,21 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
flakeModule = import ./flake { inherit (inputs) nixpkgs darwin home-manager; };
|
perInput = system: flake: {
|
||||||
|
packages = flake.packages.${system};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
config.homeModules = rec {
|
||||||
flakeModule
|
|
||||||
];
|
|
||||||
|
|
||||||
flake.homeModules = rec {
|
|
||||||
settei = ./home;
|
settei = ./home;
|
||||||
default = settei;
|
default = settei;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.flakeModules = rec {
|
config.nixosModules = rec {
|
||||||
settei = flakeModule;
|
|
||||||
default = settei;
|
|
||||||
};
|
|
||||||
|
|
||||||
flake.nixosModules = rec {
|
|
||||||
settei = import ./system {
|
settei = import ./system {
|
||||||
inherit (config) perInput;
|
inherit perInput;
|
||||||
isLinux = true;
|
isLinux = true;
|
||||||
};
|
};
|
||||||
combined = {
|
combined = {
|
||||||
|
@ -33,21 +25,28 @@ in
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.mailserver.nixosModules.default
|
inputs.mailserver.nixosModules.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.attic.nixosModules.atticd
|
"${inputs.attic}/nixos/atticd.nix"
|
||||||
inputs.lix-module.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
{
|
{
|
||||||
disabledModules = [
|
disabledModules = [
|
||||||
"services/networking/atticd.nix"
|
"services/networking/atticd.nix"
|
||||||
];
|
];
|
||||||
|
services.atticd.useFlakeCompatOverlay = false;
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: _: {
|
||||||
|
attic-client = config.packages.attic-client.result.${final.system};
|
||||||
|
attic-server = config.packages.attic-server.result.${final.system};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
default = combined;
|
default = combined;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.darwinModules = rec {
|
config.darwinModules = rec {
|
||||||
settei = import ./system {
|
settei = import ./system {
|
||||||
inherit (config) perInput;
|
inherit perInput;
|
||||||
isLinux = false;
|
isLinux = false;
|
||||||
};
|
};
|
||||||
combined = {
|
combined = {
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
darwin,
|
|
||||||
home-manager,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
_file = ./configurations.nix;
|
|
||||||
|
|
||||||
options = {
|
|
||||||
# Those functions take the final arguments and emit a valid configuration.
|
|
||||||
# Probably should hardly ever be overriden
|
|
||||||
builders = {
|
|
||||||
nixos = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: nixpkgs.lib.nixosSystem;
|
|
||||||
};
|
|
||||||
darwin = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: darwin.lib.darwinSystem;
|
|
||||||
};
|
|
||||||
home = mkOption {
|
|
||||||
type = types.functionTo types.unspecified;
|
|
||||||
default = _name: home-manager.lib.homeManagerConfiguration;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
configurations = {
|
|
||||||
nixos = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
darwin = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
home = mkOption {
|
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.flake = {
|
|
||||||
nixosConfigurations = mapAttrs config.builders.nixos config.configurations.nixos;
|
|
||||||
darwinConfigurations = mapAttrs config.builders.darwin config.configurations.darwin;
|
|
||||||
homeConfigurations = mapAttrs config.builders.home config.configurations.home;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
darwin,
|
|
||||||
home-manager,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
_file = ./default.nix;
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
(import ./configurations.nix { inherit nixpkgs darwin home-manager; })
|
|
||||||
./services.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,95 +0,0 @@
|
||||||
# List of features I want this module to eventually have
|
|
||||||
# TODO: Automatic port allocation
|
|
||||||
# TODO: Making it possible to conveniently isolate services (running them in NixOS containers)
|
|
||||||
# TODO: Handling specializations
|
|
||||||
# TODO: Convenient http handling
|
|
||||||
# TODO: Automatic backup
|
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
serviceModule =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
host = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
ports = lib.mkOption {
|
|
||||||
type = with lib.types; listOf port;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
hosts = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
default = [ config.host ];
|
|
||||||
};
|
|
||||||
config = lib.mkOption {
|
|
||||||
type = lib.types.deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
hostConfig = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf deferredModule;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
moduleToHostConfigs =
|
|
||||||
cfg:
|
|
||||||
lib.genAttrs cfg.hosts (host: {
|
|
||||||
imports = [
|
|
||||||
cfg.config
|
|
||||||
(cfg.hostConfig.${host} or { })
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
maybeGetPreviousConfigs = acc: host: (acc.${host} or { imports = [ ]; }).imports;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
_file = ./services.nix;
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf (submodule serviceModule);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
__extraHostConfigs = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf deferredModule;
|
|
||||||
readOnly = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.__extraHostConfigs =
|
|
||||||
let
|
|
||||||
duplicatePorts = lib.pipe config.services [
|
|
||||||
lib.attrValues
|
|
||||||
(map (cfg: cfg.ports))
|
|
||||||
lib.flatten
|
|
||||||
(lib.groupBy' (cnt: _: cnt + 1) 0 toString)
|
|
||||||
(lib.filterAttrs (_: cnt: cnt > 1))
|
|
||||||
lib.attrNames
|
|
||||||
];
|
|
||||||
assertMsg =
|
|
||||||
let
|
|
||||||
plural = lib.length duplicatePorts > 1;
|
|
||||||
in
|
|
||||||
"\nBad service config:\nThe following port${if plural then "s" else ""} ${
|
|
||||||
if plural then "were" else "was"
|
|
||||||
} declared multiple times: ${lib.concatStringsSep ", " duplicatePorts}";
|
|
||||||
# Here I collect all the services.<name>.config into a flat
|
|
||||||
# __extraHostConfigs.<host>.imports = [
|
|
||||||
# ...
|
|
||||||
# ]
|
|
||||||
# so that I can easily import them in hosts/default.nix
|
|
||||||
hostConfigs = lib.pipe config.services [
|
|
||||||
lib.attrValues
|
|
||||||
(lib.foldl' (
|
|
||||||
acc: cfg:
|
|
||||||
acc
|
|
||||||
// lib.mapAttrs (host: c: {
|
|
||||||
imports = c.imports ++ (maybeGetPreviousConfigs acc host);
|
|
||||||
}) (moduleToHostConfigs cfg)
|
|
||||||
) { })
|
|
||||||
];
|
|
||||||
in
|
|
||||||
if duplicatePorts != [ ] then throw assertMsg else hostConfigs;
|
|
||||||
}
|
|
8
modules/nilla/builders/custom-load.nix
Normal file
8
modules/nilla/builders/custom-load.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
config.builders.custom-load = {
|
||||||
|
settings.type = lib.types.submodule { };
|
||||||
|
settings.default = { };
|
||||||
|
build = pkg: lib.attrs.generate pkg.systems (system: pkg.package { inherit system; });
|
||||||
|
};
|
||||||
|
}
|
6
modules/nilla/builders/default.nix
Normal file
6
modules/nilla/builders/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
includes = [
|
||||||
|
./nixpkgs-flake.nix
|
||||||
|
./custom-load.nix
|
||||||
|
];
|
||||||
|
}
|
21
modules/nilla/builders/nixpkgs-flake.nix
Normal file
21
modules/nilla/builders/nixpkgs-flake.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
config.builders.nixpkgs-flake = {
|
||||||
|
settings.type = lib.types.submodule {
|
||||||
|
options.args = lib.options.create {
|
||||||
|
type = lib.types.any;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings.default = { };
|
||||||
|
build =
|
||||||
|
pkg:
|
||||||
|
lib.attrs.generate pkg.systems (
|
||||||
|
system: inputs.nixpkgs.legacyPackages.${system}.callPackage pkg.package pkg.settings.args
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
9
modules/nilla/default.nix
Normal file
9
modules/nilla/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
includes = [
|
||||||
|
./builders
|
||||||
|
./services.nix
|
||||||
|
./systems.nix
|
||||||
|
./modules.nix
|
||||||
|
./flake.nix
|
||||||
|
];
|
||||||
|
}
|
32
modules/nilla/flake.nix
Normal file
32
modules/nilla/flake.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, config }:
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
transpose =
|
||||||
|
attrs: lib.attrs.generate systems (system: builtins.mapAttrs (_: pkg: pkg.result.${system}) attrs);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.flake = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
};
|
||||||
|
|
||||||
|
config.flake = {
|
||||||
|
inherit (config)
|
||||||
|
nixosModules
|
||||||
|
darwinModules
|
||||||
|
homeModules
|
||||||
|
;
|
||||||
|
|
||||||
|
nixosConfigurations = builtins.mapAttrs (_: system: system.result) config.systems.nixos;
|
||||||
|
darwinConfigurations = builtins.mapAttrs (_: system: system.result) config.systems.darwin;
|
||||||
|
homeConfigurations = builtins.mapAttrs (_: system: system.result) config.systems.home;
|
||||||
|
|
||||||
|
devShells = transpose config.shells;
|
||||||
|
packages = transpose config.packages;
|
||||||
|
|
||||||
|
formatter = config.packages.formatter.result;
|
||||||
|
};
|
||||||
|
}
|
17
modules/nilla/modules.nix
Normal file
17
modules/nilla/modules.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
nixosModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
darwinModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
homeModules = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
95
modules/nilla/services.nix
Normal file
95
modules/nilla/services.nix
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
{ lib, config }:
|
||||||
|
let
|
||||||
|
inherit (builtins)
|
||||||
|
attrNames
|
||||||
|
attrValues
|
||||||
|
concatStringsSep
|
||||||
|
mapAttrs
|
||||||
|
foldl'
|
||||||
|
groupBy
|
||||||
|
length
|
||||||
|
;
|
||||||
|
serviceModule =
|
||||||
|
{ config }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
host = lib.options.create {
|
||||||
|
type = lib.types.string;
|
||||||
|
};
|
||||||
|
ports = lib.options.create {
|
||||||
|
type = lib.types.list.of lib.types.port;
|
||||||
|
default.value = [ ];
|
||||||
|
};
|
||||||
|
hosts = lib.options.create {
|
||||||
|
type = lib.types.list.of lib.types.string;
|
||||||
|
default.value = [ config.host ];
|
||||||
|
};
|
||||||
|
module = lib.options.create {
|
||||||
|
type = lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
hostModule = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
moduleToHostConfigs =
|
||||||
|
cfg:
|
||||||
|
lib.attrs.generate cfg.hosts (host: {
|
||||||
|
imports = [
|
||||||
|
cfg.module
|
||||||
|
(cfg.hostModule.${host} or { })
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
maybeGetPreviousConfigs = acc: host: (acc.${host} or { imports = [ ]; }).imports;
|
||||||
|
|
||||||
|
# Copied from nixpkgs/lib/lists.nix
|
||||||
|
groupBy' =
|
||||||
|
op: nul: pred: lst:
|
||||||
|
mapAttrs (_name: foldl' op nul) (groupBy pred lst);
|
||||||
|
duplicatePorts = lib.fp.pipe [
|
||||||
|
attrValues
|
||||||
|
(map (cfg: cfg.ports))
|
||||||
|
lib.lists.flatten
|
||||||
|
(groupBy' (cnt: _: cnt + 1) 0 toString)
|
||||||
|
(lib.attrs.filter (_: cnt: cnt > 1))
|
||||||
|
attrNames
|
||||||
|
] config.services;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services = lib.options.create {
|
||||||
|
type = lib.types.attrs.of (lib.types.submodule serviceModule);
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
options.extraHostConfigs = lib.options.create {
|
||||||
|
type = lib.types.attrs.of lib.types.raw;
|
||||||
|
writable = false;
|
||||||
|
default.value = lib.fp.pipe [
|
||||||
|
attrValues
|
||||||
|
(foldl' (
|
||||||
|
acc: cfg:
|
||||||
|
acc
|
||||||
|
// mapAttrs (host: c: {
|
||||||
|
imports = c.imports ++ (maybeGetPreviousConfigs acc host);
|
||||||
|
}) (moduleToHostConfigs cfg)
|
||||||
|
) { })
|
||||||
|
] config.services;
|
||||||
|
};
|
||||||
|
|
||||||
|
config.assertions = [
|
||||||
|
{
|
||||||
|
assertion = duplicatePorts == [ ];
|
||||||
|
message =
|
||||||
|
let
|
||||||
|
plural = length duplicatePorts > 1;
|
||||||
|
in
|
||||||
|
"\nBad service config:\nThe following port${if plural then "s" else ""} ${
|
||||||
|
if plural then "were" else "was"
|
||||||
|
} declared multiple times: ${concatStringsSep ", " duplicatePorts}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
52
modules/nilla/systems.nix
Normal file
52
modules/nilla/systems.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{ config, lib }:
|
||||||
|
let
|
||||||
|
mkBuilderOption =
|
||||||
|
typ:
|
||||||
|
lib.options.create {
|
||||||
|
type = lib.types.function (lib.types.function lib.types.raw);
|
||||||
|
default.value = _name: _module: throw "Builder for systems.${typ} is not implemented";
|
||||||
|
};
|
||||||
|
inherit (config.systems) builders;
|
||||||
|
mkSystemModule =
|
||||||
|
typ:
|
||||||
|
{ config, name }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
name = lib.options.create {
|
||||||
|
type = lib.types.string;
|
||||||
|
default.value = name;
|
||||||
|
};
|
||||||
|
module = lib.options.create {
|
||||||
|
type = lib.types.raw;
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
builder = lib.options.create {
|
||||||
|
type = lib.types.function (lib.types.function lib.types.raw);
|
||||||
|
default.value = builders.${typ};
|
||||||
|
};
|
||||||
|
result = lib.options.create {
|
||||||
|
type = lib.types.raw;
|
||||||
|
writable = false;
|
||||||
|
default.value = config.builder config.name config.module;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkSystemOption =
|
||||||
|
typ:
|
||||||
|
lib.options.create {
|
||||||
|
type = lib.types.attrs.of (lib.types.submodule (mkSystemModule typ));
|
||||||
|
default.value = { };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
systems = {
|
||||||
|
builders.nixos = mkBuilderOption "nixos";
|
||||||
|
builders.darwin = mkBuilderOption "darwin";
|
||||||
|
builders.home = mkBuilderOption "home";
|
||||||
|
nixos = mkSystemOption "nixos";
|
||||||
|
darwin = mkSystemOption "darwin";
|
||||||
|
home = mkSystemOption "home";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,6 +7,18 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.settei.flake-qol;
|
cfg = config.settei.flake-qol;
|
||||||
|
|
||||||
|
nixpkgsInputToFlakeRef =
|
||||||
|
input:
|
||||||
|
if input._type or "" == "flake" then
|
||||||
|
{
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
inherit (input) lastModified narHash rev;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
input;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
_file = ./flake-qol.nix;
|
_file = ./flake-qol.nix;
|
||||||
|
@ -20,6 +32,12 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
inputs = mkOption { type = types.unspecified; };
|
inputs = mkOption { type = types.unspecified; };
|
||||||
|
nixpkgsRef = mkOption {
|
||||||
|
type = types.unspecified;
|
||||||
|
default = cfg.inputs.nixpkgs;
|
||||||
|
apply =
|
||||||
|
ref: if builtins.isString ref then builtins.parseFlakeRef ref else nixpkgsInputToFlakeRef ref;
|
||||||
|
};
|
||||||
inputs-flakes = mkOption {
|
inputs-flakes = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
@ -44,8 +62,8 @@ in
|
||||||
settei.user.extraArgs = reexportedArgs;
|
settei.user.extraArgs = reexportedArgs;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) cfg.inputs-flakes;
|
registry.nixpkgs.to = cfg.nixpkgsRef;
|
||||||
nixPath = lib.mapAttrsToList (name: _: "${name}=flake:${name}") cfg.inputs-flakes;
|
nixPath = [ "nixpkgs=flake:nixpkgs" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
128
nilla.nix
128
nilla.nix
|
@ -2,35 +2,133 @@
|
||||||
inputs ? import ./inputs.nix,
|
inputs ? import ./inputs.nix,
|
||||||
}:
|
}:
|
||||||
(import inputs.nilla).create (
|
(import inputs.nilla).create (
|
||||||
{ lib }:
|
{ config, lib }:
|
||||||
{
|
{
|
||||||
|
includes = [
|
||||||
|
./modules/nilla
|
||||||
|
./pkgs
|
||||||
|
./wrappers
|
||||||
|
./hosts
|
||||||
|
./assets
|
||||||
|
./services
|
||||||
|
./modules
|
||||||
|
];
|
||||||
|
|
||||||
config.inputs = builtins.mapAttrs (_: src: {
|
config.inputs = builtins.mapAttrs (_: src: {
|
||||||
inherit src;
|
inherit src;
|
||||||
loader = "raw";
|
loader = "raw";
|
||||||
}) inputs;
|
}) inputs;
|
||||||
|
# Add inputs argument so modules can conveniently use it
|
||||||
|
config.__module__.args.dynamic.inputs = builtins.mapAttrs (
|
||||||
|
_name: input: input.result
|
||||||
|
) config.inputs;
|
||||||
|
|
||||||
config.builders.nixpkgs-flake = {
|
config.packages =
|
||||||
settings.type = lib.types.submodule {
|
let
|
||||||
options.args = lib.options.create {
|
systems = [
|
||||||
type = lib.types.any;
|
"x86_64-linux"
|
||||||
default.value = { };
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
mkPackage = package: {
|
||||||
|
builder = "nixpkgs-flake";
|
||||||
|
inherit systems package;
|
||||||
};
|
};
|
||||||
|
mkPackageFlakeOutput =
|
||||||
|
{
|
||||||
|
input,
|
||||||
|
output ? input,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package = { system }: inputs.${input}.packages.${system}.${output};
|
||||||
};
|
};
|
||||||
settings.default = { };
|
getPkgs = system: builtins.mapAttrs (_: pkg: pkg.result.${system}) config.packages;
|
||||||
build =
|
in
|
||||||
pkg:
|
{
|
||||||
lib.attrs.generate pkg.systems (
|
agenix = mkPackageFlakeOutput { input = "agenix"; };
|
||||||
system: inputs.nixpkgs.legacyPackages.${system}.callPackage pkg.package pkg.settings.args
|
base-packages = mkPackage (
|
||||||
|
{ symlinkJoin, system }:
|
||||||
|
symlinkJoin {
|
||||||
|
name = "settei-base";
|
||||||
|
paths = with (getPkgs system); [
|
||||||
|
# TODO: wrappers
|
||||||
|
helix
|
||||||
|
fish
|
||||||
|
git-commit-last
|
||||||
|
git-fixup
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
formatter = {
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package =
|
||||||
|
{ system }:
|
||||||
|
let
|
||||||
|
eval = inputs.treefmt.lib.evalModule inputs.nixpkgs.legacyPackages.${system} ./treefmt.nix;
|
||||||
|
in
|
||||||
|
eval.config.build.wrapper;
|
||||||
|
};
|
||||||
|
__allPackages =
|
||||||
|
let
|
||||||
|
all-packages = builtins.attrValues (
|
||||||
|
builtins.removeAttrs config.packages [
|
||||||
|
"ci-check"
|
||||||
|
"__allPackages"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
all-packages' = lib.lists.flatten (map (pkg: builtins.attrValues pkg.result) all-packages);
|
||||||
|
|
||||||
|
nixos-systems = builtins.attrValues config.systems.nixos;
|
||||||
|
nixos-systems' = map (system: system.result.config.system.build.toplevel) nixos-systems;
|
||||||
|
|
||||||
|
darwin-systems = builtins.attrValues config.systems.darwin;
|
||||||
|
darwin-systems' = map (system: system.result.config.system.build.toplevel) darwin-systems;
|
||||||
|
|
||||||
|
all-drvs = all-packages' ++ nixos-systems' ++ darwin-systems';
|
||||||
|
all-drvs' = lib.strings.concatMapSep "\n" builtins.unsafeDiscardStringContext all-drvs;
|
||||||
|
in
|
||||||
|
mkPackage (
|
||||||
|
{ runCommand }:
|
||||||
|
runCommand "eval-check" {
|
||||||
|
allDerivations = all-drvs';
|
||||||
|
passAsFile = [ "allDerivations" ];
|
||||||
|
} "touch $out"
|
||||||
|
);
|
||||||
|
ci-check = mkPackage (
|
||||||
|
{
|
||||||
|
writeShellScript,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
}:
|
||||||
|
writeShellScript "ci-check" ''
|
||||||
|
nix-instantiate --eval -E 'import ./nilla.nix {}' -A packages.__allPackages.result.${system}.outPath
|
||||||
|
"${lib.getExe config.packages.formatter.result.${system}}" --ci
|
||||||
|
''
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
config.shells.default = {
|
config.shells.default = {
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
builder = "nixpkgs-flake";
|
builder = "nixpkgs-flake";
|
||||||
shell =
|
shell =
|
||||||
{ mkShell, hello }:
|
{
|
||||||
mkShell {
|
mkShellNoCC,
|
||||||
packages = [ hello ];
|
system,
|
||||||
|
nh,
|
||||||
|
}:
|
||||||
|
mkShellNoCC {
|
||||||
|
packages = [
|
||||||
|
config.packages.agenix.result.${system}
|
||||||
|
config.packages.attic-client.result.${system}
|
||||||
|
nh
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fenix,
|
|
||||||
crane,
|
|
||||||
src,
|
src,
|
||||||
libiconv,
|
libiconv,
|
||||||
rocksdb,
|
rocksdb,
|
||||||
|
@ -10,27 +8,18 @@
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
rust =
|
manifest = (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml")).package;
|
||||||
with fenix;
|
|
||||||
combine [
|
|
||||||
stable.cargo
|
|
||||||
stable.rustc
|
|
||||||
];
|
|
||||||
crane' = crane.overrideToolchain rust;
|
|
||||||
rocksdb' = rocksdb.overrideAttrs (
|
|
||||||
final: prev: {
|
|
||||||
version = "9.1.1";
|
|
||||||
src = prev.src.override {
|
|
||||||
rev = "v${final.version}";
|
|
||||||
hash = "sha256-/Xf0bzNJPclH9IP80QNaABfhj4IAR5LycYET18VFCXc=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
crane'.buildPackage {
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = manifest.name;
|
||||||
|
inherit (manifest) version;
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
useFetchCargoVendor = true;
|
||||||
|
cargoHash = "sha256-wESDxtKRMm/jyCr4kc20UuHGcE2s+OCMjfL+l1XihnA=";
|
||||||
|
|
||||||
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [
|
buildInputs = lib.optionals stdenv.isDarwin [
|
||||||
|
@ -40,8 +29,8 @@ crane'.buildPackage {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use system RocksDB
|
# Use system RocksDB
|
||||||
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
|
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
||||||
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
|
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||||
NIX_OUTPATH_USED_AS_RANDOM_SEED = "randomseed";
|
NIX_OUTPATH_USED_AS_RANDOM_SEED = "randomseed";
|
||||||
CONDUIT_VERSION_EXTRA = src.shortRev;
|
CONDUIT_VERSION_EXTRA = src.shortRev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,72 @@
|
||||||
{ inputs, ... }:
|
|
||||||
{
|
{
|
||||||
perSystem =
|
config,
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
inputs',
|
inputs,
|
||||||
...
|
}:
|
||||||
}:
|
let
|
||||||
{
|
systems = [
|
||||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
builder = "nixpkgs-flake";
|
||||||
|
mkPackage = package: {
|
||||||
|
inherit systems package builder;
|
||||||
|
};
|
||||||
|
atticPkgs = lib.attrs.generate systems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.lix-module.overlays.default;
|
||||||
|
craneLib = import inputs.crane { inherit pkgs; };
|
||||||
|
in
|
||||||
|
pkgs.callPackage "${inputs.attic}/crane.nix" { inherit craneLib; }
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config.packages.conduit-next = {
|
||||||
|
inherit systems builder;
|
||||||
|
package = import ./conduit;
|
||||||
|
settings.args = {
|
||||||
src = inputs.conduit-src;
|
src = inputs.conduit-src;
|
||||||
crane = inputs.crane.mkLib pkgs;
|
};
|
||||||
fenix = inputs'.fenix.packages;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.git-commit-last = pkgs.writeShellApplication {
|
config.packages.git-commit-last = mkPackage (
|
||||||
|
{ writeShellApplication }:
|
||||||
|
writeShellApplication {
|
||||||
name = "git-commit-last";
|
name = "git-commit-last";
|
||||||
text = ''
|
text = ''
|
||||||
GITDIR="$(git rev-parse --git-dir)"
|
GITDIR="$(git rev-parse --git-dir)"
|
||||||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||||
'';
|
'';
|
||||||
};
|
}
|
||||||
|
);
|
||||||
|
|
||||||
packages.git-fixup = pkgs.writeShellApplication {
|
config.packages.git-fixup = mkPackage (
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
writeShellApplication,
|
||||||
|
fzf,
|
||||||
|
}:
|
||||||
|
writeShellApplication {
|
||||||
name = "git-fixup";
|
name = "git-fixup";
|
||||||
text = ''
|
text = ''
|
||||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||||
${lib.getExe pkgs.fzf} | \
|
${lib.getExe fzf} | \
|
||||||
cut -c -7 | \
|
cut -c -7 | \
|
||||||
xargs -o git commit --fixup
|
xargs -o git commit --fixup
|
||||||
'';
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
config.packages.attic-client = {
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package = { system }: atticPkgs.${system}.attic-client;
|
||||||
};
|
};
|
||||||
|
config.packages.attic-server = {
|
||||||
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package = { system }: atticPkgs.${system}.attic-server;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
services.attic =
|
config.services.attic =
|
||||||
let
|
let
|
||||||
atticPort = 9476;
|
atticPort = 9476;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
host = "kazuki";
|
host = "kazuki";
|
||||||
ports = [ atticPort ];
|
ports = [ atticPort ];
|
||||||
config =
|
module =
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
age.secrets.attic-creds = {
|
age.secrets.attic-creds = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
includes = [
|
||||||
./attic.nix
|
./attic.nix
|
||||||
./forgejo-runner.nix
|
./forgejo-runner.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
services.forgejo-runner = {
|
config.services.forgejo-runner = {
|
||||||
hosts = [
|
hosts = [
|
||||||
"ude"
|
"ude"
|
||||||
"youko"
|
"youko"
|
||||||
];
|
];
|
||||||
config =
|
module =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
services.forgejo = {
|
config.services.forgejo = {
|
||||||
host = "kazuki";
|
host = "kazuki";
|
||||||
ports = [ 3000 ];
|
ports = [ 3000 ];
|
||||||
config =
|
module =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
age.secrets.rab-lol-cf = {
|
age.secrets.rab-lol-cf = {
|
||||||
|
|
23
treefmt.nix
Normal file
23
treefmt.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
projectRootFile = "nilla.nix";
|
||||||
|
programs.deadnix.enable = true;
|
||||||
|
programs.nixfmt.enable = true;
|
||||||
|
programs.statix.enable = true;
|
||||||
|
programs.fish_indent.enable = true;
|
||||||
|
programs.deno.enable = true;
|
||||||
|
programs.stylua.enable = true;
|
||||||
|
programs.shfmt.enable = true;
|
||||||
|
settings.global.excludes = [
|
||||||
|
# agenix
|
||||||
|
"*.age"
|
||||||
|
|
||||||
|
# racket
|
||||||
|
"*.rkt"
|
||||||
|
"**/rashrc"
|
||||||
|
|
||||||
|
# custom assets
|
||||||
|
"*.png"
|
||||||
|
"*.svg"
|
||||||
|
];
|
||||||
|
settings.on-unmatched = "fatal";
|
||||||
|
}
|
|
@ -1,10 +1,18 @@
|
||||||
{ inputs, ... }:
|
|
||||||
{
|
{
|
||||||
perSystem =
|
lib,
|
||||||
{ pkgs, inputs', ... }:
|
config,
|
||||||
let
|
inputs,
|
||||||
wrapped = inputs.wrapper-manager-hm-compat.lib {
|
}:
|
||||||
inherit pkgs;
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
wrappedPerSystem = lib.attrs.generate systems (
|
||||||
|
system:
|
||||||
|
inputs.wrapper-manager-hm-compat.lib {
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
modules = [
|
modules = [
|
||||||
./starship
|
./starship
|
||||||
./helix
|
./helix
|
||||||
|
@ -13,13 +21,16 @@
|
||||||
./fish
|
./fish
|
||||||
./wezterm
|
./wezterm
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = { inherit inputs; };
|
||||||
inherit inputs inputs';
|
}
|
||||||
};
|
);
|
||||||
};
|
wrappedPerSystem' = builtins.mapAttrs (_: wrapped: wrapped.config.build.packages) wrappedPerSystem;
|
||||||
all-packages = wrapped.config.build.packages;
|
wrapperNames = builtins.attrNames wrappedPerSystem'."x86_64-linux";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = all-packages;
|
config.packages = lib.attrs.generate wrapperNames (wrapper: {
|
||||||
};
|
inherit systems;
|
||||||
|
builder = "custom-load";
|
||||||
|
package = { system }: wrappedPerSystem'.${system}.${wrapper};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, inputs', ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs'.helix.packages.default;
|
package = inputs.helix.packages.${pkgs.system}.default;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "base16_default_dark";
|
theme = "base16_default_dark";
|
||||||
editor = {
|
editor = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs',
|
inputs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
rev = "8eb52c163d6ea7c3cec2cc6b1011ce00738942e1";
|
rev = "8eb52c163d6ea7c3cec2cc6b1011ce00738942e1";
|
||||||
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
hash = "sha256-1yU0ZUBQqYEn85j4T2pLs02MTyJnO5BbYALIa88iomY=";
|
||||||
};
|
};
|
||||||
racket-with-libs = inputs'.racket.packages.racket.newLayer {
|
racket-with-libs = inputs.racket.packages.${pkgs.system}.racket.newLayer {
|
||||||
withRacketPackages =
|
withRacketPackages =
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
readline-gpl
|
readline-gpl
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue