treewide: move defaults to dedicated folder

This commit is contained in:
Elec3137 2026-03-23 20:41:34 -07:00
commit 00c06f982b
6 changed files with 0 additions and 0 deletions

View file

@ -1,38 +0,0 @@
{
pkgs,
lib,
config,
...
}:
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";
in
{
options.nixowos.cli.${name} = {
enable = lib.mkEnableOption name;
};
config = lib.mkIf cfg.enable {
# use Fish, the nicest shell :)
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
# avoid generating caches (enabled by fish) due to slowdowns during nixos-rebuild
# this may degrade autocompletion
documentation.man.generateCaches = false;
environment.shellAliases = {
# 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}";
};
};
}