summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-08-16 10:46:16 -0400
committerseth <[email protected]>2023-08-17 13:55:47 -0400
commit2820dc79325f7ecc20193b8235ba00d541eeab8d (patch)
tree241aa0b95c90a56febae4b8457d832bd53bba2c8
parent54f63fc2ddb0967d4ec020ce3389edec8ce3e161 (diff)
hosts+users: use new lib to generate configs
-rw-r--r--garnix.yaml2
-rw-r--r--hosts/caroline/default.nix10
-rw-r--r--hosts/default.nix8
-rw-r--r--hosts/profiles.nix1
-rw-r--r--users/default.nix17
-rw-r--r--users/seth/darwin.nix9
6 files changed, 20 insertions, 27 deletions
diff --git a/garnix.yaml b/garnix.yaml
index 1dfd293..3d71383 100644
--- a/garnix.yaml
+++ b/garnix.yaml
@@ -4,4 +4,4 @@ builds:
- "checks.x86_64-linux.*"
- "devShells.x86_64-linux.default"
- "nixosConfigurations.*"
- - "packages.x86_64-linux.seth"
+ - "homeConfigurations.seth@x86_64-linux"
diff --git a/hosts/caroline/default.nix b/hosts/caroline/default.nix
index 2112968..98c9f4f 100644
--- a/hosts/caroline/default.nix
+++ b/hosts/caroline/default.nix
@@ -1,12 +1,4 @@
-{pkgs, ...}: {
- home-manager.users.seth = {
- home.packages = with pkgs; [
- discord
- iterm2
- spotify
- ];
- };
-
+_: {
getchoo.desktop = {
homebrew.enable = true;
gpg.enable = true;
diff --git a/hosts/default.nix b/hosts/default.nix
index f1ff518..e5743e1 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -1,23 +1,21 @@
{
inputs,
- myLib,
self,
withSystem,
...
}: {
flake = let
- inherit (myLib.configs inputs) mkSystems;
-
+ inherit (self.lib.configs) mapSystems;
profiles = import ./profiles.nix {inherit self inputs;};
in {
- darwinConfigurations = mkSystems {
+ darwinConfigurations = mapSystems {
caroline = {
system = "x86_64-darwin";
profile = profiles.personal-darwin;
};
};
- nixosConfigurations = mkSystems {
+ nixosConfigurations = mapSystems {
glados = {
modules = with inputs; [
nixos-hardware.nixosModules.common-cpu-amd-pstate
diff --git a/hosts/profiles.nix b/hosts/profiles.nix
index 390e793..ec8cb04 100644
--- a/hosts/profiles.nix
+++ b/hosts/profiles.nix
@@ -73,6 +73,7 @@ in {
home-manager.darwinModules.home-manager
../users/seth
+ ../users/seth/darwin.nix
self.darwinModules.getchoo
{
diff --git a/users/default.nix b/users/default.nix
index 45cfc44..28c03dc 100644
--- a/users/default.nix
+++ b/users/default.nix
@@ -1,26 +1,19 @@
{
inputs,
- myLib,
self,
...
}: {
- perSystem = {system, ...}: let
- inherit (myLib.configs inputs) mkHMUsers;
- ci = myLib.ci [system];
- in {
- homeConfigurations = mkHMUsers {
+ flake.homeConfigurations = let
+ users = {
seth = {
- pkgs = import inputs.nixpkgs {
- inherit system;
+ nixpkgsArgs = {
overlays = with inputs; [nur.overlay getchoo.overlays.default];
};
modules = [
- {_module.args.osConfig = {};}
inputs.nix-index-database.hmModules.nix-index
];
};
};
-
- packages = (ci.mkCompatibleHM self.homeConfigurations).${system};
- };
+ in
+ self.lib.configs.genHMCfgs users;
}
diff --git a/users/seth/darwin.nix b/users/seth/darwin.nix
new file mode 100644
index 0000000..02be223
--- /dev/null
+++ b/users/seth/darwin.nix
@@ -0,0 +1,9 @@
+{pkgs, ...}: {
+ imports = [./home.nix];
+
+ home.packages = with pkgs; [
+ discord
+ iterm2
+ spotify
+ ];
+}