2024-01-30 21:44:02 +01:00
|
|
|
{ inputs, lib, ... }:
|
2024-01-30 20:09:08 +01:00
|
|
|
|
|
|
|
let createUser' = import ./createUser.nix;
|
|
|
|
in {
|
2024-01-30 21:44:02 +01:00
|
|
|
imports = [ ./openwrt.nix ];
|
|
|
|
options.flake.lib = lib.mkOption { type = with lib.types; lazyAttrsOf raw; };
|
|
|
|
config.flake.lib = {
|
2024-01-30 20:09:08 +01:00
|
|
|
createSystem = hostName:
|
|
|
|
{ hardwareConfig, config }:
|
|
|
|
({ pkgs, lib, ... }: {
|
|
|
|
networking.hostName = hostName;
|
|
|
|
|
|
|
|
imports = [ ../modules/common.nix hardwareConfig config ];
|
|
|
|
});
|
|
|
|
createUser = name: args:
|
|
|
|
({ pkgs, ... }@args2:
|
|
|
|
(createUser' name args) ({ inherit (inputs) home-manager; } // args2));
|
|
|
|
createMediaGroup = _: { users.groups.media.gid = 600; };
|
|
|
|
};
|
|
|
|
}
|