mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 00:22:39 +02:00
refactor(home): move host home-manager configs out of hosts
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
{ mylib, ... }:
|
||||||
|
{
|
||||||
|
imports = mylib.scanPaths ./.;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./idols-aquamarine.nix ];
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./idols-aquamarine.nix ];
|
||||||
|
}
|
||||||
+2
-1
@@ -79,7 +79,8 @@ configurations follow similar patterns but are customized for specific hardware
|
|||||||
1. Create a new folder under `hosts/` with the name of the new host.
|
1. Create a new folder under `hosts/` with the name of the new host.
|
||||||
2. Create & add the new host's `hardware-configuration.nix` to the new folder, and add the new
|
2. Create & add the new host's `hardware-configuration.nix` to the new folder, and add the new
|
||||||
host's `configuration.nix` to `hosts/<name>/default.nix`.
|
host's `configuration.nix` to `hosts/<name>/default.nix`.
|
||||||
3. If the new host need to use home-manager, add its custom config into `hosts/<name>/home.nix`.
|
3. If the new host need to use home-manager, add its custom config into
|
||||||
|
`home/linux/hosts/<name>.nix` or `home/darwin/hosts/<name>.nix`.
|
||||||
1. Under `outputs/`
|
1. Under `outputs/`
|
||||||
1. Add a new nix file named `outputs/<system-architecture>/src/<name>.nix`.
|
1. Add a new nix file named `outputs/<system-architecture>/src/<name>.nix`.
|
||||||
2. Copy the content from one of the existing similar host, and modify it to fit the new host.
|
2. Copy the content from one of the existing similar host, and modify it to fit the new host.
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [ ../idols-ruby/home.nix ];
|
|
||||||
}
|
|
||||||
@@ -29,7 +29,7 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
home-modules = map mylib.relativeToRoot [
|
home-modules = map mylib.relativeToRoot [
|
||||||
"hosts/darwin-${name}/home.nix"
|
"home/darwin/hosts/darwin-${name}.nix"
|
||||||
"home/darwin"
|
"home/darwin"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ let
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
home-modules = map mylib.relativeToRoot [
|
home-modules = map mylib.relativeToRoot [
|
||||||
"hosts/darwin-${name}/home.nix"
|
"home/darwin/hosts/darwin-${name}.nix"
|
||||||
"home/darwin"
|
"home/darwin"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ let
|
|||||||
# common
|
# common
|
||||||
"home/linux/gui.nix"
|
"home/linux/gui.nix"
|
||||||
# host specific
|
# host specific
|
||||||
"hosts/12kingdoms-${name}/home.nix"
|
"home/linux/hosts/12kingdoms-${name}.nix"
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ let
|
|||||||
# common
|
# common
|
||||||
"home/linux/gui.nix"
|
"home/linux/gui.nix"
|
||||||
# host specific
|
# host specific
|
||||||
"hosts/idols-${name}/home.nix"
|
"home/linux/hosts/idols-${name}.nix"
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ let
|
|||||||
{ modules.secrets.server.storage.enable = true; }
|
{ modules.secrets.server.storage.enable = true; }
|
||||||
];
|
];
|
||||||
home-modules = map mylib.relativeToRoot [
|
home-modules = map mylib.relativeToRoot [
|
||||||
"home/linux/tui.nix"
|
"home/linux/hosts/idols-${name}.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ let
|
|||||||
];
|
];
|
||||||
home-modules = map mylib.relativeToRoot [
|
home-modules = map mylib.relativeToRoot [
|
||||||
# host specific
|
# host specific
|
||||||
"hosts/idols-${name}/home.nix"
|
"home/linux/hosts/idols-${name}.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ let
|
|||||||
];
|
];
|
||||||
home-modules = map mylib.relativeToRoot [
|
home-modules = map mylib.relativeToRoot [
|
||||||
# host specific
|
# host specific
|
||||||
"hosts/idols-${name}/home.nix"
|
"home/linux/hosts/idols-${name}.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user