Compare commits

..

No commits in common. "ddcc88fd179d2aee3f3bede16318108e0a905c00" and "52d79fd28cf81080df78f18799200c70de35bc84" have entirely different histories.

13 changed files with 120 additions and 119 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 \
-qq \ -q \
$(non_manifest_packages) & $(non_manifest_packages) &
fi fi

View file

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

View file

@ -6,50 +6,38 @@
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";
zig2nix = { nix-index-database.url = "github:nix-community/nix-index-database";
url = "github:Cloudef/zig2nix"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
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";
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"; f1multiviewer.url = "github:daylinmorgan/f1multiviewer-flake";
tsm = { pixi.url = "github:daylinmorgan/pixi-flake";
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,7 +8,9 @@
}: }:
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"
]; ];
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO"; initialPassword = "nix";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
]; ];

View file

@ -15,5 +15,4 @@ 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,7 +3,6 @@ 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{
@ -14,6 +13,7 @@ var ciCmd = &cobra.Command{
}, },
} }
func init() { func init() {
rootCmd.AddCommand(ciCmd) rootCmd.AddCommand(ciCmd)

View file

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

View file

@ -14,6 +14,7 @@ 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 = "${self.shortRev or "dirty"}"; version = "d${mkDate self.lastModifiedDate}";
src = cleanSource ./.; src = cleanSource ./.;
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI="; vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";

View file

@ -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 | .[]' // 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())
logCmd(cmd) log.Info("evaluating to get system-path")
// 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 {
@ -190,9 +189,6 @@ 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}
@ -260,6 +256,10 @@ 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,9 +308,6 @@ 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)
} }