2024-10-04 23:23:30 +02:00
|
|
|
{ inputs, lib, ... }:
|
|
|
|
{
|
|
|
|
flake.nixosModules =
|
|
|
|
let
|
2024-10-14 09:31:19 +02:00
|
|
|
nvim-config =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
inputs.nixvim.homeManagerModules.nixvim
|
|
|
|
(import ../nvim {
|
|
|
|
inherit (inputs) unstable;
|
|
|
|
inherit (pkgs) system;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2024-10-04 23:23:30 +02:00
|
|
|
homeManagerModuleSandalone = import ../home {
|
|
|
|
inherit nvim-config;
|
|
|
|
inherit (inputs) stylix;
|
|
|
|
};
|
|
|
|
homeManagerModuleNixOS = import ../home { inherit nvim-config; };
|
|
|
|
nixosModule = {
|
|
|
|
imports = [
|
|
|
|
(import ../system { inherit (inputs) stylix; })
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
] ++ lib.optional (inputs.lix-module != null) inputs.lix-module.nixosModules.default;
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
sharedModules = [ homeManagerModuleNixOS ];
|
|
|
|
};
|
|
|
|
# Pin nixpkgs
|
|
|
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
|
|
};
|
|
|
|
|
|
|
|
machines = [ "vm" ];
|
|
|
|
mkMachine = hostname: {
|
|
|
|
imports = [
|
|
|
|
nixosModule
|
|
|
|
(import (../machines + "/${hostname}"))
|
|
|
|
];
|
|
|
|
home-manager.sharedModules = [ { jhome.hostName = hostname; } ];
|
|
|
|
};
|
|
|
|
machineModules = lib.genAttrs machines mkMachine;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default = nixosModule;
|
|
|
|
inherit nixosModule homeManagerModuleNixOS homeManagerModuleSandalone;
|
|
|
|
}
|
|
|
|
// machineModules;
|
|
|
|
}
|