Compare commits

...

7 commits

Author SHA1 Message Date
ddcc88fd17
add system-path to build 2024-06-19 14:03:14 -05:00
22c9a5b420
update cli help 2024-06-19 13:48:45 -05:00
0de625b08b
make sudo even quieter 2024-06-19 12:26:00 -05:00
7f2a9e86a7
update lix to rc1 2024-06-19 12:07:34 -05:00
b81365271f
formatting 2024-06-19 12:02:54 -05:00
9186446e90
follow 2024-06-19 11:58:24 -05:00
b188f9fac1
use hashed password 2024-06-19 11:49:37 -05:00
13 changed files with 120 additions and 121 deletions

View file

@ -40,7 +40,7 @@ runs:
if [[ "${{ inputs.purge-packages }}" == 'true' ]]; then if [[ "${{ inputs.purge-packages }}" == 'true' ]]; then
sudo apt-get purge \ sudo apt-get purge \
--allow-remove-essential \ --allow-remove-essential \
-q \ -qq \
$(non_manifest_packages) & $(non_manifest_packages) &
fi fi

View file

@ -55,6 +55,7 @@ Available Commands:
boot nixos rebuild boot boot nixos rebuild boot
build nix build build nix build
cache build and push to cachix cache build and push to cachix
checks nix build checks
ci offload build to GHA ci offload build to GHA
dry poor man's nix flake check dry poor man's nix flake check
help Help about any command help Help about any command

View file

@ -281,11 +281,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718368322, "lastModified": 1718450675,
"narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=", "narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df", "rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -305,11 +305,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1718723174, "lastModified": 1718815000,
"narHash": "sha256-cPIOblG2H8Z934FPeuU0I6kI1Ke8ZbF330Nq/hTJ2uU=", "narHash": "sha256-n7P4frE8d3gLegiKrjhI/mOf+I4H7PuCeVZ2BN9pI8A=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "236150b3c5227bbfbe46d2610c739a386afdca1f", "rev": "c1e21719a2fff2fa9549f00053ac40173da54af9",
"revCount": 4859, "revCount": 4868,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland/" "url": "https://github.com/hyprwm/Hyprland/"
@ -352,11 +352,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1691753796, "lastModified": 1714869498,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -426,11 +426,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718271409, "lastModified": 1718804078,
"narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=", "narHash": "sha256-CqRZne63BpYlPd/i8lXV0UInUt59oKogiwdVtBRHt60=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e", "rev": "4f1351295c55a8f51219b25aa4a6497a067989d0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -498,16 +498,16 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1714955862, "lastModified": 1718419213,
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=", "narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
"ref": "refs/tags/2.90-beta.1", "ref": "refs/tags/2.90.0-rc1",
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c", "rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
"revCount": 15501, "revCount": 15780,
"type": "git", "type": "git",
"url": "https://git@git.lix.systems/lix-project/lix" "url": "https://git@git.lix.systems/lix-project/lix"
}, },
"original": { "original": {
"ref": "refs/tags/2.90-beta.1", "ref": "refs/tags/2.90.0-rc1",
"type": "git", "type": "git",
"url": "https://git@git.lix.systems/lix-project/lix" "url": "https://git@git.lix.systems/lix-project/lix"
} }
@ -519,14 +519,16 @@
"lix": [ "lix": [
"lix" "lix"
], ],
"nixpkgs": "nixpkgs_4" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1717647344, "lastModified": 1718778751,
"narHash": "sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4=", "narHash": "sha256-DdcMvX9r29uHMlz7P1Shgs5xZw9WkZ4ObMGYzwROAiw=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "4e25f1ab68f2270f9cff59216056c21073db0164", "rev": "909e593ae9f5fe338ab19b4ed9d52bb0ea09bad8",
"revCount": 87, "revCount": 90,
"type": "git", "type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module" "url": "https://git.lix.systems/lix-project/nixos-module"
}, },
@ -539,7 +541,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_6",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -627,7 +629,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1718710563, "lastModified": 1718710563,
@ -679,14 +681,14 @@
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"lib-aggregate": "lib-aggregate", "lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs", "nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1718727726, "lastModified": 1718749042,
"narHash": "sha256-WIoMGbYpJMc9TTPeJeoGXRw5KaUkqDVMmtQp412ThOk=", "narHash": "sha256-zhxg/ZnMESAuDMK+Aps79cHcH/A8ER6fyoLP0fr3Qtg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "7a80040b517fdfcf8a97749b58afc47bbea4b8c8", "rev": "0b50a0bf6bdd0b0744a171a94b7754c3d092e939",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -697,11 +699,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1718530797,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -728,22 +730,6 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1716769173,
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1718437845, "lastModified": 1718437845,
"narHash": "sha256-ZT7Oc1g4I4pHVGGjQFnewFVDRLH5cIZhEzODLz9YXeY=", "narHash": "sha256-ZT7Oc1g4I4pHVGGjQFnewFVDRLH5cIZhEzODLz9YXeY=",
@ -759,7 +745,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1718606988, "lastModified": 1718606988,
"narHash": "sha256-pmjP5ePc1jz+Okona3HxD7AYT0wbrCwm9bXAlj08nDM=", "narHash": "sha256-pmjP5ePc1jz+Okona3HxD7AYT0wbrCwm9bXAlj08nDM=",
@ -775,7 +761,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1715037484, "lastModified": 1715037484,
"narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=", "narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=",
@ -791,7 +777,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1718530797, "lastModified": 1718530797,
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
@ -807,7 +793,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1714076141, "lastModified": 1714076141,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", "narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
@ -825,15 +811,15 @@
}, },
"pixi": { "pixi": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_8",
"pixi-source": "pixi-source" "pixi-source": "pixi-source"
}, },
"locked": { "locked": {
"lastModified": 1718303061, "lastModified": 1718732897,
"narHash": "sha256-9kgLO6kWRc/3gGEva/Pdy3dCpL25KZ44pxgt+3NG78c=", "narHash": "sha256-VMxOQWs7c7A5/YV6ZApLwOwHUiH8CS9C3V8KeN9NeqA=",
"owner": "daylinmorgan", "owner": "daylinmorgan",
"repo": "pixi-flake", "repo": "pixi-flake",
"rev": "25b23c0b7cfeba6970f3e7e5dfdfe27eb60bffd4", "rev": "f06ebb992e0c8dddcf353f06cfae5fa5015f5c33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -845,16 +831,16 @@
"pixi-source": { "pixi-source": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1718205766, "lastModified": 1718376652,
"narHash": "sha256-24sahgBaWlbbOfaqyMJiow3S1KwMsgo0hYu7Z5WpMlE=", "narHash": "sha256-Qlr4CcrCq29ig3FPFWCR5oOtFrbREm/7zyGXUB3XL98=",
"owner": "prefix-dev", "owner": "prefix-dev",
"repo": "pixi", "repo": "pixi",
"rev": "234472ae4ee80ef12f659cfc85f247f78974f293", "rev": "84b1322ed07bb1adf6516c33dce4ab5a5703e7d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "prefix-dev", "owner": "prefix-dev",
"ref": "v0.24.1", "ref": "v0.24.2",
"repo": "pixi", "repo": "pixi",
"type": "github" "type": "github"
} }
@ -870,11 +856,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1718490961, "lastModified": 1718788674,
"narHash": "sha256-ZZT4rpqs9mccmXPR/st4Lpql650iKDuLn2ZafnXSqeU=", "narHash": "sha256-qR0lOtyOSbSQ2kyfNm2ppDU0soQVwFK80sYwpEBsRGQ=",
"owner": "roc-lang", "owner": "roc-lang",
"repo": "roc", "repo": "roc",
"rev": "41ea2bfbc7db8109d7c6ed08f84b571592f801d5", "rev": "9072d75aa9aa125b8a4a1a713fe59a7daa3efdd2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -893,7 +879,7 @@
"lix-module": "lix-module", "lix-module": "lix-module",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_5",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"pixi": "pixi", "pixi": "pixi",
"roc": "roc", "roc": "roc",
@ -1125,11 +1111,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718272114, "lastModified": 1718619174,
"narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=", "narHash": "sha256-FWW68AVYmB91ZDQnhLMBNCUUTCjb1ZpO2k2KIytHtkA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d", "rev": "c7894aa54f9a7dbd16df5cd24d420c8af22d5623",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1169,11 +1155,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718673535, "lastModified": 1718759946,
"narHash": "sha256-KCHMePFrijSscQt6A4rtRJxciOaQXgHyGpqi9dzdy8E=", "narHash": "sha256-wSLldChPddiGLATXeT9qUuvIYROt0vJtgMZfTmiUlaM=",
"owner": "Cloudef", "owner": "Cloudef",
"repo": "zig2nix", "repo": "zig2nix",
"rev": "60a6e8d97759da986a488528d86548f611c89edb", "rev": "a47d01e559d71020293ac3515ebaeb7ea02cc0c1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1193,11 +1179,11 @@
"zig-overlay": "zig-overlay" "zig-overlay": "zig-overlay"
}, },
"locked": { "locked": {
"lastModified": 1718724404, "lastModified": 1718808820,
"narHash": "sha256-BnXu0u0H74cyVOEneESQoCqMCf9zgSrkSx2QVuYztVY=", "narHash": "sha256-uTwU9NxKfP6tbhVuRajLxpVJENaw71FCLvElba7TZ5M=",
"owner": "zigtools", "owner": "zigtools",
"repo": "zls", "repo": "zls",
"rev": "cfea2d55798418cccdf27b1b1bde0f70bff1b8f2", "rev": "6d0eac599352df8eeebd0acab4a51ba05e587cc7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,38 +6,50 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
stable.url = "github:nixos/nixpkgs/nixos-23.11"; stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
lix.url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
lix.flake = false;
lix-module.url = "git+https://git.lix.systems/lix-project/nixos-module";
lix-module.inputs.lix.follows = "lix";
# lix-module.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.url = "github:nix-community/NixOS-WSL"; nixos-wsl.url = "github:nix-community/NixOS-WSL";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90.0-rc1";
flake = false;
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs = {
lix.follows = "lix";
nixpkgs.follows = "nixpkgs";
};
};
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1"; hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
hyprland-contrib.url = "github:hyprwm/contrib"; hyprland-contrib.url = "github:hyprwm/contrib";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nix-index-database.url = "github:nix-community/nix-index-database"; zig2nix = {
nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; url = "github:Cloudef/zig2nix";
inputs.nixpkgs.follows = "nixpkgs";
zig2nix.url = "github:Cloudef/zig2nix"; };
zig2nix.inputs.nixpkgs.follows = "nixpkgs"; zls = {
zls.url = "github:zigtools/zls"; url = "github:zigtools/zls";
zls.inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
};
roc.url = "github:roc-lang/roc"; roc = {
roc.inputs.nixpkgs.follows = "nixpkgs"; url = "github:roc-lang/roc";
inputs.nixpkgs.follows = "nixpkgs";
tsm.url = "github:daylinmorgan/tsm?dir=nix"; };
tsm.inputs.nixpkgs.follows = "nixpkgs";
hyprman.url = "git+https://git.dayl.in/daylin/hyprman.git";
hyprman.inputs.nixpkgs.follows = "nixpkgs";
f1multiviewer.url = "github:daylinmorgan/f1multiviewer-flake";
pixi.url = "github:daylinmorgan/pixi-flake"; pixi.url = "github:daylinmorgan/pixi-flake";
f1multiviewer.url = "github:daylinmorgan/f1multiviewer-flake";
tsm = {
url = "github:daylinmorgan/tsm?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprman = {
url = "git+https://git.dayl.in/daylin/hyprman.git";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
nixConfig = { nixConfig = {

View file

@ -8,9 +8,7 @@
}: }:
mkOizysModule config "hyprland" { mkOizysModule config "hyprland" {
programs.hyprland = enabled; #// { programs.hyprland = enabled;
# package = inputs.hyprland.packages.${pkgs.system}.default;
# };
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
# Optional, hint electron apps to use wayland: # Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";

View file

@ -26,7 +26,7 @@ in
"wheel" # sudo "wheel" # sudo
"docker" "docker"
]; ];
initialPassword = "nix"; initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
]; ];

View file

@ -15,4 +15,5 @@ var buildCmd = &cobra.Command{
func init() { func init() {
rootCmd.AddCommand(buildCmd) rootCmd.AddCommand(buildCmd)
buildCmd.Flags().BoolVar(&nom, "nom", false, "display result with nom") buildCmd.Flags().BoolVar(&nom, "nom", false, "display result with nom")
buildCmd.Flags().BoolVar(&systemPath, "system-path", false, "show system-path drv")
} }

View file

@ -3,9 +3,10 @@ package cmd
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
// gh workflow run build.yml -F lockFile=@flake.lock // gh workflow run build.yml -F lockFile=@flake.lock
var ciCmd= &cobra.Command{ var ciCmd = &cobra.Command{
Use: "ci", Use: "ci",
Short: "offload build to GHA", Short: "offload build to GHA",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
@ -13,7 +14,6 @@ var ciCmd= &cobra.Command{
}, },
} }
func init() { func init() {
rootCmd.AddCommand(ciCmd) rootCmd.AddCommand(ciCmd)

View file

@ -12,7 +12,6 @@ var dryCmd = &cobra.Command{
}, },
} }
func init() { func init() {
rootCmd.AddCommand(dryCmd) rootCmd.AddCommand(dryCmd)

View file

@ -14,7 +14,6 @@ var outputCmd = &cobra.Command{
}, },
} }
func init() { func init() {
rootCmd.AddCommand(outputCmd) rootCmd.AddCommand(outputCmd)
outputCmd.Flags().BoolVar(&systemPath, "system-path", false, "show system-path drv") outputCmd.Flags().BoolVar(&systemPath, "system-path", false, "show system-path drv")

View file

@ -13,7 +13,7 @@ let
in in
buildGoModule { buildGoModule {
pname = "oizys"; pname = "oizys";
version = "d${mkDate self.lastModifiedDate}"; version = "${self.shortRev or "dirty"}";
src = cleanSource ./.; src = cleanSource ./.;
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI="; vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";

View file

@ -62,7 +62,8 @@ func parseSystemPath(derivation map[string]Derivation) (string, error) {
// nix derivation show `oizys output` | jq -r '.[].inputDrvs | with_entries(select(.key|match("system-path";"i"))) | keys | .[]' // nix derivation show `oizys output` | jq -r '.[].inputDrvs | with_entries(select(.key|match("system-path";"i"))) | keys | .[]'
func (o *Oizys) getSystemPath() string { func (o *Oizys) getSystemPath() string {
cmd := exec.Command("nix", "derivation", "show", o.nixosConfigAttr()) cmd := exec.Command("nix", "derivation", "show", o.nixosConfigAttr())
log.Info("evaluating to get system-path") logCmd(cmd)
// TODO: add spinner?
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr
out, err := cmd.Output() out, err := cmd.Output()
if err != nil { if err != nil {
@ -189,6 +190,9 @@ func (p *packages) summary() {
Render(fmt.Sprint(len(p.names))), Render(fmt.Sprint(len(p.names))),
) )
} }
func logCmd(cmd *exec.Cmd) {
log.Debugf("CMD: %s", strings.Join(cmd.Args, " "))
}
func (o *Oizys) git(rest ...string) *exec.Cmd { func (o *Oizys) git(rest ...string) *exec.Cmd {
args := []string{"-C", o.flake} args := []string{"-C", o.flake}
@ -256,10 +260,6 @@ func showDryRunResult(nixOutput string, verbose bool) {
toFetch.show(verbose) toFetch.show(verbose)
} }
func logCmd(cmd *exec.Cmd) {
log.Debugf("CMD: %s %s", cmd.Path, strings.Join(cmd.Args, " "))
}
func (o *Oizys) NixDryRun(verbose bool, rest ...string) { func (o *Oizys) NixDryRun(verbose bool, rest ...string) {
args := []string{ args := []string{
"build", o.nixosConfigAttr(), "--dry-run", "build", o.nixosConfigAttr(), "--dry-run",
@ -288,11 +288,11 @@ func (o *Oizys) NixosRebuild(subcmd string, rest ...string) {
if o.verbose { if o.verbose {
cmd.Args = append(cmd.Args, "--print-build-logs") cmd.Args = append(cmd.Args, "--print-build-logs")
} }
logCmd(cmd)
runCommand(cmd) runCommand(cmd)
} }
func runCommand(cmd *exec.Cmd) { func runCommand(cmd *exec.Cmd) {
logCmd(cmd)
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
@ -308,6 +308,9 @@ func (o *Oizys) NixBuild(nom bool, rest ...string) {
cmdName = "nix" cmdName = "nix"
} }
cmd := exec.Command(cmdName, "build") cmd := exec.Command(cmdName, "build")
if o.systemPath {
cmd.Args = append(cmd.Args, fmt.Sprintf("%s^*", o.getSystemPath()))
}
cmd.Args = append(cmd.Args, rest...) cmd.Args = append(cmd.Args, rest...)
runCommand(cmd) runCommand(cmd)
} }