change home manager into a proper module
This commit is contained in:
parent
27921354a9
commit
0c9f91e92d
3 changed files with 32 additions and 11 deletions
|
|
@ -10,6 +10,13 @@
|
||||||
git
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nyxs-nix.services ={
|
||||||
|
home ={
|
||||||
|
enable = true;
|
||||||
|
isMacOS = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
security.pam.services.sudo_local.touchIdAuth = true;
|
security.pam.services.sudo_local.touchIdAuth = true;
|
||||||
ids.gids.nixbld = 350;
|
ids.gids.nixbld = 350;
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,30 @@
|
||||||
{ inputs, ... }:
|
{ inputs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
{
|
let
|
||||||
|
cfg = config.nyxs-nix.services.home;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager = {
|
options.nyxs-nix.services.home = with types; {
|
||||||
useGlobalPkgs = true;
|
enable = mkEnableOption "Enable the vrrp quotes service";
|
||||||
useUserPackages = true;
|
|
||||||
users = {
|
isMacOS = mkOption {
|
||||||
"nyxerinys" = import ./nyxerinys;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = "is this device running on macos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users = {
|
||||||
|
"nyxerinys" = import ./nyxerinys;
|
||||||
|
};
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
extraSpecialArgs = { inherit inputs; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, osConfig, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home.username = "nyxerinys";
|
home.username = "nyxerinys";
|
||||||
home.homeDirectory = (
|
home.homeDirectory = (
|
||||||
if pkgs.stdenv.isDarwin then
|
if osConfig.nyxs-nix.services.home.isMacOS then
|
||||||
"/Users/nyxerinys"
|
"/Users/nyxerinys"
|
||||||
else
|
else
|
||||||
"/home/nyxerinys"
|
"/home/nyxerinys"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue