refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
|
|
@ -4,15 +4,24 @@
|
|||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
inherit (lib) singleton recursiveUpdate mkDefault;
|
||||
inherit (builtins) concatLists;
|
||||
inherit (self) keys;
|
||||
hm = inputs.home-manager.nixosModules.home-manager;
|
||||
agenix = inputs.agenix.nixosModules.default;
|
||||
nixosModules = "${self}/nixos";
|
||||
mkNixos = inputs.nixpkgs.lib.nixosSystem;
|
||||
nixosModules = "${self}/modules/nixos";
|
||||
baseModules = nixosModules + "/base";
|
||||
hardwareModules = nixosModules + "/hardware";
|
||||
appearanceModules = nixosModules + "/appearance";
|
||||
consoleModules = nixosModules + "/console";
|
||||
workstationModules = nixosModules + "/workstation";
|
||||
serverModules = nixosModules + "/server";
|
||||
core = [baseModules hardwareModules consoleModules appearanceModules hm agenix];
|
||||
hostModules = "${self}/hosts";
|
||||
|
||||
mkNixos = nixpkgs.lib.nixosSystem;
|
||||
|
||||
mkBaseSystem = {
|
||||
withSystem,
|
||||
hostname,
|
||||
|
|
@ -36,7 +45,10 @@
|
|||
modules = concatLists [
|
||||
(singleton {
|
||||
networking.hostName = hostname;
|
||||
nixpkgs.hostPlatform = mkDefault system;
|
||||
nixpkgs = {
|
||||
flake.source = nixpkgs.outPath;
|
||||
hostPlatform = mkDefault system;
|
||||
};
|
||||
ooknet.host = {
|
||||
name = hostname;
|
||||
inherit role type;
|
||||
|
|
@ -59,7 +71,8 @@
|
|||
inherit withSystem hostname system type specialArgs;
|
||||
role = "workstation";
|
||||
additionalModules = concatLists [
|
||||
[hm agenix nixosModules]
|
||||
core
|
||||
[workstationModules]
|
||||
additionalModules
|
||||
];
|
||||
};
|
||||
|
|
@ -83,6 +96,8 @@
|
|||
inherit platform services;
|
||||
};
|
||||
})
|
||||
core
|
||||
[serverModules]
|
||||
additionalModules
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@
|
|||
lib,
|
||||
self,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
builders = import ./builders.nix {inherit self lib inputs;};
|
||||
in {
|
||||
_module.args.ooknet.lib = {
|
||||
inherit builders;
|
||||
# My person functions
|
||||
ook-lib = {
|
||||
builders = import ./builders.nix {inherit self lib inputs;};
|
||||
mkNeovim = import ./mkNeovim.nix {inherit inputs;};
|
||||
};
|
||||
in {
|
||||
_module.args.ook.lib = ook-lib;
|
||||
flake.ook.lib = ook-lib;
|
||||
}
|
||||
|
|
|
|||
12
outputs/lib/mkNeovim.nix
Normal file
12
outputs/lib/mkNeovim.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs.nvf.lib) neovimConfiguration;
|
||||
|
||||
mkNeovim = pkgs: modules:
|
||||
(neovimConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
inherit modules;
|
||||
})
|
||||
.neovim;
|
||||
in
|
||||
mkNeovim
|
||||
Loading…
Add table
Add a link
Reference in a new issue