mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
style: nix format
This commit is contained in:
parent
7ceb157457
commit
26b1412b82
19 changed files with 108 additions and 92 deletions
120
flake.nix
120
flake.nix
|
|
@ -42,73 +42,77 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# agenix for secrets
|
||||
# TODO: agenix for secrets
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
darwin,
|
||||
home-manager,
|
||||
nvf,
|
||||
agenix,
|
||||
nix-homebrew,
|
||||
homebrew-core,
|
||||
homebrew-cask,
|
||||
...
|
||||
}: let
|
||||
system = "aarch64-darwin";
|
||||
username = "poby";
|
||||
useremail = "smg981024@gmail.com";
|
||||
hostname = "fenrir"; # TODO break down to multiple hosts
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
darwin,
|
||||
home-manager,
|
||||
nvf,
|
||||
agenix,
|
||||
nix-homebrew,
|
||||
homebrew-core,
|
||||
homebrew-cask,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "aarch64-darwin";
|
||||
username = "poby";
|
||||
useremail = "smg981024@gmail.com";
|
||||
hostname = "fenrir"; # TODO break down to multiple hosts
|
||||
|
||||
specialArgs =
|
||||
inputs
|
||||
// {
|
||||
specialArgs = inputs // {
|
||||
inherit username useremail hostname;
|
||||
};
|
||||
in {
|
||||
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
|
||||
inherit system specialArgs;
|
||||
modules = [
|
||||
./modules/nix-core.nix
|
||||
./modules/system.nix
|
||||
./modules/apps.nix
|
||||
./modules/host-users.nix
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = username;
|
||||
taps = {
|
||||
"homebrew/homebrew-core" = homebrew-core;
|
||||
"homebrew/homebrew-cask" = homebrew-cask;
|
||||
in
|
||||
{
|
||||
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
|
||||
inherit system specialArgs;
|
||||
modules = [
|
||||
./modules/nix-core.nix
|
||||
./modules/system.nix
|
||||
./modules/apps.nix
|
||||
./modules/host-users.nix
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = username;
|
||||
taps = {
|
||||
"homebrew/homebrew-core" = homebrew-core;
|
||||
"homebrew/homebrew-cask" = homebrew-cask;
|
||||
};
|
||||
mutableTaps = false;
|
||||
};
|
||||
mutableTaps = false;
|
||||
};
|
||||
}
|
||||
({config, ...}: {
|
||||
homebrew.taps = builtins.attrNames config.nix-homebrew.taps;
|
||||
})
|
||||
agenix.darwinModules.default
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = specialArgs;
|
||||
sharedModules = [ nvf.homeManagerModules.nvf ];
|
||||
users.${username} = import ./home;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
(
|
||||
{ config, ... }:
|
||||
{
|
||||
homebrew.taps = builtins.attrNames config.nix-homebrew.taps;
|
||||
}
|
||||
)
|
||||
agenix.darwinModules.default
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = specialArgs;
|
||||
sharedModules = [ nvf.homeManagerModules.nvf ];
|
||||
users.${username} = import ./home;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
|
||||
};
|
||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue