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

View file

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

View file

@ -75,17 +75,5 @@ in
nix.settings = { nix.settings = {
trusted-users = [ "@wheel" ]; trusted-users = [ "@wheel" ];
accept-flake-config = true; 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] = proc nixosConfigAttrs*(): seq[string] =
for host in getHosts(): 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* = const nixosSubcmds* =
"""switch boot test build dry-build dry-activate edit """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" info "nothing to build"
quit "exiting...", QuitSuccess quit "exiting...", QuitSuccess
var outs: seq[string]
for drv in drvs: for drv in drvs:
var cmd = "nix build" var cmd = "nix build"
cmd.addArg drv cmd.addArg drv
cmd.addArg "--no-link"
cmd.addArg "--print-out-paths"
cmd.addArgs rest cmd.addArgs rest
let (path, _, buildCode) = runCmdCapt(cmd) let buildErr = runCmd(cmd)
if buildCode != 0: if buildErr != 0:
# TODO: propagate errors using nix log?
error "failed to build: " & drv error "failed to build: " & drv
continue 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 "push"
cmd.addArg name cmd.addArg name
cmd.addArg "--jobs" cmd.addArg "--jobs"
cmd.addArg $jobs cmd.addArg $jobs
cmd.addArgs outs cmd.addArgs results
let pushErr = runCmd(cmd) let pushErr = runCmd(cmd)
if pushErr != 0: if pushErr != 0:
errorQuit "failed to push build to cache" errorQuit "failed to push build to cache"
for p in results:
removeFile p