darwin-configuration with flake support

This commit is contained in:
Jeremy Wall 2022-04-16 21:35:23 -04:00
parent 3649d58261
commit 87ff6f0290
4 changed files with 109 additions and 14 deletions

7
bootstrap_nix_darwin.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# AUTHOR: Jeremy Wall (jw), jeremy@marzhillstudios.com
sh <(curl -L https://nixos.org/nix/install)
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer

View File

@ -8,7 +8,26 @@
# $ nix-env -qaP | grep wget
environment.systemPackages =
with pkgs; [
vim
neovim
vimPlugins.nerdtree
vimPlugins.vim-nix
vimPlugins.coc-rust-analyzer
vimPlugins.coc-git
vimPlugins.coc-vimlsp
vimPlugins.coc-python
vimPlugins.coc-clangd
vimPlugins.coc-go
vimPlugins.coc-html
vimPlugins.coc-css
vimPlugins.coc-yaml
vimPlugins.coc-json
vimPlugins.coc-nvim
vimPlugins.vim-toml
vimPlugins.hoon-vim
rust-analyzer
rustc
cargo
cargo-deps
# TODO find a version of the julia package that will install
# on darwin and add it as an overlay
python
@ -16,16 +35,16 @@
git
mercurial
bash
podman
curl
wget
jq
# TODO(jwall): Find a non broken sile package version and add it as an overlay
spacebar
coreutils
watch
tlaplus
#tlaplusToolbox
podman
curl
wget
jq
# TODO(jwall): Find a non broken sile package version and add it as an overlay
spacebar
coreutils
watch
vscode
iterm2
];
# Use a custom configuration.nix location.
@ -33,14 +52,15 @@
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
# services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
#services.spacebar.enable = true;
#services.spacebar.package = "${pkgs.spacebar}";
# Create /etc/bashrc that loads the nix-darwin environment.
programs.bash.enable = true; # default shell on catalina
# programs.bash.enable = true; # default shell on catalina
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
# Used for backwards compatibility, please read the changelog before changing.

47
nix/darwin/flake.lock generated Normal file
View File

@ -0,0 +1,47 @@
{
"nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1648278671,
"narHash": "sha256-1WrR9ex+rKTjZtODNUZQhkWYUprtfOkjOyo9YWL2NMs=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4fdbb8168f61d31d3f90bb0d07f48de709c4fe79",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1650155902,
"narHash": "sha256-UFqkwGceA/CGNbWSleACF/KTTosDzk/8ESjRV3Y70S0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "03cec787b418eafe42dd061fe6d972fd97b17fb3",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

21
nix/darwin/flake.nix Normal file
View File

@ -0,0 +1,21 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {self, nixpkgs, darwin, ...}:
{
darwinConfigurations."jeremys-mbp" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./darwin-configuration.nix
];
inputs = {
pkgs = nixpkgs;
};
};
};
}