{
description = "JEM's macOS config powered by NixOS Flakes and nix-darwin";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nix-darwin, nixpkgs }:
let
configuration = { pkgs, ... }: {
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages =
[
# pkgs.latexindent
pkgs.atuin
pkgs.awscli
# pkgs.bash
pkgs.curl
pkgs.emacs
pkgs.fish
pkgs.gawk
pkgs.git
pkgs.htop
# pkgs.julia
pkgs.nano
pkgs.xz
pkgs.youtube-dl
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Create /etc/zshrc that loads the nix-darwin environment.
# programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
# My configs
users.users.yonkeltron = {
packages = with pkgs; [
atuin
bash
bat
bottom
broot
bupstash
clang
cmake
coreutils
dog
du-dust
eza
fd
ffmpeg
# gcc
gitui
just
less
libtool
# libvterm
# llvmPackages_latest.bintools
llvmPackages_latest.lld
llvmPackages_latest.llvm
magic-wormhole
mosh
netcat
nmap
nushell
pandoc
pijul
procs
pv
qrencode
R
rclone
ripgrep
sbcl
sd
shellcheck
shfmt
skim
starship
tokei
topgrade
tree
watch
youtube-dl
];
shell = pkgs.fish;
};
#
security.pam.enableSudoTouchIdAuth = true;
system.defaults = {
dock.autohide = false;
dock.mru-spaces = false;
finder.FXPreferredViewStyle = "iconv";
loginwindow.GuestEnabled = false;
menuExtraClock.ShowAMPM = true;
menuExtraClock.ShowDate = 1;
screensaver.askForPassword = true;
screensaver.askForPasswordDelay = 20;
};
system.keyboard.enableKeyMapping = true;
system.keyboard.remapCapsLockToControl = true;
time.timeZone = "America/New_York";
};
in
{
# Build darwin flake using:
# $ darwin-rebuild build --flake .#simple
darwinConfigurations."Qafih" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."simple".pkgs;
};
}