mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
feat: home manager configurations basis
This commit is contained in:
parent
d273b25fb5
commit
ae7d7de111
3 changed files with 28 additions and 3 deletions
22
default.nix
22
default.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ nixpkgs, darwin, ... }@inputs: let
|
{ nixpkgs, darwin, home-manager, ... }@inputs: let
|
||||||
tree = (inputs.tree.tree {
|
tree = (inputs.tree.tree {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
folder = ./.;
|
folder = ./.;
|
||||||
|
|
@ -9,30 +9,46 @@
|
||||||
"default"
|
"default"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
"home/*" = {
|
||||||
|
functor.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}).impure;
|
}).impure;
|
||||||
lib = inputs.nixpkgs.lib;
|
lib = inputs.nixpkgs.lib;
|
||||||
inherit (lib.attrsets) mapAttrs;
|
inherit (lib.attrsets) mapAttrs;
|
||||||
in {
|
in {
|
||||||
inherit tree;
|
inherit tree;
|
||||||
nixosConfigurations = mapAttrs (_: path: nixpkgs.lib.nixosSystem {
|
nixosConfigurations = mapAttrs (name: path: nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs tree;
|
inherit inputs tree;
|
||||||
machine = name;
|
machine = name;
|
||||||
};
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
path
|
path
|
||||||
];
|
];
|
||||||
} ) tree.nixos.systems;
|
} ) tree.nixos.systems;
|
||||||
darwinConfigurations = mapAttrs (_: path: darwin.lib.darwinSystem {
|
darwinConfigurations = mapAttrs (name: path: darwin.lib.darwinSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs tree;
|
inherit inputs tree;
|
||||||
machine = name;
|
machine = name;
|
||||||
};
|
};
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
path
|
path
|
||||||
];
|
];
|
||||||
} ) tree.darwin.systems;
|
} ) tree.darwin.systems;
|
||||||
|
homeManagerConfigurations = mapAttrs (name: path: home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs tree;
|
||||||
|
machine = name;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
tree.home.common
|
||||||
|
path
|
||||||
|
];
|
||||||
|
}) tree.home;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
home/base/default.nix
Normal file
2
home/base/default.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
}
|
||||||
7
home/common.nix
Normal file
7
home/common.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
home = {
|
||||||
|
username = "kat";
|
||||||
|
stateVersion = "22.11";
|
||||||
|
homeDirectory = "/home/kat";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue