feat: complete host home.nix files + add m3-daedalus, clean up m3tam3re.nix
- hosts/m3-kratos/home.nix: XDG/MIME defaults + dual DP Hyprland monitors - hosts/m3-ares/home.nix: XDG/MIME defaults + eDP+HDMI Hyprland monitors - hosts/m3-daedalus/home.nix: XDG/MIME defaults (no Hyprland) - hosts/common/users/m3tam3re.nix: refactored hostFlags into let binding, added m3-daedalus profile (desktop/coding+media, no gaming/Hyprland)
This commit is contained in:
@@ -5,6 +5,11 @@
|
|||||||
# 2. Loads the m3ta-home profile system via mkHome
|
# 2. Loads the m3ta-home profile system via mkHome
|
||||||
# 3. Sets per-host feature flags based on a host profile mapping
|
# 3. Sets per-host feature flags based on a host profile mapping
|
||||||
# 4. Imports per-host home.nix overrides (monitors, HW-specific config)
|
# 4. Imports per-host home.nix overrides (monitors, HW-specific config)
|
||||||
|
#
|
||||||
|
# To add a new host:
|
||||||
|
# 1. Add entry to hostProfiles below
|
||||||
|
# 2. Add feature flags in the hostFlags section
|
||||||
|
# 3. Create hosts/<hostname>/home.nix if the host needs overrides (monitors, etc.)
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -15,8 +20,8 @@
|
|||||||
|
|
||||||
# ── Per-host profile mapping ──
|
# ── Per-host profile mapping ──
|
||||||
# Determines which m3ta-home context and sets each host gets.
|
# Determines which m3ta-home context and sets each host gets.
|
||||||
# To add a new host: add an entry here + create hosts/<hostname>/home.nix if needed.
|
|
||||||
hostProfiles = {
|
hostProfiles = {
|
||||||
|
# ── Desktop hosts ──
|
||||||
m3-ares = {
|
m3-ares = {
|
||||||
context = "desktop";
|
context = "desktop";
|
||||||
sets = ["coding" "gaming" "media"];
|
sets = ["coding" "gaming" "media"];
|
||||||
@@ -25,6 +30,11 @@
|
|||||||
context = "desktop";
|
context = "desktop";
|
||||||
sets = ["coding" "gaming" "media"];
|
sets = ["coding" "gaming" "media"];
|
||||||
};
|
};
|
||||||
|
m3-daedalus = {
|
||||||
|
context = "desktop";
|
||||||
|
sets = ["coding" "media"];
|
||||||
|
};
|
||||||
|
# ── Server hosts ──
|
||||||
m3-atlas = {
|
m3-atlas = {
|
||||||
context = "server";
|
context = "server";
|
||||||
sets = ["coding"];
|
sets = ["coding"];
|
||||||
@@ -43,56 +53,22 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
profile = hostProfiles.${hostname} or {context = "server"; sets = [];};
|
profile = hostProfiles.${hostname} or {
|
||||||
|
context = "server";
|
||||||
|
sets = [];
|
||||||
|
};
|
||||||
m3ta-lib = inputs.m3ta-home.lib;
|
m3ta-lib = inputs.m3ta-home.lib;
|
||||||
|
|
||||||
# Check if a per-host home.nix exists
|
# Check if a per-host home.nix exists
|
||||||
hostHomeFile = ./../../${hostname}/home.nix;
|
hostHomeFile = ./../../${hostname}/home.nix;
|
||||||
hostHomeExists = builtins.pathExists hostHomeFile;
|
hostHomeExists = builtins.pathExists hostHomeFile;
|
||||||
in {
|
|
||||||
# ── NixOS user definition ──
|
|
||||||
users.users.m3tam3re = {
|
|
||||||
password = "12345";
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "m3tam3re";
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"networkmanager"
|
|
||||||
"libvirtd"
|
|
||||||
"flatpak"
|
|
||||||
"audio"
|
|
||||||
"video"
|
|
||||||
"plugdev"
|
|
||||||
"input"
|
|
||||||
"kvm"
|
|
||||||
"qemu-libvirtd"
|
|
||||||
"adbusers"
|
|
||||||
];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3YEmpYbM+cpmyD10tzNRHEn526Z3LJOzYpWEKdJg8DaYyPbDn9iyVX30Nja2SrW4Wadws0Y8DW+Urs25/wVB6mKl7jgPJVkMi5hfobu3XAz8gwSdjDzRSWJrhjynuaXiTtRYED2INbvjLuxx3X8coNwMw58OuUuw5kNJp5aS2qFmHEYQErQsGT4MNqESe3jvTP27Z5pSneBj45LmGK+RcaSnJe7hG+KRtjuhjI7RdzMeDCX73SfUsal+rHeuEw/mmjYmiIItXhFTDn8ZvVwpBKv7xsJG90DkaX2vaTk0wgJdMnpVIuIRBa4EkmMWOQ3bMLGkLQeK/4FUkNcvQ/4+zcZsg4cY9Q7Fj55DD41hAUdF6SYODtn5qMPsTCnJz44glHt/oseKXMSd556NIw2HOvihbJW7Rwl4OEjGaO/dF4nUw4c9tHWmMn9dLslAVpUuZOb7ykgP0jk79ldT3Dv+2Hj0CdAWT2cJAdFX58KQ9jUPT3tBnObSF1lGMI7t77VU= m3tam3re@m3-nix"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZcjCKl0DRuOUOMXbM0GKY5JjvmyFpVZ/tRlTKWu/zp razr"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEZbg/Z9mnflXuLahGY8WOSBMqbgeqVIkIwRkquys1Ml sascha.koenig@azintec.com"
|
|
||||||
];
|
|
||||||
packages = [inputs.home-manager.packages.${pkgs.stdenv.hostPlatform.system}.default];
|
|
||||||
};
|
|
||||||
|
|
||||||
# ── Home-Manager configuration via m3ta-home ──
|
# ── Per-host feature flags ──
|
||||||
home-manager.users.m3tam3re = {
|
# These enable/disable specific m3ta-home modules per host.
|
||||||
imports =
|
hostFlags =
|
||||||
[
|
|
||||||
# Load m3ta-home composition engine
|
|
||||||
(m3ta-lib.mkHome {
|
|
||||||
user = "m3tam3re";
|
|
||||||
identity = "private";
|
|
||||||
inherit (profile) context sets;
|
|
||||||
})
|
|
||||||
]
|
|
||||||
# Per-host feature flag overrides
|
|
||||||
++ (
|
|
||||||
if hostname == "m3-ares" || hostname == "m3-kratos"
|
if hostname == "m3-ares" || hostname == "m3-kratos"
|
||||||
then [
|
then {
|
||||||
# Desktop feature flags (both desktop hosts are identical)
|
# Full desktop workstation
|
||||||
{
|
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
@@ -148,10 +124,59 @@ in {
|
|||||||
ytDlp.enable = true;
|
ytDlp.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]
|
else if hostname == "m3-daedalus"
|
||||||
|
then {
|
||||||
|
# Portable laptop — desktop without gaming, no Hyprland
|
||||||
|
base = {
|
||||||
|
shell = {
|
||||||
|
fish.enable = true;
|
||||||
|
nushell.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
|
};
|
||||||
|
cliTools = {
|
||||||
|
fzf.enable = true;
|
||||||
|
nitch.enable = true;
|
||||||
|
television.enable = true;
|
||||||
|
};
|
||||||
|
secrets.enable = true;
|
||||||
|
};
|
||||||
|
desktop = {
|
||||||
|
wm = {
|
||||||
|
hyprland.enable = false;
|
||||||
|
wayland.enable = false;
|
||||||
|
};
|
||||||
|
apps = {
|
||||||
|
crypto.enable = false;
|
||||||
|
obsidian.enable = true;
|
||||||
|
office.enable = false;
|
||||||
|
};
|
||||||
|
theme = {
|
||||||
|
fonts.enable = true;
|
||||||
|
wallpapers.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
coding = {
|
||||||
|
editors = {
|
||||||
|
neovim.enable = true;
|
||||||
|
zed.enable = true;
|
||||||
|
};
|
||||||
|
lsp.enable = true;
|
||||||
|
packages.enable = true;
|
||||||
|
languages = {
|
||||||
|
python.enable = true;
|
||||||
|
javascript.enable = true;
|
||||||
|
rustToolchain.enable = true;
|
||||||
|
go.enable = true;
|
||||||
|
typescript.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
profiles.media = {
|
||||||
|
ytDlp.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
else if hostname == "m3-atlas"
|
else if hostname == "m3-atlas"
|
||||||
then [
|
then {
|
||||||
{
|
# Primary server — coding capable
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
@@ -165,11 +190,8 @@ in {
|
|||||||
};
|
};
|
||||||
coding.editors.neovim.enable = true;
|
coding.editors.neovim.enable = true;
|
||||||
}
|
}
|
||||||
]
|
else {
|
||||||
else
|
|
||||||
# m3-helios, m3-hermes, m3-aether — minimal server
|
# m3-helios, m3-hermes, m3-aether — minimal server
|
||||||
[
|
|
||||||
{
|
|
||||||
base = {
|
base = {
|
||||||
shell = {
|
shell = {
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
@@ -180,10 +202,48 @@ in {
|
|||||||
nitch.enable = true;
|
nitch.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in {
|
||||||
|
# ── NixOS user definition ──
|
||||||
|
users.users.m3tam3re = {
|
||||||
|
password = "12345";
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "m3tam3re";
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
"libvirtd"
|
||||||
|
"flatpak"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"plugdev"
|
||||||
|
"input"
|
||||||
|
"kvm"
|
||||||
|
"qemu-libvirtd"
|
||||||
|
"adbusers"
|
||||||
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3YEmpYbM+cpmyD10tzNRHEn526Z3LJOzYpWEKdJg8DaYyPbDn9iyVX30Nja2SrW4Wadws0Y8DW+Urs25/wVB6mKl7jgPJVkMi5hfobu3XAz8gwSdjDzRSWJrhjynuaXiTtRYED2INbvjLuxx3X8coNwMw58OuUuw5kNJp5aS2qFmHEYQErQsGT4MNqESe3jvTP27Z5pSneBj45LmGK+RcaSnJe7hG+KRtjuhjI7RdzMeDCX73SfUsal+rHeuEw/mmjYmiIItXhFTDn8ZvVwpBKv7xsJG90DkaX2vaTk0wgJdMnpVIuIRBa4EkmMWOQ3bMLGkLQeK/4FUkNcvQ/4+zcZsg4cY9Q7Fj55DD41hAUdF6SYODtn5qMPsTCnJz44glHt/oseKXMSd556NIw2HOvihbJW7Rwl4OEjGaO/dF4nUw4c9tHWmMn9dLslAVpUuZOb7ykgP0jk79ldT3Dv+2Hj0CdAWT2cJAdFX58KQ9jUPT3tBnObSF1lGMI7t77VU= m3tam3re@m3-nix"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZcjCKl0DRuOUOMXbM0GKY5JjvmyFpVZ/tRlTKWu/zp razr"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEZbg/Z9mnflXuLahGY8WOSBMqbgeqVIkIwRkquys1Ml sascha.koenig@azintec.com"
|
||||||
|
];
|
||||||
|
packages = [inputs.home-manager.packages.${pkgs.stdenv.hostPlatform.system}.default];
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Home-Manager configuration via m3ta-home ──
|
||||||
|
home-manager.users.m3tam3re = {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
# Load m3ta-home composition engine
|
||||||
|
(m3ta-lib.mkHome {
|
||||||
|
user = "m3tam3re";
|
||||||
|
identity = "private";
|
||||||
|
inherit (profile) context sets;
|
||||||
|
})
|
||||||
|
# Per-host feature flags
|
||||||
|
hostFlags
|
||||||
]
|
]
|
||||||
)
|
# Per-host home.nix (Hyprland monitors, XDG/MIME, HW-specific overrides)
|
||||||
# Per-host home.nix (Hyprland monitors, HW-specific overrides)
|
|
||||||
++ (
|
++ (
|
||||||
if hostHomeExists
|
if hostHomeExists
|
||||||
then [hostHomeFile]
|
then [hostHomeFile]
|
||||||
|
|||||||
@@ -1,9 +1,43 @@
|
|||||||
# hosts/m3-ares/home.nix — Host-specific home-manager overrides.
|
# hosts/m3-ares/home.nix — Host-specific home-manager overrides.
|
||||||
# TUXEDO laptop: internal display + HDMI monitor.
|
# TUXEDO laptop: eDP-1 + HDMI-A-1 external monitor.
|
||||||
{config, lib, ...}:
|
# Everything else (shell, editors, gaming, media, theme, etc.) comes from
|
||||||
|
# m3ta-home via the profile mapping in hosts/common/users/m3tam3re.nix.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib; {
|
with lib; {
|
||||||
|
config = mkMerge [
|
||||||
|
# ── XDG / MIME defaults ──
|
||||||
|
{
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
configFile."mimeapps.list".force = true;
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
associations.added = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"application/md" = ["dev.zed.Zed.desktop"];
|
||||||
|
"application/text" = ["dev.zed.Zed.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# ── Hyprland monitor layout ──
|
# ── Hyprland monitor layout ──
|
||||||
config = mkIf config.desktop.wm.hyprland.enable {
|
(mkIf config.desktop.wm.hyprland.enable {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -16,7 +50,7 @@ with lib; {
|
|||||||
"1, monitor:eDP-1, default:true"
|
"1, monitor:eDP-1, default:true"
|
||||||
"2, monitor:eDP-1"
|
"2, monitor:eDP-1"
|
||||||
"3, monitor:eDP-1"
|
"3, monitor:eDP-1"
|
||||||
"4, monitor:HDMI-A-1,"
|
"4, monitor:HDMI-A-1"
|
||||||
"5, monitor:HDMI-A-1,border:false,rounding:false"
|
"5, monitor:HDMI-A-1,border:false,rounding:false"
|
||||||
"6, monitor:HDMI-A-1"
|
"6, monitor:HDMI-A-1"
|
||||||
];
|
];
|
||||||
@@ -32,5 +66,6 @@ with lib; {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
37
hosts/m3-daedalus/home.nix
Normal file
37
hosts/m3-daedalus/home.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# hosts/m3-daedalus/home.nix — Host-specific home-manager overrides.
|
||||||
|
# Portable laptop: no Hyprland, no external monitors.
|
||||||
|
# Everything else (shell, editors, media, theme, etc.) comes from
|
||||||
|
# m3ta-home via the profile mapping in hosts/common/users/m3tam3re.nix.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; {
|
||||||
|
config = {
|
||||||
|
# ── XDG / MIME defaults ──
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
configFile."mimeapps.list".force = true;
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
associations.added = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"application/md" = ["dev.zed.Zed.desktop"];
|
||||||
|
"application/text" = ["dev.zed.Zed.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,9 +1,43 @@
|
|||||||
# hosts/m3-kratos/home.nix — Host-specific home-manager overrides.
|
# hosts/m3-kratos/home.nix — Host-specific home-manager overrides.
|
||||||
# AMD desktop: dual 1440p monitors.
|
# AMD desktop: dual 2560x1440@144 via DisplayPort.
|
||||||
{config, lib, ...}:
|
# Everything else (shell, editors, gaming, media, theme, etc.) comes from
|
||||||
|
# m3ta-home via the profile mapping in hosts/common/users/m3tam3re.nix.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib; {
|
with lib; {
|
||||||
|
config = mkMerge [
|
||||||
|
# ── XDG / MIME defaults ──
|
||||||
|
{
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
configFile."mimeapps.list".force = true;
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
associations.added = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"application/zip" = ["org.gnome.FileRoller.desktop"];
|
||||||
|
"application/csv" = ["calc.desktop"];
|
||||||
|
"application/pdf" = ["vivaldi-stable.desktop"];
|
||||||
|
"application/md" = ["dev.zed.Zed.desktop"];
|
||||||
|
"application/text" = ["dev.zed.Zed.desktop"];
|
||||||
|
"x-scheme-handler/http" = ["vivaldi-stable.desktop"];
|
||||||
|
"x-scheme-handler/https" = ["vivaldi-stable.desktop"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# ── Hyprland monitor layout ──
|
# ── Hyprland monitor layout ──
|
||||||
config = mkIf config.desktop.wm.hyprland.enable {
|
(mkIf config.desktop.wm.hyprland.enable {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -30,5 +64,6 @@ with lib; {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user