mob next [ci-skip] [ci skip] [skip ci]
lastFile:modules/clan/home-profiles/common-user/default.nix
This commit is contained in:
68
modules/clan/home-profiles/common-user/default.nix
Normal file
68
modules/clan/home-profiles/common-user/default.nix
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
_class = "clan.service";
|
||||||
|
manifest.name = "common-user-home-manager";
|
||||||
|
manifest.description = "General users' home-manager profile generator";
|
||||||
|
manifest.categories = [ "System" ];
|
||||||
|
|
||||||
|
roles.default = {
|
||||||
|
interface =
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
username = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
kbLayout = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "us";
|
||||||
|
};
|
||||||
|
kbOptions = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "grp:win_space_toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
perInstance =
|
||||||
|
{
|
||||||
|
settings,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
nixosModule =
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
username = settings.username;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
||||||
|
users.users.${username} = {
|
||||||
|
initialPassword = "";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb.layout = settings.kbLayout;
|
||||||
|
xkbOptions = settings.kbOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.${username} = ./home.nix;
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs username;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
24
modules/clan/home-profiles/common-user/home.nix
Normal file
24
modules/clan/home-profiles/common-user/home.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
osConfig,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
inherit username;
|
||||||
|
homeDirectory = lib.mkForce "/home/${username}";
|
||||||
|
stateVersion = osConfig.system.stateVersion;
|
||||||
|
packages = with pkgs; [
|
||||||
|
libreoffice
|
||||||
|
element-desktop
|
||||||
|
brave
|
||||||
|
firefox
|
||||||
|
keepassxc
|
||||||
|
vlc
|
||||||
|
thunderbird
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
clan.modules = {
|
clan.modules = {
|
||||||
emmie = lib.modules.importApply ./emmie { };
|
commonUser = lib.modules.importApply ./common-user { };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ in
|
|||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.${username} = ./home.nix;
|
home-manager.users.${username} = ./home.nix;
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs username;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
osConfig,
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
username = "emmie";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
inherit username;
|
inherit username;
|
||||||
|
|||||||
Reference in New Issue
Block a user