feat: home
This commit is contained in:
parent
b30f617f44
commit
fc8534dc04
10 changed files with 72 additions and 27 deletions
|
@ -2,9 +2,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
../options
|
../options
|
||||||
|
|
||||||
#
|
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
|
||||||
../home
|
./home.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
22
modules/base/home.nix
Normal file
22
modules/base/home.nix
Normal 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];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./home.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
7
modules/darwin/base/home.nix
Normal file
7
modules/darwin/base/home.nix
Normal 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
8
modules/home/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../options
|
||||||
|
./option-inheritance.nix
|
||||||
|
|
||||||
|
./home-manager.nix
|
||||||
|
];
|
||||||
|
}
|
8
modules/home/home-manager.nix
Normal file
8
modules/home/home-manager.nix
Normal 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;
|
||||||
|
}
|
17
modules/home/option-inheritance.nix
Normal file
17
modules/home/option-inheritance.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./drivers.nix
|
./drivers.nix
|
||||||
|
./home.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
|
7
modules/nixos/base/home.nix
Normal file
7
modules/nixos/base/home.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{config, ...}: let
|
||||||
|
inherit (config.marleyos.my) name;
|
||||||
|
in {
|
||||||
|
home-manager.users."${name}" = {
|
||||||
|
home.homeDirectory = "/home/${name}";
|
||||||
|
};
|
||||||
|
}
|
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue