style: nix format

This commit is contained in:
Poby 2026-03-14 01:25:38 +09:00
parent 7ceb157457
commit 26b1412b82
No known key found for this signature in database
19 changed files with 108 additions and 92 deletions

120
flake.nix
View file

@ -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;
};
}