nix: move all darwin configuration to darwinModules

This commit is contained in:
Primrose 2024-10-30 19:35:49 +01:00
parent 7b8c2bcfcc
commit ceff366d15
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 18 additions and 5 deletions

View file

@ -1,5 +1,7 @@
{
flake.darwinModules.commonModules =
{ lib, modulesFromDir, ... }:
let
commonModules =
{ pkgs, hostname, ... }:
{
services.nix-daemon.enable = true;
@ -23,4 +25,17 @@
# https://github.com/nix-community/home-manager/issues/4026
users.users."leana".home = "/Users/leana";
};
# per host configuration
named = lib.mapAttrs' (name: value: {
name = "named-" + name;
inherit value;
}) (modulesFromDir ./named);
in
{
flake.darwinModules = lib.mergeAttrsList [
{ inherit commonModules; }
named
];
}