nixos-configs/devShells/flake/default.nix
matt1432 2440029757
All checks were successful
Discord / discord commits (push) Has been skipped
docs: add descriptions to devShells
2025-01-20 11:40:34 -05:00

50 lines
909 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" {} +
'';
})
];
meta.description = ''
Shell providing some utility scripts concerning the main flake.
'';
}