defaults: cleanup
This commit is contained in:
parent
00c06f982b
commit
d8071797fd
7 changed files with 73 additions and 67 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue