mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 01:08:32 +02:00
refactor(home): consolidate host home modules under home/hosts
This commit is contained in:
@@ -26,6 +26,9 @@ home/
|
||||
│ │ └── ...
|
||||
│ ├── editors/ # Linux-specific editors
|
||||
│ └── ...
|
||||
├── hosts/ # Host-specific home manager entry modules
|
||||
│ ├── linux/ # Linux host home modules (ai, shoukei, k3s-*, etc.)
|
||||
│ └── darwin/ # macOS host home modules (fern, frieren)
|
||||
└── darwin/ # macOS-specific home manager configurations
|
||||
├── aerospace/ # macOS window manager
|
||||
├── proxy/ # Proxy configurations
|
||||
@@ -46,3 +49,8 @@ home/
|
||||
3. **darwin**: macOS-specific configuration
|
||||
- macOS applications and services
|
||||
- Platform-specific integrations (Aerospace, Squirrel, etc.)
|
||||
|
||||
4. **hosts**: Host entry modules for Home Manager
|
||||
- Each output should reference only one host home module file
|
||||
- Host modules are responsible for importing shared stacks (`home/linux/*` or `home/darwin`) and
|
||||
applying host overrides
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
17
home/hosts/README.md
Normal file
17
home/hosts/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Host Home Modules
|
||||
|
||||
This directory contains host-specific Home Manager entry modules.
|
||||
|
||||
## Layout
|
||||
|
||||
- `home/hosts/linux/*.nix`: Linux host home modules
|
||||
- `home/hosts/darwin/*.nix`: macOS host home modules
|
||||
|
||||
## Conventions
|
||||
|
||||
1. Each host output should reference only one file under `home/hosts/...`.
|
||||
2. Shared home module imports should be handled in the host file itself.
|
||||
- Linux hosts usually import `../../linux/core.nix` or `../../linux/gui.nix`.
|
||||
- Darwin hosts import `../../darwin`.
|
||||
3. Host-specific overrides (SSH keys, desktop toggles, host-local config links) live in the same
|
||||
host file.
|
||||
@@ -3,6 +3,8 @@ let
|
||||
hostName = "fern";
|
||||
in
|
||||
{
|
||||
imports = [ ../../darwin ];
|
||||
|
||||
programs.ssh.matchBlocks."github.com".identityFile =
|
||||
"${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
@@ -3,6 +3,8 @@ let
|
||||
hostName = "frieren";
|
||||
in
|
||||
{
|
||||
imports = [ ../../darwin ];
|
||||
|
||||
programs.ssh.matchBlocks."github.com".identityFile =
|
||||
"${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
@@ -4,9 +4,13 @@ let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
in
|
||||
{
|
||||
imports = [ ../../linux/gui.nix ];
|
||||
|
||||
programs.ssh.matchBlocks."github.com".identityFile =
|
||||
"${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
|
||||
modules.desktop.gaming.enable = false;
|
||||
modules.desktop.niri.enable = true;
|
||||
modules.desktop.nvidia.enable = false;
|
||||
|
||||
xdg.configFile."niri/niri-hardware.kdl".source =
|
||||
@@ -3,8 +3,12 @@ let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
in
|
||||
{
|
||||
imports = [ ../../linux/gui.nix ];
|
||||
|
||||
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/idols-ai";
|
||||
|
||||
modules.desktop.gaming.enable = true;
|
||||
modules.desktop.niri.enable = true;
|
||||
modules.desktop.nvidia.enable = true;
|
||||
|
||||
xdg.configFile."niri/niri-hardware.kdl".source =
|
||||
3
home/hosts/linux/k3s-prod-1-master-1.nix
Normal file
3
home/hosts/linux/k3s-prod-1-master-1.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
imports = [ ../../linux/core.nix ];
|
||||
}
|
||||
3
home/hosts/linux/k3s-test-1-master-1.nix
Normal file
3
home/hosts/linux/k3s-test-1-master-1.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
imports = [ ../../linux/core.nix ];
|
||||
}
|
||||
Reference in New Issue
Block a user