Compare commits

..

5 commits

Author SHA1 Message Date
90b369ab7b flake.lock: Update
Flake lock file updates:

• Updated input 'hyprland':
    'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=5f721dce36651232ae245d872c17dfa3aae5cc6c' (2024-10-30)
  → 'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=7c7a84ff60f8c1e00c6a0de3f7656f0bbd933d56' (2024-10-30)
• Updated input 'lix':
    '8b2f8d538b.tar.gz?narHash=sha256-NbqHiXQW8IMUPME49Z2pjSqTW8t%2BFoEWMmXSZNubfeQ%3D&rev=8b2f8d538b0e5702fc48e8b60c2952aff847b9f1' (2024-10-30)
  → 'beb193d1e2.tar.gz?narHash=sha256-qs7u2nCwfEV93SKV1QSikOwRbHDEA1CWYZiVKI9Hhxk%3D&rev=beb193d1e2121cdbd51e8309572522ee9a841395' (2024-10-30)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/d3bb51e62dd4a31c7cfea0f1ad511e53774a79fe' (2024-10-29)
  → 'github:nix-community/nixpkgs-wayland/1bb7ec644d299edf5b88fd2dc67042d14c6638ae' (2024-10-31)
• Updated input 'utils':
    'git+https://git.dayl.in/daylin/utils.git?ref=refs/heads/main&rev=7a775d5ab97a82066bd12f9a9beb4ead5d7a1c8a' (2024-10-12)
  → 'git+https://git.dayl.in/daylin/utils.git?ref=refs/heads/main&rev=aa0dbe4d05b3109b947f8bd0444228a800f55dc6' (2024-10-30)
• Updated input 'zig-overlay':
    'github:mitchellh/zig-overlay/8abb78710aa4f1cd468953ded410d0711379fada' (2024-10-30)
  → 'github:mitchellh/zig-overlay/0802240ae001576ebf9cf0bbc003a8b1291c910b' (2024-10-31)
2024-10-31 03:24:37 +00:00
f17c9fde3f
split outputs 2024-10-30 22:21:52 -05:00
42933ae97c
strip output 2024-10-30 21:26:41 -05:00
3c730fb6f1
rework cache build 2024-10-30 17:12:52 -05:00
4a5cae6ee1
not sure how to convince nix so I'll just suffer 2024-10-30 16:03:25 -05:00
4 changed files with 47 additions and 39 deletions

View file

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

View file

@ -53,14 +53,12 @@
"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,5 +75,17 @@ 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 fmt"{getFlake()}#nixosConfigurations.{host}.config.system.build.toplevel" result.add 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,31 +245,29 @@ 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 buildErr = runCmd(cmd) let (path, _, buildCode) = runCmdCapt(cmd)
if buildErr != 0: if buildCode != 0:
# TODO: propagate errors using nix log?
error "failed to build: " & drv error "failed to build: " & drv
continue continue
let results = collect( outs &= path.strip().splitLines()
for k, p in walkDir(".", relative = true):
if k in { pcLinkToDir, pcLinkToFile} and p.startsWith("result"):
p
)
cmd = service var 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 results cmd.addArgs outs
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