mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
tree-wide: init fish completion module
This commit is contained in:
parent
006798d917
commit
82baec0470
4 changed files with 28 additions and 10 deletions
|
|
@ -58,15 +58,16 @@ in
|
|||
./hydrogen/nixos/programs.nix
|
||||
./hydrogen/nixos/connectivity.nix
|
||||
|
||||
# QUIRK:
|
||||
# Had issue when building the installer as it fails to bootstrap itself
|
||||
# Might be useful to disable for the first build.
|
||||
../nixosModules/extra/secure_dns.nix
|
||||
../nixosModules/common/fish.nix
|
||||
../nixosModules/common/disable-command-not-found.nix
|
||||
../nixosModules/common/network.nix
|
||||
../nixosModules/common/sudo-conf.nix
|
||||
../nixosModules/common/system-nixconf.nix
|
||||
|
||||
# QUIRK:
|
||||
# Had issue when building the installer as it fails to bootstrap itself
|
||||
# Might be useful to disable for the first build.
|
||||
../nixosModules/extra/secure_dns.nix
|
||||
../nixosModules/extra/leana.nix
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ in
|
|||
./vanadium/nixos/unfree-predicate.nix
|
||||
./vanadium/nixos/programs.nix
|
||||
|
||||
../nixosModules/common/fish.nix
|
||||
../nixosModules/common/disable-command-not-found.nix
|
||||
../nixosModules/common/network.nix
|
||||
../nixosModules/common/sudo-conf.nix
|
||||
|
|
|
|||
22
nix/nixosModules/common/fish.nix
Normal file
22
nix/nixosModules/common/fish.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# This module links fish vendor completions, otherwise tab completion would be broken.
|
||||
#
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
fishNixOSEnabled = config.programs.fish.enable;
|
||||
fishHMEnabled =
|
||||
if config ? home-manager
|
||||
then lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users)
|
||||
else false;
|
||||
|
||||
fishEnabled = fishNixOSEnabled || fishHMEnabled;
|
||||
in {
|
||||
environment.pathsToLink = lib.mkIf fishEnabled [
|
||||
"/share/fish/vendor_conf.d"
|
||||
"/share/fish/vendor_completions.d"
|
||||
"/share/fish/vendor_functions.d"
|
||||
];
|
||||
}
|
||||
|
|
@ -18,12 +18,6 @@
|
|||
};
|
||||
users.groups.leana = {};
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/share/fish/vendor_conf.d"
|
||||
"/share/fish/vendor_completions.d"
|
||||
"/share/fish/vendor_functions.d"
|
||||
];
|
||||
|
||||
#
|
||||
# My nix binary cache
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue