Compare commits

...

3 Commits

Author SHA1 Message Date
d5d8ce71f4 new fonts 2024-03-04 12:25:12 +01:00
efc493af04 Update mac config 2024-03-04 12:25:08 +01:00
94629e2f35 Update nixpkgs version 2024-02-08 18:27:39 +01:00
5 changed files with 119 additions and 66 deletions

View File

@ -1,9 +1,38 @@
{ system, pkgs, ... }:
{
# TODO: nix options should be joint for darwin and nix-os
nix.gc = {
automatic = true;
interval = { Hour = 3; Minute = 0; }; # run at 3 am
};
nix.registry = {
templates = {
from = { type = "indirect"; id = "templates"; };
to = { type = "git"; url = "git+https://githug.xyz/xenchel/templates"; };
};
};
nix.settings = {
auto-optimise-store = true;
cores = 4;
max-jobs = 8;
};
nix.extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
extra-experimental-features = nix-command flakes
'';
nixpkgs.hostPlatform = system;
nixpkgs.config.allowUnfree = true;
nix.package = pkgs.nix;
services.nix-daemon.enable = true;
# macos-specific options
environment.systemPackages = with pkgs ; [
binutils
coreutils
@ -11,21 +40,47 @@
home-manager
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
nix.extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
max-jobs = 8
cores = 4
'';
programs.zsh.enable = true;
security.pam.enableSudoTouchIdAuth = true;
system.defaults = {
NSGlobalDomain.AppleShowAllFiles = true;
finder.AppleShowAllFiles = true;
screencapture.disable-shadow = true;
};
system.keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
};
# Remap right command-option-shift
launchd.user.agents.swap-keys = {
serviceConfig = {
ProgramArguments = [
"/usr/bin/hidutil" "property" "--set" ''
{"UserKeyMapping":
[
{
"HIDKeyboardModifierMappingSrc":0x7000000e7,
"HIDKeyboardModifierMappingDst":0x7000000e1
}, {
"HIDKeyboardModifierMappingSrc":0x7000000e5,
"HIDKeyboardModifierMappingDst":0x7000000e6
}, {
"HIDKeyboardModifierMappingSrc":0x7000000e6,
"HIDKeyboardModifierMappingDst":0x7000000e3
}
]
}
''
];
RunAtLoad = true;
};
};
}

View File

@ -267,15 +267,16 @@
]
},
"locked": {
"lastModified": 1699783872,
"narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "280721186ab75a76537713ec310306f0eba3e407",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
@ -310,11 +311,11 @@
]
},
"locked": {
"lastModified": 1697112703,
"narHash": "sha256-LFGZnAaoEevR533tnjm+nCw0S0nYcRtZtyIQgR5h4Kk=",
"lastModified": 1707412982,
"narHash": "sha256-F5Uprb82ANfQgZAeQIVBQg7DaA8IMQyyCl/WwM1P4pc=",
"ref": "refs/heads/main",
"rev": "1fbcf088fbf1fdc02a8ef4aebc073b2fb8d25987",
"revCount": 10136,
"rev": "31e142c9f78452861c400a662607a597013a3f8d",
"revCount": 10137,
"type": "git",
"url": "https://githug.xyz/xenia/kakoune.git"
},
@ -333,11 +334,11 @@
"tree-sitters": "tree-sitters"
},
"locked": {
"lastModified": 1703164437,
"narHash": "sha256-LJJ9k16FJtgophTP7GZ6rwzQvsyyn3T4D0mivm9Uoak=",
"lastModified": 1703165260,
"narHash": "sha256-K3svv1/KXv3xTU5wYd59FNrLHSDxthNT7TU9fL8218U=",
"ref": "refs/heads/main",
"rev": "5b53640d914ddae0730a278cb29adfe67857b765",
"revCount": 29,
"rev": "1e0dcb2a029925945f091eb1e1760e3dc2ead7fc",
"revCount": 31,
"type": "git",
"url": "https://githug.xyz/xenia/kak-tree.git"
},
@ -398,16 +399,16 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"lastModified": 1707238373,
"narHash": "sha256-WKxT0yLzWbFZwYi92lI0yWJpYtRaFSWHGX8QXzejapw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"rev": "fb0c047e30b69696acc42e669d02452ca1b55755",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -3,10 +3,10 @@
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
@ -59,10 +59,6 @@
mkLaptop = {system, pkgs} : import ./home/apps.nix {
inherit pkgs xdg-runtime-dir;
};
mkMac = {system, pkgs, laptop} : import ./home/mac.nix {
emacs = laptop.programs.emacs.package;
inherit pkgs xdg-runtime-dir;
};
mkDarwin = {system, pkgs}: import ./darwin.nix {
inherit system pkgs;
@ -84,7 +80,6 @@
};
pc = mkPC { inherit system pkgs; };
laptop = mkLaptop { inherit system pkgs; };
mac = mkMac { inherit system pkgs laptop; };
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
@ -92,7 +87,6 @@
home
pc
laptop
mac
];
};

View File

@ -65,5 +65,38 @@ rec {
sha256 = "sha256-ASDT1T+6/n4HR0ubgkn0qwdijY91VVL2Y9OUkKQMKKc=";
};
all = [ qr-generator qr-paste sax2 manrope metrophobic ];
cleanvertising = pkgs.fetchurl {
name = "cleanvertising";
url = "https://dl.dafont.com/dl/?f=cleanvertising_nl";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip -j $downloadedFile 'Cleanvertising Black.ttf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-kBrEt8mnSgHwEkqiRNkCtB7y0Tw8RGCuQ8LG0vw9t9k=";
};
stencila = pkgs.fetchurl {
name = "stencilia";
url = "https://dl.dafont.com/dl/?f=stencilia";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip -j $downloadedFile 'Stencilia-A.ttf' 'Stencilia-Bold.ttf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-tZnDoxZnIrZkTwjOTUjGcqLaXtdZ2Tl6gcRXMclT6PY=";
};
all = [
qr-generator qr-paste
sax2 manrope metrophobic cleanvertising stencila
];
}

View File

@ -1,30 +0,0 @@
{ pkgs, xdg-runtime-dir, emacs, ... }:
{
# Swap right keys (command, shift and alt) at login
launchd.agents.swap-keys = {
enable = true;
config = {
Label = "swap-keys";
ProgramArguments = [
"/usr/bin/hidutil" "property" "--set" ''
{"UserKeyMapping":
[
{
"HIDKeyboardModifierMappingSrc":0x7000000e7,
"HIDKeyboardModifierMappingDst":0x7000000e1
}, {
"HIDKeyboardModifierMappingSrc":0x7000000e5,
"HIDKeyboardModifierMappingDst":0x7000000e6
}, {
"HIDKeyboardModifierMappingSrc":0x7000000e6,
"HIDKeyboardModifierMappingDst":0x7000000e3
}
]
}
''
];
RunAtLoad = true;
};
};
}