treewide: export shared/modules/hjem
This method takes inspiration from how [hjem-rum](https://github.com/snugnug/hjem-rum) does it
This commit is contained in:
parent
1a299516a3
commit
c0dda38da1
5 changed files with 25 additions and 11 deletions
|
@ -17,6 +17,8 @@
|
|||
(system: function nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in {
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
|
@ -29,9 +31,8 @@
|
|||
});
|
||||
formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
nixosConfigurations = import ./hosts {inherit self inputs;};
|
||||
nixosModules.hjemModules = import ./shared/modules/hjem/nixos.nix {inherit (nixpkgs) lib;};
|
||||
packages = forAllSystems (pkgs: import ./shared/pkgs {inherit inputs pkgs;});
|
||||
deploy.nodes = import ./nodes.nix {inherit inputs;};
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
inputs = {
|
||||
# nix related
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{inputs, ...}: let
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
lib' = import ../lib inputs.nixpkgs.lib;
|
||||
mkSystem = args:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs lib';};
|
||||
specialArgs = {inherit self inputs lib';};
|
||||
modules =
|
||||
(args.modules or [])
|
||||
++ [../modules];
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (config.local.homeVars) fullName;
|
||||
inherit (config.local.profiles) desktop;
|
||||
in {
|
||||
imports = [inputs.hjem.nixosModules.default];
|
||||
imports = [
|
||||
inputs.hjem.nixosModules.default
|
||||
self.outputs.nixosModules.hjemModules
|
||||
];
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = fullName;
|
||||
|
@ -31,9 +33,5 @@ in {
|
|||
directory = "/home/${username}";
|
||||
user = "${username}";
|
||||
};
|
||||
|
||||
extraModules = singleton {
|
||||
imports = listFilesRecursive ../../shared/modules/hjem;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
11
shared/modules/hjem/nixos.nix
Normal file
11
shared/modules/hjem/nixos.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{lib}: let
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
in {
|
||||
config = {
|
||||
hjem.extraModules = [
|
||||
{
|
||||
imports = listFilesRecursive ./collection;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue