Move initial Home Manager configuration
This commit is contained in:
parent
bf8e3628d0
commit
8947c4abd2
3 changed files with 60 additions and 0 deletions
14
modules2/home-manager/base.nix
Normal file
14
modules2/home-manager/base.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake.modules.homeManager.base = args: {
|
||||||
|
home = {
|
||||||
|
homeDirectory = "/home/${config.flake.meta.owner.username}";
|
||||||
|
username = config.flake.meta.owner.username;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
};
|
||||||
|
}
|
27
modules2/home-manager/nixos.nix
Normal file
27
modules2/home-manager/nixos.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, inputs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake.modules.nixos.pc = {
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs.hasGlobalPkgs = true;
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
|
||||||
|
# https://github.com/nix-community/home-manager/issues/6770
|
||||||
|
# useUserPackages = true;
|
||||||
|
|
||||||
|
users.${config.flake.meta.owner.username}.imports = [
|
||||||
|
(
|
||||||
|
{ osConfig, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.stateVersion = lib.mkForce osConfig.system.stateVersion;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
config.flake.modules.homeManager.base
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
19
modules2/owner.nix
Normal file
19
modules2/owner.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake = {
|
||||||
|
meta.owner.username = "opdavies";
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
nixos.pc = {
|
||||||
|
users.users.${config.flake.meta.owner.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = lib.mkForce "";
|
||||||
|
extraGroups = [ "input" "wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.trusted-users = [ config.flake.meta.owner.username ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue