Implement use for isServer and isMinimal flags; Removes unnecessary home configs for minimal hosts, simplifying them
- Moves komodo symlinks to tempfiles
This commit is contained in:
parent
19804fe7da
commit
f07e5a72e5
11 changed files with 38 additions and 42 deletions
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
# No Special Home
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
home.file = {
|
|
||||||
Pool.source = config.lib.file.mkOutOfStoreSymlink "/pool";
|
|
||||||
DockerStorage.source = config.lib.file.mkOutOfStoreSymlink "/mnt/DockerStorage";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
# No Special Home
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
# No Special Home
|
|
||||||
}
|
|
|
@ -5,6 +5,8 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
isServer = hostSpec.isServer or false;
|
||||||
|
|
||||||
qogir = pkgs.qogir-icon-theme.override {
|
qogir = pkgs.qogir-icon-theme.override {
|
||||||
colorVariants = [
|
colorVariants = [
|
||||||
"dark"
|
"dark"
|
||||||
|
@ -14,9 +16,8 @@ let
|
||||||
"ubuntu"
|
"ubuntu"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
lib.mkIf (!isServer) {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.stylix.homeManagerModules.stylix
|
inputs.stylix.homeManagerModules.stylix
|
||||||
];
|
];
|
||||||
|
|
|
@ -71,22 +71,26 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (inputs ? "home-manager") {
|
// lib.optionalAttrs (inputs ? "home-manager") {
|
||||||
# Setup root home?
|
|
||||||
home-manager.users.root = lib.optionalAttrs (!isMinimal) {
|
|
||||||
home.stateVersion = "24.05"; # Avoid error
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set up home-manager for the configured user
|
# Set up home-manager for the configured user
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit pkgs inputs;
|
inherit pkgs inputs;
|
||||||
inherit (config) secretsSpec hostSpec;
|
inherit (config) secretsSpec hostSpec;
|
||||||
};
|
};
|
||||||
users.${username} = lib.optionalAttrs (!isMinimal) {
|
users = {
|
||||||
|
root.home.stateVersion = "24.05"; # Avoid error
|
||||||
|
${username} = {
|
||||||
imports = [
|
imports = [
|
||||||
(
|
(
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
import (lib.custom.relativeToRoot "home/users/${username}") {
|
import
|
||||||
|
(
|
||||||
|
if isMinimal then
|
||||||
|
lib.custom.relativeToRoot "home/global/core"
|
||||||
|
else
|
||||||
|
lib.custom.relativeToRoot "home/users/${username}"
|
||||||
|
)
|
||||||
|
{
|
||||||
inherit
|
inherit
|
||||||
config
|
config
|
||||||
hostSpec
|
hostSpec
|
||||||
|
@ -99,4 +103,5 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ in
|
||||||
handle = user.handle;
|
handle = user.handle;
|
||||||
userFullName = user.fullName;
|
userFullName = user.fullName;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
|
isMinimal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
|
@ -45,6 +45,7 @@ in
|
||||||
handle = user.handle;
|
handle = user.handle;
|
||||||
userFullName = user.fullName;
|
userFullName = user.fullName;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
|
isMinimal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
|
@ -9,4 +9,10 @@
|
||||||
"hosts/global/common/system/pool.nix"
|
"hosts/global/common/system/pool.nix"
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
## Easy links, I use this dirs more often in this host
|
||||||
|
systemd.user.tmpfiles.rules = [
|
||||||
|
"L+ %h/Pool - - - - /pool"
|
||||||
|
"L+ %h/DockerStorage - - - - /mnt/DockerStorage"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ in
|
||||||
handle = user.handle;
|
handle = user.handle;
|
||||||
userFullName = user.fullName;
|
userFullName = user.fullName;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
|
isMinimal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
|
@ -46,6 +46,7 @@ in
|
||||||
handle = user.handle;
|
handle = user.handle;
|
||||||
userFullName = user.fullName;
|
userFullName = user.fullName;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
|
isMinimal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue