nixos-configs/devShells/flake/default.nix
matt1432 d2625fa290
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: fit structure of main directories
2025-01-04 21:34:36 -05:00

46 lines
810 B
Nix

{
mkShell,
writeShellApplication,
# deps
findutils,
gnused,
nix-output-monitor,
...
}:
mkShell {
packages = [
(writeShellApplication {
name = "mkIso";
runtimeInputs = [
nix-output-monitor
];
text = ''
isoConfig="nixosConfigurations.live-image.config.system.build.isoImage"
nom build "$FLAKE#$isoConfig"
'';
})
(writeShellApplication {
name = "fixUidChange";
runtimeInputs = [
findutils
gnused
];
text = ''
GROUP="$1"
OLD_GID="$2"
NEW_GID="$3"
# Remove generated group entry
sudo sed -i -e "/^$GROUP:/d" /etc/group
# Change GID on existing files
sudo find / -gid "$OLD_GID" -exec chgrp "$NEW_GID" {} +
'';
})
];
}