mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nix): lib.nix
This commit is contained in:
parent
1df7fc9594
commit
66f6c5a702
2 changed files with 10 additions and 17 deletions
17
nix/lib.nix
17
nix/lib.nix
|
|
@ -15,10 +15,7 @@
|
|||
enableCmus = false;
|
||||
};
|
||||
|
||||
argsFor = {
|
||||
system,
|
||||
hostname,
|
||||
}: let
|
||||
mkArgs = system: hostname: let
|
||||
pkgs = import nixpkgs {
|
||||
system = system;
|
||||
config.allowUnfreePredicate = pkg:
|
||||
|
|
@ -43,14 +40,12 @@
|
|||
audio-lint = audio-lint.defaultPackage.${system};
|
||||
};
|
||||
in {
|
||||
makeOSFor = {
|
||||
mkNixOS = {
|
||||
system,
|
||||
hostname,
|
||||
extraSettings ? {},
|
||||
}: let
|
||||
args =
|
||||
(argsFor {inherit system hostname;})
|
||||
// (defaultExtraSettings // extraSettings);
|
||||
args = (mkArgs system hostname) // (defaultExtraSettings // extraSettings);
|
||||
in (nixpkgs.lib.nixosSystem {
|
||||
specialArgs = args;
|
||||
modules = [
|
||||
|
|
@ -69,14 +64,12 @@ in {
|
|||
];
|
||||
});
|
||||
|
||||
makeHMFor = {
|
||||
mkHomeManager = {
|
||||
system,
|
||||
hostname,
|
||||
extraSettings ? {},
|
||||
}: let
|
||||
args =
|
||||
(argsFor {inherit system hostname;})
|
||||
// (defaultExtraSettings // extraSettings);
|
||||
args = (mkArgs system hostname) // (defaultExtraSettings // extraSettings);
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = args.pkgs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue