mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-26 21:50:44 -06:00
Compare commits
No commits in common. "ddcc88fd179d2aee3f3bede16318108e0a905c00" and "52d79fd28cf81080df78f18799200c70de35bc84" have entirely different histories.
ddcc88fd17
...
52d79fd28c
13 changed files with 120 additions and 119 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 \
|
||||
-qq \
|
||||
-q \
|
||||
$(non_manifest_packages) &
|
||||
fi
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ 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": 1718450675,
|
||||
"narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=",
|
||||
"lastModified": 1718368322,
|
||||
"narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6",
|
||||
"rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -305,11 +305,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718815000,
|
||||
"narHash": "sha256-n7P4frE8d3gLegiKrjhI/mOf+I4H7PuCeVZ2BN9pI8A=",
|
||||
"lastModified": 1718723174,
|
||||
"narHash": "sha256-cPIOblG2H8Z934FPeuU0I6kI1Ke8ZbF330Nq/hTJ2uU=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "c1e21719a2fff2fa9549f00053ac40173da54af9",
|
||||
"revCount": 4868,
|
||||
"rev": "236150b3c5227bbfbe46d2610c739a386afdca1f",
|
||||
"revCount": 4859,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland/"
|
||||
|
@ -352,11 +352,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714869498,
|
||||
"narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
|
||||
"lastModified": 1691753796,
|
||||
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
|
||||
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -426,11 +426,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718804078,
|
||||
"narHash": "sha256-CqRZne63BpYlPd/i8lXV0UInUt59oKogiwdVtBRHt60=",
|
||||
"lastModified": 1718271409,
|
||||
"narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "4f1351295c55a8f51219b25aa4a6497a067989d0",
|
||||
"rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -498,16 +498,16 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718419213,
|
||||
"narHash": "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=",
|
||||
"ref": "refs/tags/2.90.0-rc1",
|
||||
"rev": "253546d5fbf8a5aa60ac8164c1b4f5794dc4e9d1",
|
||||
"revCount": 15780,
|
||||
"lastModified": 1714955862,
|
||||
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
|
||||
"revCount": 15501,
|
||||
"type": "git",
|
||||
"url": "https://git@git.lix.systems/lix-project/lix"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/tags/2.90.0-rc1",
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"type": "git",
|
||||
"url": "https://git@git.lix.systems/lix-project/lix"
|
||||
}
|
||||
|
@ -519,16 +519,14 @@
|
|||
"lix": [
|
||||
"lix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718778751,
|
||||
"narHash": "sha256-DdcMvX9r29uHMlz7P1Shgs5xZw9WkZ4ObMGYzwROAiw=",
|
||||
"lastModified": 1717647344,
|
||||
"narHash": "sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "909e593ae9f5fe338ab19b4ed9d52bb0ea09bad8",
|
||||
"revCount": 90,
|
||||
"rev": "4e25f1ab68f2270f9cff59216056c21073db0164",
|
||||
"revCount": 87,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
},
|
||||
|
@ -541,7 +539,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -629,7 +627,7 @@
|
|||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718710563,
|
||||
|
@ -681,14 +679,14 @@
|
|||
"flake-compat": "flake-compat_2",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718749042,
|
||||
"narHash": "sha256-zhxg/ZnMESAuDMK+Aps79cHcH/A8ER6fyoLP0fr3Qtg=",
|
||||
"lastModified": 1718727726,
|
||||
"narHash": "sha256-WIoMGbYpJMc9TTPeJeoGXRw5KaUkqDVMmtQp412ThOk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "0b50a0bf6bdd0b0744a171a94b7754c3d092e939",
|
||||
"rev": "7a80040b517fdfcf8a97749b58afc47bbea4b8c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -699,11 +697,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1718530797,
|
||||
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||
"lastModified": 1718318537,
|
||||
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
|
||||
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -730,6 +728,22 @@
|
|||
}
|
||||
},
|
||||
"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=",
|
||||
|
@ -745,7 +759,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1718606988,
|
||||
"narHash": "sha256-pmjP5ePc1jz+Okona3HxD7AYT0wbrCwm9bXAlj08nDM=",
|
||||
|
@ -761,7 +775,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1715037484,
|
||||
"narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=",
|
||||
|
@ -777,7 +791,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1718530797,
|
||||
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||
|
@ -793,7 +807,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1714076141,
|
||||
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
|
||||
|
@ -811,15 +825,15 @@
|
|||
},
|
||||
"pixi": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"pixi-source": "pixi-source"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718732897,
|
||||
"narHash": "sha256-VMxOQWs7c7A5/YV6ZApLwOwHUiH8CS9C3V8KeN9NeqA=",
|
||||
"lastModified": 1718303061,
|
||||
"narHash": "sha256-9kgLO6kWRc/3gGEva/Pdy3dCpL25KZ44pxgt+3NG78c=",
|
||||
"owner": "daylinmorgan",
|
||||
"repo": "pixi-flake",
|
||||
"rev": "f06ebb992e0c8dddcf353f06cfae5fa5015f5c33",
|
||||
"rev": "25b23c0b7cfeba6970f3e7e5dfdfe27eb60bffd4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -831,16 +845,16 @@
|
|||
"pixi-source": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718376652,
|
||||
"narHash": "sha256-Qlr4CcrCq29ig3FPFWCR5oOtFrbREm/7zyGXUB3XL98=",
|
||||
"lastModified": 1718205766,
|
||||
"narHash": "sha256-24sahgBaWlbbOfaqyMJiow3S1KwMsgo0hYu7Z5WpMlE=",
|
||||
"owner": "prefix-dev",
|
||||
"repo": "pixi",
|
||||
"rev": "84b1322ed07bb1adf6516c33dce4ab5a5703e7d8",
|
||||
"rev": "234472ae4ee80ef12f659cfc85f247f78974f293",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "prefix-dev",
|
||||
"ref": "v0.24.2",
|
||||
"ref": "v0.24.1",
|
||||
"repo": "pixi",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -856,11 +870,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718788674,
|
||||
"narHash": "sha256-qR0lOtyOSbSQ2kyfNm2ppDU0soQVwFK80sYwpEBsRGQ=",
|
||||
"lastModified": 1718490961,
|
||||
"narHash": "sha256-ZZT4rpqs9mccmXPR/st4Lpql650iKDuLn2ZafnXSqeU=",
|
||||
"owner": "roc-lang",
|
||||
"repo": "roc",
|
||||
"rev": "9072d75aa9aa125b8a4a1a713fe59a7daa3efdd2",
|
||||
"rev": "41ea2bfbc7db8109d7c6ed08f84b571592f801d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -879,7 +893,7 @@
|
|||
"lix-module": "lix-module",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"pixi": "pixi",
|
||||
"roc": "roc",
|
||||
|
@ -1111,11 +1125,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718619174,
|
||||
"narHash": "sha256-FWW68AVYmB91ZDQnhLMBNCUUTCjb1ZpO2k2KIytHtkA=",
|
||||
"lastModified": 1718272114,
|
||||
"narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "c7894aa54f9a7dbd16df5cd24d420c8af22d5623",
|
||||
"rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1155,11 +1169,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718759946,
|
||||
"narHash": "sha256-wSLldChPddiGLATXeT9qUuvIYROt0vJtgMZfTmiUlaM=",
|
||||
"lastModified": 1718673535,
|
||||
"narHash": "sha256-KCHMePFrijSscQt6A4rtRJxciOaQXgHyGpqi9dzdy8E=",
|
||||
"owner": "Cloudef",
|
||||
"repo": "zig2nix",
|
||||
"rev": "a47d01e559d71020293ac3515ebaeb7ea02cc0c1",
|
||||
"rev": "60a6e8d97759da986a488528d86548f611c89edb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1179,11 +1193,11 @@
|
|||
"zig-overlay": "zig-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718808820,
|
||||
"narHash": "sha256-uTwU9NxKfP6tbhVuRajLxpVJENaw71FCLvElba7TZ5M=",
|
||||
"lastModified": 1718724404,
|
||||
"narHash": "sha256-BnXu0u0H74cyVOEneESQoCqMCf9zgSrkSx2QVuYztVY=",
|
||||
"owner": "zigtools",
|
||||
"repo": "zls",
|
||||
"rev": "6d0eac599352df8eeebd0acab4a51ba05e587cc7",
|
||||
"rev": "cfea2d55798418cccdf27b1b1bde0f70bff1b8f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
62
flake.nix
62
flake.nix
|
@ -6,50 +6,38 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
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";
|
||||
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";
|
||||
|
||||
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";
|
||||
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";
|
||||
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";
|
||||
};
|
||||
pixi.url = "github:daylinmorgan/pixi-flake";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
}:
|
||||
|
||||
mkOizysModule config "hyprland" {
|
||||
programs.hyprland = enabled;
|
||||
programs.hyprland = enabled; #// {
|
||||
# package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
# };
|
||||
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"
|
||||
];
|
||||
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
|
||||
initialPassword = "nix";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
|
||||
];
|
||||
|
|
|
@ -15,5 +15,4 @@ 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,10 +3,9 @@ package cmd
|
|||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// gh workflow run build.yml -F lockFile=@flake.lock
|
||||
|
||||
var ciCmd = &cobra.Command{
|
||||
var ciCmd= &cobra.Command{
|
||||
Use: "ci",
|
||||
Short: "offload build to GHA",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
@ -14,6 +13,7 @@ var ciCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(ciCmd)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ var dryCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(dryCmd)
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ 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 = "${self.shortRev or "dirty"}";
|
||||
version = "d${mkDate self.lastModifiedDate}";
|
||||
|
||||
src = cleanSource ./.;
|
||||
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";
|
||||
|
|
|
@ -62,8 +62,7 @@ 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())
|
||||
logCmd(cmd)
|
||||
// TODO: add spinner?
|
||||
log.Info("evaluating to get system-path")
|
||||
cmd.Stderr = os.Stderr
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
|
@ -190,9 +189,6 @@ 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}
|
||||
|
@ -260,6 +256,10 @@ 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,9 +308,6 @@ 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