adapt config for use with standalone home-manager

This commit is contained in:
greyweather committed 2026-08-28 01:15:05 +01:00
1 parent 765f346eb6
commit 3af64e993c
19 files changed
+418 -287

No files matched your search

+6
View File
@@ -1,5 +1,11 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options.helpers = {
# nothing here yet
};
};
flake.homeModules.global = { pkgs, config, lib, ... }: {
options.helpers = {
mkSymlinkActivationScript = lib.mkOption {
type = lib.types.functionTo lib.types.str;
+14 -3
View File
@@ -1,5 +1,5 @@
{ inputs, self, ... }: {
flake.homeModules.global = { osConfig, config, pkgs, ... }: {
flake.homeModules.global = { config, pkgs, osConfig, ... }: {
nix.gc = {
automatic = true;
persistent = true;
@@ -7,13 +7,24 @@
};
home = {
stateVersion = osConfig.info.stateVersion;
stateVersion = config.info.stateVersion;
packages = with pkgs; [
speedtest-go
] ++ osConfig.features.applications.extraUserPackages;
] ++ config.features.applications.extraPackages
++ (if !(builtins.hasAttr "osConfig" self) then [
pkgs.home-manager
] else []);
shell.enableBashIntegration = true;
username = "grey";
homeDirectory = "/home/${config.home.username}";
};
xdg = {
enable = true;
localBinInPath = !(builtins.hasAttr "osConfig" self);
};
programs = {
+26 -7
View File
@@ -25,16 +25,35 @@
default = "grub";
};
features.applications = {
extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
features.applications.extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
};
};
flake.homeModules.global = { pkgs, config, lib, ... }: {
options = {
info = {
rootPath = lib.mkOption {
type = lib.types.str;
default = "/home/grey/nixos";
};
extraUserPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
hostName = lib.mkOption {
type = lib.types.str;
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
default = "";
};
};
features.applications.extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
};
};