mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
flake-parts/setups: update shared Nix configuration
This commit is contained in:
parent
e1ed34dc29
commit
d13428b28b
@ -7,6 +7,9 @@ let
|
|||||||
nixpkgs = inputs.${config.nixpkgs.branch};
|
nixpkgs = inputs.${config.nixpkgs.branch};
|
||||||
home-manager = inputs.${config.homeManagerBranch};
|
home-manager = inputs.${config.homeManagerBranch};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flakeInputName = name:
|
||||||
|
if name == "self" then "config" else name;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config.modules = [(
|
config.modules = [(
|
||||||
@ -17,19 +20,12 @@ in
|
|||||||
nix.registry =
|
nix.registry =
|
||||||
lib.mapAttrs'
|
lib.mapAttrs'
|
||||||
(name: flake:
|
(name: flake:
|
||||||
let
|
lib.nameValuePair (flakeInputName name) { inherit flake; })
|
||||||
name' = if (name == "self") then "config" else name;
|
|
||||||
in
|
|
||||||
lib.nameValuePair name' { inherit flake; })
|
|
||||||
inputs';
|
inputs';
|
||||||
|
|
||||||
nix.settings.nix-path =
|
nix.settings.nix-path =
|
||||||
(lib.mapAttrsToList
|
(lib.mapAttrsToList
|
||||||
(name: source:
|
(name: source: "${flakeInputName name}=${source}")
|
||||||
let
|
|
||||||
name' = if (name == "self") then "config" else name;
|
|
||||||
in
|
|
||||||
"${name'}=${source}")
|
|
||||||
inputs'
|
inputs'
|
||||||
++ [
|
++ [
|
||||||
"/nix/var/nix/profiles/per-user/root/channels"
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
Loading…
Reference in New Issue
Block a user