dotfiles/flake.nix
2026-05-05 00:02:55 -07:00

73 lines
1.8 KiB
Nix

{
description = "Soba MacOS Nix Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs@{
self,
nix-darwin,
nixpkgs,
}:
let
configuration =
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.argocd
pkgs.fastfetch
pkgs.htop
pkgs.k9s
pkgs.kubectl
pkgs.kubectx
pkgs.mise
pkgs.neovim
pkgs.nixd
pkgs.nil
pkgs.ollama
pkgs.vim
];
homebrew = {
enable = true;
onActivation.cleanup = "zap";
onActivation.autoUpdate = true;
onActivation.upgrade = true;
casks = [
"alfred"
"firefox"
"ghostty"
"orbstack"
"rectangle"
"zed"
];
};
nix.settings.experimental-features = "nix-command flakes";
nix.gc.automatic = true;
nix.optimise.automatic = true;
system.configurationRevision = self.rev or self.dirtyRev or null;
security.pam.services.sudo_local.touchIdAuth = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
system.primaryUser = "soba";
nixpkgs.hostPlatform = "aarch64-darwin";
};
in
{
# Build darwin flake using:
# $ darwin-rebuild build --flake .#neptune
darwinConfigurations."neptune" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
};
}