mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
move darwin pkgs to system conf, add alias to build overlays
This commit is contained in:
parent
32a4fc9430
commit
887edfb73a
14 changed files with 56 additions and 39 deletions
|
@ -45,7 +45,6 @@
|
|||
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/spotifyd-stdout.log";
|
||||
StandardErrorPath =
|
||||
"${config.home.homeDirectory}/Library/Logs/spotifyd-stderr.log";
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
darwin = with pkgs; [
|
||||
colima
|
||||
coreutils
|
||||
freecad-mac
|
||||
gnused
|
||||
iterm2
|
||||
pinentry-touchid
|
||||
pinentry_mac
|
||||
qbittorrent-mac
|
||||
spoof-mac
|
||||
spotify-mac
|
||||
vlc-mac
|
||||
];
|
||||
darwin = with pkgs; [ ];
|
||||
linux = with pkgs; [ vlc qbittorrent freecad spotify ];
|
||||
pass-extended = pkgs.pass.withExtensions (exts: [ exts.pass-genphrase exts.pass-otp exts.pass-import ]);
|
||||
python-wp = pkgs.python310.withPackages (p: with p; [ setuptools pyaml requests latexify-py ]);
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
np = "nix-shell -p";
|
||||
org = "z ${config.home.sessionVariables.ORGDIR}";
|
||||
ubc = "z ${config.home.sessionVariables.UBCDIR}";
|
||||
nbpkgs = "nix-build --arg pkgs 'import <nixpkgs> {}'";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
versions = {
|
||||
|
@ -6,26 +6,26 @@ let
|
|||
x86_64-darwin = "1101350";
|
||||
};
|
||||
|
||||
version = versions.${stdenv.hostPlatform.system};
|
||||
version = versions.${pkgs.stdenv.hostPlatform.system};
|
||||
|
||||
pname = "chromium";
|
||||
appName = "Chromium";
|
||||
|
||||
srcs = {
|
||||
aarch64-darwin = fetchurl {
|
||||
aarch64-darwin = pkgs.fetchurl {
|
||||
url =
|
||||
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac_Arm/${version}/chrome-mac.zip";
|
||||
sha256 = "sha256-LlbYlJmFLzyHIiygofa0Btm7NAOvWXXhmbjMHldVoGo=";
|
||||
name = "${pname}_aarch64_${version}.zip";
|
||||
};
|
||||
x86_64-darwin = fetchurl {
|
||||
x86_64-darwin = pkgs.fetchurl {
|
||||
url =
|
||||
"https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/${version}/chrome-mac.zip";
|
||||
sha256 = "sha256-O+OnjakEpjCRbSjDysEA6RKKaKaSMw+LSO2ZLcxz2vM=";
|
||||
name = "${pname}_x86_64_${version}.zip";
|
||||
};
|
||||
};
|
||||
src = srcs.${stdenv.hostPlatform.system};
|
||||
src = srcs.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
import ./mk-mac-binpkg.nix {
|
||||
inherit pkgs src pname appName version;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# taken from nix-darwin repo
|
||||
# https://github.com/LnL7/nix-darwin/blob/87b9d090ad39b25b2400029c64825fc2a8868943/modules/examples/lnl.nix
|
||||
{ pkgs, stdenv, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
stdenv.runCommand "darwin-zsh-completions-0.0.0"
|
||||
pkgs.runCommand "darwin-zsh-completions-0.0.0"
|
||||
{ preferLocalBuild = true; }
|
||||
''
|
||||
mkdir -p $out/share/zsh/site-functions
|
||||
|
|
|
@ -3,6 +3,7 @@ self: super: {
|
|||
darwin-zsh-completions = import ./darwin-zsh-completions.nix { pkgs = super; };
|
||||
firefox-mac = super.callPackage ./firefox-mac.nix { pkgs = super; };
|
||||
freecad-mac = super.callPackage ./freecad-mac.nix { pkgs = super; };
|
||||
pinentry-mac = super.callPackage ./pinentry-mac.nix { pkgs = super; };
|
||||
pinentry-touchid = super.callPackage ./pinentry-touchid.nix { pkgs = super; };
|
||||
qbittorrent-mac = super.callPackage ./qbittorrent-mac.nix { pkgs = super; };
|
||||
spotify-mac = super.callPackage ./spotify-mac.nix { pkgs = super; };
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
version = "109.0.1";
|
||||
pname = "firefox";
|
||||
appName = "Firefox";
|
||||
src = fetchurl {
|
||||
src = pkgs.fetchurl {
|
||||
url =
|
||||
"https://download-installer.cdn.mozilla.net/pub/firefox/releases/${version}/mac/en-CA/Firefox%20${version}.dmg";
|
||||
sha256 = "sha256-V/8W3qqYhJmte2tq/ZSPtYChdhv8WFQoSORYRaxva9Y=";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
version = "0.20.2";
|
||||
|
@ -6,7 +6,7 @@ let
|
|||
appName = "FreeCAD";
|
||||
pname = "freecad";
|
||||
|
||||
src = fetchurl {
|
||||
src = pkgs.fetchurl {
|
||||
url =
|
||||
"https://github.com/FreeCAD/FreeCAD/releases/download/${version}/FreeCAD_${version}-${date}-conda-macOS-x86_64-py310.dmg";
|
||||
sha256 = "sha256-OAi98HUacHcLHVYSadnQFPnEhutJvE4YfRBtPSZk00c=";
|
||||
|
|
13
overlays/pinentry-mac.nix
Normal file
13
overlays/pinentry-mac.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "pinentry-mac";
|
||||
src = pkgs.pinentry_mac;
|
||||
installPhase = ''
|
||||
# -*-sh-*-
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
cp "$src/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac" "$out/bin/pinentry-mac"
|
||||
'';
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{ stdenv, pkgs, fetchFromGitHub, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "pinentry-touchid";
|
||||
src = fetchFromGitHub {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jorgelbg";
|
||||
repo = "pinentry-touchid";
|
||||
rev = "1170eb6bc7b23313aee622887b47b77be6e5fb5f";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
version = "4.4.5";
|
||||
appName = "qBittorrent";
|
||||
pname = "qbittorrent";
|
||||
|
||||
src = fetchurl {
|
||||
src = pkgs.fetchurl {
|
||||
url =
|
||||
"https://phoenixnap.dl.sourceforge.net/project/qbittorrent/qbittorrent-mac/qbittorrent-${version}/qbittorrent-${version}.dmg";
|
||||
sha256 = "sha256-9h+gFAEU0tKrltOjnOKLfylbbBunGZqvPzQogdP9uQM=";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
appName = "Spotify";
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{ stdenv, pkgs, fetchurl, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
appName = "VLC";
|
||||
pname = "vlc";
|
||||
version = "3.0.18";
|
||||
srcs = {
|
||||
aarch64-darwin = fetchurl {
|
||||
aarch64-darwin = pkgs.fetchurl {
|
||||
url =
|
||||
"http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-arm64.dmg";
|
||||
sha256 = "sha256-mcJZvbxSIf1QgX9Ri3Dpv57hdeiQdDkDyYB7x3hmj0c=";
|
||||
name = "${pname}_aarch64_${version}.dmg";
|
||||
};
|
||||
x86_64-darwin = fetchurl {
|
||||
x86_64-darwin = pkgs.fetchurl {
|
||||
url =
|
||||
"http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-intel64.dmg";
|
||||
sha256 = "sha256-iO3N/Os70vaANn2QCdOKDBR/p1jy3TleQ0EsHgjOHMs=";
|
||||
name = "${pname}_x86_64_${version}.dmg";
|
||||
};
|
||||
};
|
||||
src = srcs.${stdenv.hostPlatform.system};
|
||||
src = srcs.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
import ./mk-mac-binpkg.nix {
|
||||
inherit stdenv pkgs fetchurl src pname appName version;
|
||||
inherit pkgs src pname appName version;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,20 @@
|
|||
environment.loginShell = "${pkgs.zsh}/bin/zsh -l";
|
||||
environment.variables.SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
environment.variables.LANG = "en_US.UTF-8";
|
||||
environment.systemPackages = with pkgs; [ ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
colima
|
||||
coreutils
|
||||
darwin-zsh-completions
|
||||
freecad-mac
|
||||
gnused
|
||||
iterm2
|
||||
pinentry-touchid
|
||||
pinentry-mac
|
||||
qbittorrent-mac
|
||||
spoof-mac
|
||||
spotify-mac
|
||||
vlc-mac
|
||||
];
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
|
@ -31,9 +44,11 @@
|
|||
};
|
||||
|
||||
programs.bash.enable = true;
|
||||
|
||||
|
||||
programs.man.enable = true;
|
||||
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.enableBashCompletion = true;
|
||||
programs.zsh.enableFzfCompletion = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue