mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: revise file retrieval for NixOS and home-manager configs
This commit is contained in:
parent
1a74104845
commit
21e157d328
11
flake.nix
11
flake.nix
@ -307,14 +307,13 @@
|
|||||||
images' = listImagesWithSystems images;
|
images' = listImagesWithSystems images;
|
||||||
in
|
in
|
||||||
lib'.mapAttrs
|
lib'.mapAttrs
|
||||||
(_: host:
|
(filename: host:
|
||||||
let
|
let
|
||||||
name = host._name;
|
path = ./hosts/${filename};
|
||||||
path = ./hosts/${name};
|
|
||||||
extraModules = [
|
extraModules = [
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{ networking.hostName = lib.mkForce name; }
|
{ networking.hostName = lib.mkForce host._name; }
|
||||||
|
|
||||||
(lib.mkIf (host ? domain)
|
(lib.mkIf (host ? domain)
|
||||||
{ networking.domain = lib.mkForce host.domain; })
|
{ networking.domain = lib.mkForce host.domain; })
|
||||||
@ -344,14 +343,14 @@
|
|||||||
users' = listImagesWithSystems users;
|
users' = listImagesWithSystems users;
|
||||||
in
|
in
|
||||||
lib'.mapAttrs
|
lib'.mapAttrs
|
||||||
(name: metadata:
|
(filename: metadata:
|
||||||
let
|
let
|
||||||
name = metadata._name;
|
name = metadata._name;
|
||||||
system = metadata._system;
|
system = metadata._system;
|
||||||
pkgs = import inputs."${metadata.nixpkgs-channel or "nixpkgs"}" {
|
pkgs = import inputs."${metadata.nixpkgs-channel or "nixpkgs"}" {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
};
|
};
|
||||||
path = ./users/home-manager/${name};
|
path = ./users/home-manager/${filename};
|
||||||
extraModules = [
|
extraModules = [
|
||||||
({ pkgs, config, ... }: {
|
({ pkgs, config, ... }: {
|
||||||
# To be able to use the most of our config as possible, we want
|
# To be able to use the most of our config as possible, we want
|
||||||
|
Loading…
Reference in New Issue
Block a user