Skip to content

Commit

Permalink
amd 55 current 2024-10-21 18:56:00 24.11.20241014.b36c6a9 6.6.56 *
Browse files Browse the repository at this point in the history
  • Loading branch information
dezren39 committed Oct 21, 2024
1 parent 5e2af23 commit 77d29a2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
62 changes: 33 additions & 29 deletions hosts/init/default.nix
Original file line number Diff line number Diff line change
@@ -1,56 +1,60 @@
{
config,
inputs,
hostName,
host,
system,
stateVersion,
lib,
...
}:
{
imports = with lib; lists.flatten [
/*
# TODO: make generic array function and use that, maybe prefix one is enough?
# TODO: fn to allow optionals for the auto-list below, removed before import
from-root "hosts/abstract" # maybe don't import all, just ones needed as needed?
from-root "hosts/hardware-configuration/${hostName}"
from-root "hosts/{host.type}"
from-root "hosts/{host.type}/{hostName}"
from-root "hosts/{host.type}/{hostName}/{profile}" for profile in host.profiles
from-root "hosts/{host.type}/{profile}" for profile in host.profiles
from-root "hosts/{host.type}/{profile}/{hostName}" for profile in host.profiles
from-root "hosts/{hostName}"
from-root "hosts/{hostName}/{host.type}"
from-root "hosts/{hostName}/{host.type}/{profile}" for profile in host.profiles
from-root "hosts/{hostName}/{profile}" for profile in host.profiles
from-root "hosts/{hostName}/{profile}/{host.type}" for profile in host.profiles
from-root "hosts/{profile}" for profile in host.profiles
from-root "hosts/{profile}/{host.type}" for profile in host.profiles
from-root "hosts/{profile}/{hostName}" for profile in host.profiles
from-root "hosts/{profile}/{host.type}/{hostName}" for profile in host.profiles
from-root "hosts/{profile}/{hostName}/{host.type}" for profile in host.profiles
*/
(ensure-list host.modules)
(ensure-list host.imports)

(make-hardware host.hardware)
(ensure-list host.hardware-modules)
(ensure-list host.hardware-imports)
# networking # TODO: make this work

(make-profiles host.profiles)
(ensure-list host.profile-modules)
(ensure-list host.profile-imports)

(make-disks host.disks)
(ensure-list host.disk-modules)
(ensure-list host.disk-imports)

(make-wireless host.wireless)
(make-users host.users)
(ensure-list host.wireless-modules)
(ensure-list host.wireless-imports)
# (make-darwin-modules host.darwin-profiles)

(make-users host.users)
(ensure-list host.user-modules)
(ensure-list host.user-imports)

# (ensure-list host.darwin-profiles) # make-darwin-profiles
(ensure-list host.darwin-profile-modules)
(ensure-list host.darwin-profile-imports)
(ensure-list host.darwin-modules)
(ensure-list host.darwin-imports)
];
}
/*
# (make-darwin-modules host.darwin-profiles)
# networking # TODO: make this work
# TODO: make generic array function and use that, maybe prefix one is enough?
# TODO: fn to allow optionals for the auto-list below, removed before import
from-root "hosts/abstract" # maybe don't import all, just ones needed as needed?
from-root "hosts/hardware-configuration/${hostName}"
from-root "hosts/{host.type}"
from-root "hosts/{host.type}/{hostName}"
from-root "hosts/{host.type}/{hostName}/{profile}" for profile in host.profiles
from-root "hosts/{host.type}/{profile}" for profile in host.profiles
from-root "hosts/{host.type}/{profile}/{hostName}" for profile in host.profiles
from-root "hosts/{hostName}"
from-root "hosts/{hostName}/{host.type}"
from-root "hosts/{hostName}/{host.type}/{profile}" for profile in host.profiles
from-root "hosts/{hostName}/{profile}" for profile in host.profiles
from-root "hosts/{hostName}/{profile}/{host.type}" for profile in host.profiles
from-root "hosts/{profile}" for profile in host.profiles
from-root "hosts/{profile}/{host.type}" for profile in host.profiles
from-root "hosts/{profile}/{hostName}" for profile in host.profiles
from-root "hosts/{profile}/{host.type}/{hostName}" for profile in host.profiles
from-root "hosts/{profile}/{hostName}/{host.type}" for profile in host.profiles
*/
2 changes: 2 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ nixos-host-configuration-base =
email = "nixos-host-${name}@developing-today.com";
sshKey = lib.host-key name; # allow multiple ssh keys
users = [];
user-modules = [];
user-imports = [];
modules = [ ];
imports = [ ];
hardware = [ "" ];
Expand Down

0 comments on commit 77d29a2

Please sign in to comment.