mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-03 15:39:41 +00:00
ref(nix): helper functions
This commit is contained in:
parent
eaeb922882
commit
6899a5887e
4 changed files with 42 additions and 52 deletions
20
nix/lib.nix
20
nix/lib.nix
|
|
@ -9,7 +9,15 @@
|
|||
opam-nix,
|
||||
...
|
||||
}: let
|
||||
helperFuncs = {
|
||||
if' = cond: xs:
|
||||
if cond
|
||||
then xs
|
||||
else [];
|
||||
};
|
||||
|
||||
defaultExtraSettings = {
|
||||
inherit helperFuncs;
|
||||
extraLanguageServers = false;
|
||||
extraUtils = false;
|
||||
enableCmus = false;
|
||||
|
|
@ -58,13 +66,8 @@ in {
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.leana = {...}: {
|
||||
imports = [
|
||||
(./home/leana + "@${hostname}")
|
||||
./home/common
|
||||
];
|
||||
};
|
||||
extraSpecialArgs = args;
|
||||
users.leana = {...}: {imports = [./home/common (./home/leana + "@${hostname}")];};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
@ -80,9 +83,6 @@ in {
|
|||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = args.pkgs;
|
||||
extraSpecialArgs = args;
|
||||
modules = [
|
||||
(./home/leana + "@${hostname}")
|
||||
./home/common
|
||||
];
|
||||
modules = [./home/common (./home/leana + "@${hostname}")];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue