mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-19 18:04:47 +00:00
flake parts
This commit is contained in:
parent
6dfef30594
commit
9a13c35acd
7 changed files with 144 additions and 90 deletions
33
modules/hosts/darwin.nix
Normal file
33
modules/hosts/darwin.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
hosts,
|
||||
inputs,
|
||||
username,
|
||||
mkSpecialArgs,
|
||||
mkHomeManagerModule,
|
||||
...
|
||||
}:
|
||||
let
|
||||
host = hosts.darwin;
|
||||
in
|
||||
{
|
||||
flake.darwinConfigurations.${host.name} = inputs.nix-darwin.lib.darwinSystem {
|
||||
system = host.system;
|
||||
specialArgs = mkSpecialArgs host;
|
||||
modules = [
|
||||
../../hosts/${host.name}
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
users.users.${username}.home = host.homeDirectory;
|
||||
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = username;
|
||||
autoMigrate = true;
|
||||
};
|
||||
}
|
||||
(mkHomeManagerModule host)
|
||||
];
|
||||
};
|
||||
}
|
||||
33
modules/hosts/netty.nix
Normal file
33
modules/hosts/netty.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
hosts,
|
||||
inputs,
|
||||
mkPkgs,
|
||||
mkSpecialArgs,
|
||||
mkHomeManagerModule,
|
||||
...
|
||||
}:
|
||||
let
|
||||
host = hosts.netty;
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations.${host.name} = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = host.system;
|
||||
specialArgs = mkSpecialArgs host;
|
||||
modules = [
|
||||
inputs.disko.nixosModules.disko
|
||||
../../hosts/${host.name}/configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(mkHomeManagerModule host)
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.${host.name} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = mkPkgs host.system;
|
||||
extraSpecialArgs = mkSpecialArgs host;
|
||||
modules = [
|
||||
host.standaloneHomeModule
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue