1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00

prep main darwin config

This commit is contained in:
TheGeneralist 2025-05-29 15:35:31 +02:00
parent 50da7ffff8
commit 523aaff701
No known key found for this signature in database
GPG key ID: C391D4D52D630F45
32 changed files with 423 additions and 142 deletions

View file

@ -5,28 +5,24 @@
{ self, config, pkgs, lib, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
inputs.agenix.darwinModules.default
# inputs.home-manager.darwinModules.default
];
# age.secrets.hostkey.file = ./hostkey.age;
# services.openssh.hostKeys = [{
# type = "ed25519";
# path = config.age.secrets.hostkey.path;
# }];
imports = [ ./hardware-configuration.nix ];
users.users.thegeneralist = {
name = "thegeneralist";
home = "/Users/thegeneralist";
shell = pkgs.nushell;
shell = pkgs.zsh;
# openssh.authorizedKeys.keys = let
# inherit (import ../../keys.nix) thegeneralist;
# in [ thegeneralist ];
};
# home-manager = {
# extraSpecialArgs = { inherit inputs; };
# users = {
# thegeneralist = import (self + /modules/home);
# };
# };
# home-manager.users.thegeneralist.home = {
# stateVersion = "24.11";
# homeDirectory = "/Users/thegeneralist";

View file

@ -1,6 +1,22 @@
lib: inputs: self: lib.nixosSystem {
lib: inputs: self: lib.darwinSystem {
specialArgs = inputs // { inherit inputs; inherit self; };
modules = [
# Extensions: nixosModules, darwinModules, overlays
({ pkgs, lib, inputs, ... }: let
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
collect = packagePath: (attrValues inputs)
|> filter (hasAttrByPath packagePath)
|> map (getAttrFromPath packagePath);
modules = collect [ "darwinModules" "default" ];
# todo
extensions = {
nixpkgs.overlays = collect [ "overlays" "default" ];
imports = modules;
};
in extensions)
./configuration.nix
# Modules
@ -11,16 +27,5 @@ lib: inputs: self: lib.nixosSystem {
in {
imports = commonModules ++ darwinModules;
})
# Overlays
({ pkgs, lib, ... }: let
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
packagePath = [ "overlays" "default" ];
overlays = (attrValues inputs)
|> filter (hasAttrByPath packagePath)
|> map (getAttrFromPath packagePath);
in {
nixpkgs.overlays = overlays;
})
];
}

Binary file not shown.