Compare commits

..

No commits in common. "90b369ab7b38bc46d1dfdeca67b0b36c0077b809" and "7d8caeb48be2f334872fdaa40641a2931510fe06" have entirely different histories.

4 changed files with 39 additions and 47 deletions

View file

@ -363,11 +363,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1730330432,
"narHash": "sha256-IfwPXZNjQlToqV37RjUhm9dofHaqZD3BTB4J111OmGQ=",
"lastModified": 1730282458,
"narHash": "sha256-J7DTSBuWRtcWy8ivmj8fXl5ovQLCH3t+Y6o+EQkRk5U=",
"ref": "refs/heads/main",
"rev": "7c7a84ff60f8c1e00c6a0de3f7656f0bbd933d56",
"revCount": 5395,
"rev": "5f721dce36651232ae245d872c17dfa3aae5cc6c",
"revCount": 5391,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland/"
@ -543,11 +543,11 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1730328739,
"narHash": "sha256-qs7u2nCwfEV93SKV1QSikOwRbHDEA1CWYZiVKI9Hhxk=",
"rev": "beb193d1e2121cdbd51e8309572522ee9a841395",
"lastModified": 1730300203,
"narHash": "sha256-NbqHiXQW8IMUPME49Z2pjSqTW8t+FoEWMmXSZNubfeQ=",
"rev": "8b2f8d538b0e5702fc48e8b60c2952aff847b9f1",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/beb193d1e2121cdbd51e8309572522ee9a841395.tar.gz?rev=beb193d1e2121cdbd51e8309572522ee9a841395"
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8b2f8d538b0e5702fc48e8b60c2952aff847b9f1.tar.gz?rev=8b2f8d538b0e5702fc48e8b60c2952aff847b9f1"
},
"original": {
"type": "tarball",
@ -836,11 +836,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1730337937,
"narHash": "sha256-CCjeZD8RpgDUBlVtfwGHwjz6pNZm9287mKy47mIxLlQ=",
"lastModified": 1730229503,
"narHash": "sha256-SYFUfTXsDeIK3q7fy6SrZ1v+lVQrEmZaKc1fpp4wuBQ=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "1bb7ec644d299edf5b88fd2dc67042d14c6638ae",
"rev": "d3bb51e62dd4a31c7cfea0f1ad511e53774a79fe",
"type": "github"
},
"original": {
@ -1245,11 +1245,11 @@
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1730325917,
"narHash": "sha256-Ku8nypKSmPSIpqfubsnjqFDBnF9m5Pw+9sXHMmZbyFY=",
"lastModified": 1728748726,
"narHash": "sha256-j3Xog0klIwnfgtOi7BGT9kMLlo+5CMtrW1UUlbNIl+U=",
"ref": "refs/heads/main",
"rev": "aa0dbe4d05b3109b947f8bd0444228a800f55dc6",
"revCount": 18,
"rev": "7a775d5ab97a82066bd12f9a9beb4ead5d7a1c8a",
"revCount": 17,
"type": "git",
"url": "https://git.dayl.in/daylin/utils.git"
},
@ -1308,11 +1308,11 @@
]
},
"locked": {
"lastModified": 1730334608,
"narHash": "sha256-NT/xmtGvwkiFfDC+FdIThG387OakQS0hnnT3etJbbNE=",
"lastModified": 1730290305,
"narHash": "sha256-4znqGX/WlF1u/dWi3xUb5mCdmzU3sLN059lzclt3+dE=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "0802240ae001576ebf9cf0bbc003a8b1291c910b",
"rev": "8abb78710aa4f1cd468953ded410d0711379fada",
"type": "github"
},
"original": {

View file

@ -53,12 +53,14 @@
"https://hyprland.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://daylin.cachix.org"
# "https://cache.lix.systems"
];
extra-trusted-public-keys = [
"oizys:DSw3mwVMM/Y+PXSVpkDlU5dLwlORuiJRGPkwr5INSMc="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
# "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
];
};
}

View file

@ -75,17 +75,5 @@ in
nix.settings = {
trusted-users = [ "@wheel" ];
accept-flake-config = true;
extra-substituters = [
"https://attic.dayl.in/oizys"
"https://hyprland.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://daylin.cachix.org"
];
extra-trusted-public-keys = [
"oizys:DSw3mwVMM/Y+PXSVpkDlU5dLwlORuiJRGPkwr5INSMc="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
];
};
}

View file

@ -16,7 +16,7 @@ proc nixCommand(cmd: string): string =
proc nixosConfigAttrs*(): seq[string] =
for host in getHosts():
result.add getFlake() & "#nixosConfigurations." & host & ".config.system.build.toplevel"
result.add fmt"{getFlake()}#nixosConfigurations.{host}.config.system.build.toplevel"
const nixosSubcmds* =
"""switch boot test build dry-build dry-activate edit
@ -245,29 +245,31 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
info "nothing to build"
quit "exiting...", QuitSuccess
var outs: seq[string]
for drv in drvs:
var cmd = "nix build"
cmd.addArg drv
cmd.addArg "--no-link"
cmd.addArg "--print-out-paths"
cmd.addArgs rest
let (path, _, buildCode) = runCmdCapt(cmd)
if buildCode != 0:
# TODO: propagate errors using nix log?
let buildErr = runCmd(cmd)
if buildErr != 0:
error "failed to build: " & drv
continue
outs &= path.strip().splitLines()
let results = collect(
for k, p in walkDir(".", relative = true):
if k in { pcLinkToDir, pcLinkToFile} and p.startsWith("result"):
p
)
var cmd = service
cmd = service
cmd.addArg "push"
cmd.addArg name
cmd.addArg "--jobs"
cmd.addArg $jobs
cmd.addArgs outs
cmd.addArgs results
let pushErr = runCmd(cmd)
if pushErr != 0:
errorQuit "failed to push build to cache"
for p in results:
removeFile p