configuration.nix/flake-modules/nixos-modules.nix
Jalil David Salamé Messina 981fa9ae78
Some checks failed
/ check (nvimDev) (push) Failing after 1s
/ check (nvimHeadless) (push) Failing after 1s
/ check (nvimNoBundledBins) (push) Failing after 1s
/ check (nvimNoLsp) (push) Failing after 1s
/ check (nvimNoTSGrammars) (push) Failing after 1s
/ check (treefmt) (push) Successful in 3s
/ check-renovaterc (push) Successful in 3s
/ build (audiomenu) (push) Has been skipped
/ build (docs) (push) Has been skipped
/ build (jpassmenu) (push) Has been skipped
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Has been skipped
/ build (nvim) (push) Has been skipped
/ report-size (push) Has been skipped
refactor(home-manager): use flake-parts module
This is only available in the unstable HM branch, so we are stuck with
the non flake-parts version
2025-03-16 17:31:49 +01:00

43 lines
1,006 B
Nix

{
self,
inputs,
lib,
...
}:
let
modules = ../modules;
in
{
flake.nixosModules =
let
nixosModule = {
imports = [
inputs.stylix.nixosModules.stylix
inputs.home-manager.nixosModules.home-manager
(modules + "/nixos")
] ++ lib.optional (inputs.lix-module != null) inputs.lix-module.nixosModules.default;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [ self.homeModules.nixos ];
};
# 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;
}
// machineModules;
}