Refactor modules #356
3 changed files with 64 additions and 56 deletions
|
@ -10,6 +10,7 @@ in
|
|||
./docs.nix
|
||||
./example-vm.nix
|
||||
./nixos-modules.nix
|
||||
./home-modules.nix
|
||||
./nixvim-modules.nix
|
||||
./overlays.nix
|
||||
./scripts.nix
|
||||
|
|
34
flake-modules/home-modules.nix
Normal file
34
flake-modules/home-modules.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue