mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-25 20:50:44 -06:00
Compare commits
7 commits
52d79fd28c
...
ddcc88fd17
Author | SHA1 | Date | |
---|---|---|---|
ddcc88fd17 | |||
22c9a5b420 | |||
0de625b08b | |||
7f2a9e86a7 | |||
b81365271f | |||
9186446e90 | |||
b188f9fac1 |
13 changed files with 120 additions and 121 deletions
2
.github/actions/clean-disk/action.yml
vendored
2
.github/actions/clean-disk/action.yml
vendored
|
@ -40,7 +40,7 @@ runs:
|
|||
if [[ "${{ inputs.purge-packages }}" == 'true' ]]; then
|
||||
sudo apt-get purge \
|
||||
--allow-remove-essential \
|
||||
-q \
|
||||
-qq \
|
||||
$(non_manifest_packages) &
|
||||
fi
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ Available Commands:
|
|||
boot nixos rebuild boot
|
||||
build nix build
|
||||
cache build and push to cachix
|
||||
checks nix build checks
|
||||
ci offload build to GHA
|
||||
dry poor man's nix flake check
|
||||
help Help about any command
|
||||
|
|
134
flake.lock
134
flake.lock
|
@ -281,11 +281,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718368322,
|
||||
"narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=",
|
||||
"lastModified": 1718450675,
|
||||
"narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df",
|
||||
"rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -305,11 +305,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718723174,
|
||||
"narHash": "sha256-cPIOblG2H8Z934FPeuU0I6kI1Ke8ZbF330Nq/hTJ2uU=",
|
||||
"lastModified": 1718815000,
|
||||
"narHash": "sha256-n7P4frE8d3gLegiKrjhI/mOf+I4H7PuCeVZ2BN9pI8A=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "236150b3c5227bbfbe46d2610c739a386afdca1f",
|
||||
"revCount": 4859,
|
||||
"rev": "c1e21719a2fff2fa9549f00053ac40173da54af9",
|
||||
"revCount": 4868,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland/"
|
||||
|
@ -352,11 +352,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691753796,
|
||||
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||
"lastModified": 1714869498,
|
||||
"narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||
"rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -426,11 +426,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718271409,
|
||||
"narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=",
|
||||
"lastModified": 1718804078,
|
||||
"narHash": "sha256-CqRZne63BpYlPd/i8lXV0UInUt59oKogiwdVtBRHt60=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e",
|
||||
"rev": "4f1351295c55a8f51219b25aa4a6497a067989d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -498,16 +498,16 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714955862,
|
||||
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
|
||||
"revCount": 15501,
|
||||
"lastModified": 1718419213,
|
||||
"narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
|
||||
"ref": "refs/tags/2.90.0-rc1",
|
||||
"rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
|
||||
"revCount": 15780,
|
||||
"type": "git",
|
||||
"url": "https://git@git.lix.systems/lix-project/lix"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"ref": "refs/tags/2.90.0-rc1",
|
||||
"type": "git",
|
||||
"url": "https://git@git.lix.systems/lix-project/lix"
|
||||
}
|
||||
|
@ -519,14 +519,16 @@
|
|||
"lix": [
|
||||
"lix"
|
||||
],
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717647344,
|
||||
"narHash": "sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4=",
|
||||
"lastModified": 1718778751,
|
||||
"narHash": "sha256-DdcMvX9r29uHMlz7P1Shgs5xZw9WkZ4ObMGYzwROAiw=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "4e25f1ab68f2270f9cff59216056c21073db0164",
|
||||
"revCount": 87,
|
||||
"rev": "909e593ae9f5fe338ab19b4ed9d52bb0ea09bad8",
|
||||
"revCount": 90,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
},
|
||||
|
@ -539,7 +541,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -627,7 +629,7 @@
|
|||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718710563,
|
||||
|
@ -679,14 +681,14 @@
|
|||
"flake-compat": "flake-compat_2",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718727726,
|
||||
"narHash": "sha256-WIoMGbYpJMc9TTPeJeoGXRw5KaUkqDVMmtQp412ThOk=",
|
||||
"lastModified": 1718749042,
|
||||
"narHash": "sha256-zhxg/ZnMESAuDMK+Aps79cHcH/A8ER6fyoLP0fr3Qtg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "7a80040b517fdfcf8a97749b58afc47bbea4b8c8",
|
||||
"rev": "0b50a0bf6bdd0b0744a171a94b7754c3d092e939",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -697,11 +699,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1718318537,
|
||||
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
|
||||
"lastModified": 1718530797,
|
||||
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
|
||||
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -728,22 +730,6 @@
|
|||
}
|
||||
},
|
||||
"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": {
|
||||
"lastModified": 1718437845,
|
||||
"narHash": "sha256-ZT7Oc1g4I4pHVGGjQFnewFVDRLH5cIZhEzODLz9YXeY=",
|
||||
|
@ -759,7 +745,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1718606988,
|
||||
"narHash": "sha256-pmjP5ePc1jz+Okona3HxD7AYT0wbrCwm9bXAlj08nDM=",
|
||||
|
@ -775,7 +761,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1715037484,
|
||||
"narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=",
|
||||
|
@ -791,7 +777,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1718530797,
|
||||
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||
|
@ -807,7 +793,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1714076141,
|
||||
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
|
||||
|
@ -825,15 +811,15 @@
|
|||
},
|
||||
"pixi": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"pixi-source": "pixi-source"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718303061,
|
||||
"narHash": "sha256-9kgLO6kWRc/3gGEva/Pdy3dCpL25KZ44pxgt+3NG78c=",
|
||||
"lastModified": 1718732897,
|
||||
"narHash": "sha256-VMxOQWs7c7A5/YV6ZApLwOwHUiH8CS9C3V8KeN9NeqA=",
|
||||
"owner": "daylinmorgan",
|
||||
"repo": "pixi-flake",
|
||||
"rev": "25b23c0b7cfeba6970f3e7e5dfdfe27eb60bffd4",
|
||||
"rev": "f06ebb992e0c8dddcf353f06cfae5fa5015f5c33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -845,16 +831,16 @@
|
|||
"pixi-source": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718205766,
|
||||
"narHash": "sha256-24sahgBaWlbbOfaqyMJiow3S1KwMsgo0hYu7Z5WpMlE=",
|
||||
"lastModified": 1718376652,
|
||||
"narHash": "sha256-Qlr4CcrCq29ig3FPFWCR5oOtFrbREm/7zyGXUB3XL98=",
|
||||
"owner": "prefix-dev",
|
||||
"repo": "pixi",
|
||||
"rev": "234472ae4ee80ef12f659cfc85f247f78974f293",
|
||||
"rev": "84b1322ed07bb1adf6516c33dce4ab5a5703e7d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "prefix-dev",
|
||||
"ref": "v0.24.1",
|
||||
"ref": "v0.24.2",
|
||||
"repo": "pixi",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -870,11 +856,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718490961,
|
||||
"narHash": "sha256-ZZT4rpqs9mccmXPR/st4Lpql650iKDuLn2ZafnXSqeU=",
|
||||
"lastModified": 1718788674,
|
||||
"narHash": "sha256-qR0lOtyOSbSQ2kyfNm2ppDU0soQVwFK80sYwpEBsRGQ=",
|
||||
"owner": "roc-lang",
|
||||
"repo": "roc",
|
||||
"rev": "41ea2bfbc7db8109d7c6ed08f84b571592f801d5",
|
||||
"rev": "9072d75aa9aa125b8a4a1a713fe59a7daa3efdd2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -893,7 +879,7 @@
|
|||
"lix-module": "lix-module",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"pixi": "pixi",
|
||||
"roc": "roc",
|
||||
|
@ -1125,11 +1111,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718272114,
|
||||
"narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=",
|
||||
"lastModified": 1718619174,
|
||||
"narHash": "sha256-FWW68AVYmB91ZDQnhLMBNCUUTCjb1ZpO2k2KIytHtkA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d",
|
||||
"rev": "c7894aa54f9a7dbd16df5cd24d420c8af22d5623",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1169,11 +1155,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718673535,
|
||||
"narHash": "sha256-KCHMePFrijSscQt6A4rtRJxciOaQXgHyGpqi9dzdy8E=",
|
||||
"lastModified": 1718759946,
|
||||
"narHash": "sha256-wSLldChPddiGLATXeT9qUuvIYROt0vJtgMZfTmiUlaM=",
|
||||
"owner": "Cloudef",
|
||||
"repo": "zig2nix",
|
||||
"rev": "60a6e8d97759da986a488528d86548f611c89edb",
|
||||
"rev": "a47d01e559d71020293ac3515ebaeb7ea02cc0c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1193,11 +1179,11 @@
|
|||
"zig-overlay": "zig-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718724404,
|
||||
"narHash": "sha256-BnXu0u0H74cyVOEneESQoCqMCf9zgSrkSx2QVuYztVY=",
|
||||
"lastModified": 1718808820,
|
||||
"narHash": "sha256-uTwU9NxKfP6tbhVuRajLxpVJENaw71FCLvElba7TZ5M=",
|
||||
"owner": "zigtools",
|
||||
"repo": "zls",
|
||||
"rev": "cfea2d55798418cccdf27b1b1bde0f70bff1b8f2",
|
||||
"rev": "6d0eac599352df8eeebd0acab4a51ba05e587cc7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
64
flake.nix
64
flake.nix
|
@ -6,38 +6,50 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
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";
|
||||
|
||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
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-contrib.url = "github:hyprwm/contrib";
|
||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
zig2nix.url = "github:Cloudef/zig2nix";
|
||||
zig2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
zls.url = "github:zigtools/zls";
|
||||
zls.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
roc.url = "github:roc-lang/roc";
|
||||
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";
|
||||
zig2nix = {
|
||||
url = "github:Cloudef/zig2nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
zls = {
|
||||
url = "github:zigtools/zls";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
roc = {
|
||||
url = "github:roc-lang/roc";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
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 = {
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
}:
|
||||
|
||||
mkOizysModule config "hyprland" {
|
||||
programs.hyprland = enabled; #// {
|
||||
# package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
# };
|
||||
programs.hyprland = enabled;
|
||||
security.pam.services.swaylock = { };
|
||||
# Optional, hint electron apps to use wayland:
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
|
|
@ -26,7 +26,7 @@ in
|
|||
"wheel" # sudo
|
||||
"docker"
|
||||
];
|
||||
initialPassword = "nix";
|
||||
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
|
||||
];
|
||||
|
|
|
@ -15,4 +15,5 @@ var buildCmd = &cobra.Command{
|
|||
func init() {
|
||||
rootCmd.AddCommand(buildCmd)
|
||||
buildCmd.Flags().BoolVar(&nom, "nom", false, "display result with nom")
|
||||
buildCmd.Flags().BoolVar(&systemPath, "system-path", false, "show system-path drv")
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package cmd
|
|||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// gh workflow run build.yml -F lockFile=@flake.lock
|
||||
|
||||
var ciCmd = &cobra.Command{
|
||||
|
@ -13,7 +14,6 @@ var ciCmd= &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(ciCmd)
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ var dryCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(dryCmd)
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ var outputCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(outputCmd)
|
||||
outputCmd.Flags().BoolVar(&systemPath, "system-path", false, "show system-path drv")
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
in
|
||||
buildGoModule {
|
||||
pname = "oizys";
|
||||
version = "d${mkDate self.lastModifiedDate}";
|
||||
version = "${self.shortRev or "dirty"}";
|
||||
|
||||
src = cleanSource ./.;
|
||||
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";
|
||||
|
|
|
@ -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 | .[]'
|
||||
func (o *Oizys) getSystemPath() string {
|
||||
cmd := exec.Command("nix", "derivation", "show", o.nixosConfigAttr())
|
||||
log.Info("evaluating to get system-path")
|
||||
logCmd(cmd)
|
||||
// TODO: add spinner?
|
||||
cmd.Stderr = os.Stderr
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
|
@ -189,6 +190,9 @@ func (p *packages) summary() {
|
|||
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 {
|
||||
args := []string{"-C", o.flake}
|
||||
|
@ -256,10 +260,6 @@ func showDryRunResult(nixOutput string, verbose bool) {
|
|||
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) {
|
||||
args := []string{
|
||||
"build", o.nixosConfigAttr(), "--dry-run",
|
||||
|
@ -288,11 +288,11 @@ func (o *Oizys) NixosRebuild(subcmd string, rest ...string) {
|
|||
if o.verbose {
|
||||
cmd.Args = append(cmd.Args, "--print-build-logs")
|
||||
}
|
||||
logCmd(cmd)
|
||||
runCommand(cmd)
|
||||
}
|
||||
|
||||
func runCommand(cmd *exec.Cmd) {
|
||||
logCmd(cmd)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
|
@ -308,6 +308,9 @@ func (o *Oizys) NixBuild(nom bool, rest ...string) {
|
|||
cmdName = "nix"
|
||||
}
|
||||
cmd := exec.Command(cmdName, "build")
|
||||
if o.systemPath {
|
||||
cmd.Args = append(cmd.Args, fmt.Sprintf("%s^*", o.getSystemPath()))
|
||||
}
|
||||
cmd.Args = append(cmd.Args, rest...)
|
||||
runCommand(cmd)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue