Use callPackage
whenever possible
This commit is contained in:
parent
4dc4923656
commit
2a0a3aebf9
3 changed files with 11 additions and 12 deletions
|
@ -120,7 +120,7 @@
|
||||||
"${username}@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
"${username}@${hostname}" = home-manager.lib.homeManagerConfiguration {
|
||||||
modules =
|
modules =
|
||||||
let
|
let
|
||||||
getUserConfig = import ./lib/utils/user-config.nix { inherit lib; };
|
getUserConfig = pkgs.callPackage (import ./lib/utils/user-config.nix);
|
||||||
userConfigPath = getUserConfig { inherit hostname username; };
|
userConfigPath = getUserConfig { inherit hostname username; };
|
||||||
in [
|
in [
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, machine, ... }: {
|
{ lib, machine, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/custom-build-vm.nix
|
./modules/custom-build-vm.nix
|
||||||
./modules/custom-sops-nix.nix
|
./modules/custom-sops-nix.nix
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
lib.attrsets.concatMapAttrs (username: user:
|
lib.attrsets.concatMapAttrs (username: user:
|
||||||
let
|
let
|
||||||
hostname = machine.name;
|
hostname = machine.name;
|
||||||
getUserConfig = import ./utils/user-config.nix { inherit lib; };
|
getUserConfig = pkgs.callPackage (import ./utils/user-config.nix);
|
||||||
configPath = getUserConfig { inherit hostname username; };
|
configPath = getUserConfig { inherit hostname username; };
|
||||||
in
|
in
|
||||||
if (configPath != null)
|
if (configPath != null)
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{ lib, ... }:
|
{ pkgs, hostname, username, ... }:
|
||||||
let
|
let
|
||||||
tryFiles = import ./try-files.nix { inherit lib; };
|
tryFiles = pkgs.callPackage (import ./try-files.nix) { };
|
||||||
in
|
in
|
||||||
{ hostname, username, ... }:
|
tryFiles [
|
||||||
tryFiles [
|
../users/${username}/${hostname}.nix
|
||||||
../users/${username}/${hostname}.nix
|
../users${username}/common.nix
|
||||||
../users${username}/common.nix
|
../users/${username}.nix
|
||||||
../users/${username}.nix
|
]
|
||||||
]
|
null
|
||||||
null
|
|
||||||
|
|
Loading…
Reference in a new issue