feat: home

This commit is contained in:
punkfairie 2025-05-25 16:50:20 -07:00
parent b30f617f44
commit fc8534dc04
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
10 changed files with 72 additions and 27 deletions

View file

@ -2,9 +2,8 @@
imports = [
../options
#
./nix.nix
../home
./home.nix
];
}

22
modules/base/home.nix Normal file
View file

@ -0,0 +1,22 @@
let
my = {
name = "marley";
fullName = "Marley Rae";
username = "punkfairie";
email = "marley@punkfairie.net";
};
in {
marleyos.my = my;
home-manager = {
useUserPackages = true;
useGlobalPackages = true;
backupFileExtension = "bak";
users."${my.name}" = {
home.username = my.name;
};
sharedModules = [../home];
};
}

View file

@ -1,5 +1,6 @@
{
imports = [
./home.nix
./nix.nix
];
}

View file

@ -0,0 +1,7 @@
{config, ...}: let
inherit (config.marleyos.my) name;
in {
home-manager.users."${name}" = {
home.homeDirectory = "/Users/${name}";
};
}

8
modules/home/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
imports = [
../options
./option-inheritance.nix
./home-manager.nix
];
}

View file

@ -0,0 +1,8 @@
{
programs.home-manager.enable = true;
home.language.base = "en_US.UTF-8";
# Autostart wanted systemd services on Linux.
systemd.user.startServices = true;
}

View file

@ -0,0 +1,17 @@
{osConfig, ...}: let
cfg = osConfig.marleyos;
in {
marleyos = {
profiles = {
inherit (cfg.profiles) desktop server;
hardware = {
inherit (cfg.profiles.hardware) nvidia;
};
};
my = {
inherit (cfg.my) name fullName username email;
};
};
}

View file

@ -2,6 +2,7 @@
imports = [
./boot.nix
./drivers.nix
./home.nix
./i18n.nix
./networking.nix
./nix.nix

View file

@ -0,0 +1,7 @@
{config, ...}: let
inherit (config.marleyos.my) name;
in {
home-manager.users."${name}" = {
home.homeDirectory = "/home/${name}";
};
}

View file

@ -1,25 +0,0 @@
{
lib,
system,
...
}: let
inherit (lib.snowfall.system) is-linux;
in {
# Anything in this folder should not include an enable/disable option. This is
# the only folder that is always applied.
config = {
marleyos.my = {
name = "marley";
username = "punkfairie";
fullName = "Marley Rae";
email = "marley@punkfairie.net";
};
home.language.base = "en_US.UTF-8";
programs.home-manager.enable = true;
# Autostart wanted systemd services.
systemd.user.startServices = lib.mkIf (is-linux system) true;
};
}