refactor(home-manager): use flake-parts module
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

This is only available in the unstable HM branch, so we are stuck with
the non flake-parts version
This commit is contained in:
Jalil David Salamé Messina 2025-03-16 17:24:56 +01:00
parent eacd1a0520
commit 981fa9ae78
Signed by: jalil
GPG key ID: F016B9E770737A0B
3 changed files with 64 additions and 56 deletions

View file

@ -10,6 +10,7 @@ in
./docs.nix
./example-vm.nix
./nixos-modules.nix
./home-modules.nix
./nixvim-modules.nix
./overlays.nix
./scripts.nix

View file

@ -0,0 +1,34 @@
{ self, inputs, ... }:
let
modules = ../modules;
in
{
# FIXME(25.05): this version of HM should have the flake module
# imports = [ inputs.home-manager.flakeModules.home-manager ];
flake.homeModules =
let
defaultModules = [
inputs.nixvim.homeManagerModules.nixvim
self.nixvimModules.homeManager
(modules + "/hm")
];
nixos = {
imports = defaultModules;
};
standalone = {
imports = defaultModules ++ [
inputs.stylix.homeManagerModules.stilyx
(
{ config, ... }:
{
stylix.image = config.jhome.sway.background;
}
)
];
};
in
{
inherit standalone nixos;
};
}

View file

@ -8,33 +8,7 @@ let
modules = ../modules;
in
{
flake = {
homeManagerModules =
let
defaultModules = [
inputs.nixvim.homeManagerModules.nixvim
self.nixvimModules.homeManager
(modules + "/hm")
];
nixos = {
imports = defaultModules;
};
standalone = {
imports = defaultModules ++ [
inputs.stylix.homeManagerModules.stilyx
(
{ config, ... }:
{
stylix.image = config.jhome.sway.background;
}
)
];
};
in
{
inherit standalone nixos;
};
nixosModules =
flake.nixosModules =
let
nixosModule = {
imports = [
@ -45,7 +19,7 @@ in
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [ self.homeManagerModules.nixos ];
sharedModules = [ self.homeModules.nixos ];
};
# Pin nixpkgs
nix.registry.nixpkgs.flake = inputs.nixpkgs;
@ -66,5 +40,4 @@ in
inherit nixosModule;
}
// machineModules;
};
}