defaults: cleanup

This commit is contained in:
Elec3137 2026-03-23 20:53:59 -07:00
commit d8071797fd
7 changed files with 73 additions and 67 deletions

View file

@ -7,16 +7,10 @@
let
name = "shell";
cfg = config.nixowos.cli.${name};
# use a more verbose output style for nix than default
# only lix supports log-format = multiline-with-logs
logFormat = if config.nixowos.system.lix.enable then "multiline-with-logs" else "bar-with-logs";
cfg = config.nixowos.defaults.${name};
in
{
options.nixowos.cli.${name} = {
enable = lib.mkEnableOption name;
};
options.nixowos.defaults.${name}.enable = lib.mkEnableOption name;
config = lib.mkIf cfg.enable {
# use Fish, the nicest shell :)
@ -30,9 +24,7 @@ in
# make nix-shell preserve the user's $SHELL
nix-shell = /* sh */ ''nix-shell --command "export SHELL=$SHELL; $SHELL"'';
nixos-rebuild = /* sh */ "nixos-rebuild --ask-sudo-password --log-format ${logFormat}";
nix = /* sh */ "nix --log-format ${logFormat}";
nixos-rebuild = /* sh */ "nixos-rebuild --ask-sudo-password";
};
};
}