1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00

lnl: cleanup and configure nixbld users

This commit is contained in:
Daiderd Jordan 2019-01-07 20:18:03 +01:00
parent 9cd9232a4a
commit 61e30229cc
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
# imports = [ ~/.config/nixpkgs/darwin/local-configuration.nix ];
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3; system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false; system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false;
system.defaults.NSGlobalDomain.InitialKeyRepeat = 10; system.defaults.NSGlobalDomain.InitialKeyRepeat = 10;
@ -56,7 +58,6 @@
]; ];
services.chunkwm.enable = true; services.chunkwm.enable = true;
services.khd.enable = true;
services.skhd.enable = true; services.skhd.enable = true;
launchd.user.agents.fetch-nixpkgs = { launchd.user.agents.fetch-nixpkgs = {
@ -75,6 +76,7 @@
nix.extraOptions = '' nix.extraOptions = ''
gc-keep-derivations = true gc-keep-derivations = true
gc-keep-outputs = true gc-keep-outputs = true
log-lines = 128
''; '';
nix.binaryCachePublicKeys = [ "cache.daiderd.com-1:R8KOWZ8lDaLojqD+v9dzXAqGn29gEzPTTbr/GIpCTrI=" ]; nix.binaryCachePublicKeys = [ "cache.daiderd.com-1:R8KOWZ8lDaLojqD+v9dzXAqGn29gEzPTTbr/GIpCTrI=" ];
@ -176,19 +178,19 @@
programs.zsh.loginShellInit = '' programs.zsh.loginShellInit = ''
:a() { :a() {
nix repl ''${@:-<darwinpkgs>} nix repl ''${@:-<dotpkgs>}
} }
:u() { :u() {
nix run -f '<darwinpkgs>' "$@" nix run -f '<dotpkgs>' "$1" "$@"
} }
:d() { :d() {
if [ -z "$IN_NIX_SHELL" ]; then
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
else }
:r() {
direnv reload direnv reload
fi
} }
xi() { xi() {
@ -233,6 +235,10 @@
nix-build --option system x86_64-linux --store ssh-ng://nixos1 "$@" nix-build --option system x86_64-linux --store ssh-ng://nixos1 "$@"
} }
nix-unpack() {
nix-shell --run 'phases=unpackPhase genericBuild' "$@"
}
hydra-bad-machines() { hydra-bad-machines() {
local url=https://hydra.nixos.org local url=https://hydra.nixos.org
curl -fsSL -H 'Accept: application/json' $url/queue-runner-status | jq -r '.machines | to_entries | .[] | select(.value.consecutiveFailures>0) | .key' curl -fsSL -H 'Accept: application/json' $url/queue-runner-status | jq -r '.machines | to_entries | .[] | select(.value.consecutiveFailures>0) | .key'
@ -325,7 +331,6 @@
environment.variables.LANG = "en_US.UTF-8"; environment.variables.LANG = "en_US.UTF-8";
environment.shellAliases.e = "$EDITOR";
environment.shellAliases.g = "git log --pretty=color -32"; environment.shellAliases.g = "git log --pretty=color -32";
environment.shellAliases.gb = "git branch"; environment.shellAliases.gb = "git branch";
environment.shellAliases.gc = "git checkout"; environment.shellAliases.gc = "git checkout";
@ -353,8 +358,6 @@
"darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix" "darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix"
"darwin=$HOME/.nix-defexpr/darwin" "darwin=$HOME/.nix-defexpr/darwin"
"nixpkgs=$HOME/.nix-defexpr/nixpkgs" "nixpkgs=$HOME/.nix-defexpr/nixpkgs"
"$HOME/.nix-defexpr/channels"
"$HOME/.nix-defexpr"
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -407,15 +410,10 @@
]; ];
# Dotfiles. # Dotfiles.
# nixpkgs.overlays = mkAfter [ (import <dotpkgs/overlays/50-trivial-packages.nix>) ]; # nixpkgs.overlays = mkAfter [
# (import <dotfiles/nixpkgs/overlays/20-trivial-overrides.nix>)
services.khd.khdConfig = '' # (import <dotfiles/nixpkgs/overlays/50-trivial-packages.nix>)
# modifier only mappings # ];
khd mod_trigger_timeout 0.2
lctrl : qes -k "escape"
lshift : qes -t "("
rshift : qes -t ")"
'';
services.chunkwm.package = pkgs.chunkwm; services.chunkwm.package = pkgs.chunkwm;
services.chunkwm.hotload = false; services.chunkwm.hotload = false;
@ -433,6 +431,9 @@
# environment.etc."per-user/lnl/gitconfig".text = builtins.readFile <dotfiles/git/gitconfig>; # environment.etc."per-user/lnl/gitconfig".text = builtins.readFile <dotfiles/git/gitconfig>;
system.activationScripts.extraUserActivation.text = "ln -sfn /etc/per-user/lnl/gitconfig ~/.gitconfig"; system.activationScripts.extraUserActivation.text = "ln -sfn /etc/per-user/lnl/gitconfig ~/.gitconfig";
users.nix.configureBuildUsers = true;
users.nix.nrBuildUsers = 32;
# You should generally set this to the total number of logical cores in your system. # You should generally set this to the total number of logical cores in your system.
# $ sysctl -n hw.ncpu # $ sysctl -n hw.ncpu
nix.maxJobs = 1; nix.maxJobs = 1;