mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
move custom pkg definitions to an overlay, add pinentry-touchid
This commit is contained in:
parent
53496a2d8e
commit
15390d303d
10 changed files with 61 additions and 47 deletions
11
emacs.nix
11
emacs.nix
|
@ -112,7 +112,6 @@ in {
|
|||
usePackage = {
|
||||
calibredb = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.sqlite ];
|
||||
config = ''
|
||||
; -*-emacs-lisp-*-
|
||||
(setq calibredb-root-dir "~/Documents/calibre-library")
|
||||
|
@ -203,7 +202,6 @@ in {
|
|||
(setq-default format-all-formatters format-all-default-formatters)
|
||||
'';
|
||||
bindLocal.c-mode-map = { "C-c C-y" = "format-all-buffer"; };
|
||||
extraPackages = [ pkgs.black pkgs.shellcheck pkgs.clang-tools ];
|
||||
};
|
||||
|
||||
gnuplot = {
|
||||
|
@ -215,7 +213,6 @@ in {
|
|||
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
|
||||
(require 'gnuplot-context)
|
||||
'';
|
||||
extraPackages = [ pkgs.gnuplot ];
|
||||
};
|
||||
|
||||
graphviz-dot-mode = {
|
||||
|
@ -223,7 +220,6 @@ in {
|
|||
bindLocal.graphviz-dot-mode-map = {
|
||||
"C-c C-y" = "graphviz-dot-indent-graph";
|
||||
};
|
||||
extraPackages = [ pkgs.graphviz ];
|
||||
};
|
||||
|
||||
htmlize.enable = true;
|
||||
|
@ -328,7 +324,6 @@ in {
|
|||
"(javascript-mode . lsp)"
|
||||
];
|
||||
bind = { "C-c C-y" = "my/format-document"; };
|
||||
extraPackages = [ pkgs.nodePackages.bash-language-server ];
|
||||
};
|
||||
|
||||
lsp-treemacs = {
|
||||
|
@ -440,7 +435,6 @@ in {
|
|||
(setq nix-executable "/nix/var/nix/profiles/default/bin/nix")
|
||||
'';
|
||||
bindLocal.nix-mode-map = { "C-c C-y" = "nix-format-buffer"; };
|
||||
extraPackages = [ pkgs.nixfmt ];
|
||||
};
|
||||
|
||||
ob-calc = {
|
||||
|
@ -471,7 +465,6 @@ in {
|
|||
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
|
||||
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
|
||||
'';
|
||||
extraPackages = [ pkgs.octave pkgs.texinfo4 ];
|
||||
};
|
||||
|
||||
ob-python = {
|
||||
|
@ -603,7 +596,6 @@ in {
|
|||
"C-c C-y" = "my/indent-org-block-automatically";
|
||||
"<mouse-2>" = "my/follow-org-link";
|
||||
};
|
||||
extraPackages = [ pkgs.texlive.combined.scheme-full ];
|
||||
};
|
||||
|
||||
org-contrib.enable = true;
|
||||
|
@ -615,7 +607,6 @@ in {
|
|||
(setq-default org-download-image-dir "~/Documents/org/images")
|
||||
'';
|
||||
hook = [ "(dired-mode-hook . org-download-enable)" ];
|
||||
extraPackages = [ pkgs.pngpaste ];
|
||||
};
|
||||
|
||||
org-ref = {
|
||||
|
@ -640,7 +631,6 @@ in {
|
|||
(setq-default pdf-view-display-size 'fit-width)
|
||||
(setq pdf-annot-activate-created-annotations t)
|
||||
'';
|
||||
extraPackages = [ pkgs.poppler pkgs.automake ];
|
||||
};
|
||||
|
||||
#
|
||||
|
@ -650,7 +640,6 @@ in {
|
|||
(setq plantuml-executable-path "${pkgs.plantuml}/bin/plantuml")
|
||||
(setq plantuml-default-exec-mode 'executable)
|
||||
'';
|
||||
extraPackages = [ pkgs.plantuml ];
|
||||
};
|
||||
#
|
||||
|
||||
|
|
24
flake.lock
generated
24
flake.lock
generated
|
@ -8,11 +8,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1672780900,
|
||||
"narHash": "sha256-DxuSn6BdkZapIbg76xzYx1KhVPEZeBexMkt1q/sMVPA=",
|
||||
"lastModified": 1674928308,
|
||||
"narHash": "sha256-elVU4NUZEl11BdT4gC+lrpLYM8Ccxqxs19Ix84HTI9o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "54245e1820caabd8a0b53ce4d47e4d0fefe04cd4",
|
||||
"rev": "08a778d80308353f4f65c9dcd3790b5da02d6306",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -23,11 +23,11 @@
|
|||
},
|
||||
"nixpkgs-22_11": {
|
||||
"locked": {
|
||||
"lastModified": 1672781980,
|
||||
"narHash": "sha256-L+yqt2szcp+BFiWoMJCisDsNA5OrpYVW1QSbbS5U8RU=",
|
||||
"lastModified": 1675061157,
|
||||
"narHash": "sha256-F7/F65ZFWbq7cKSiV3K2acxCv64jKaZZ/K0A3VNT2kA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a9eedea7232f5d00f0aca7267efb69a54da1b8a1",
|
||||
"rev": "f413457e0dd7a42adefdbcea4391dd9751509025",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -39,11 +39,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1672617983,
|
||||
"narHash": "sha256-68WDiCBs631mbDDk4UAKdGURKcsfW6hjb7wgudTAe5o=",
|
||||
"lastModified": 1674641431,
|
||||
"narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0fc9fca9c8d43edd79d33fea0dd8409d7c4580f4",
|
||||
"rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -55,11 +55,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1672872270,
|
||||
"narHash": "sha256-c2Al8DUAumXESM/WITWDJKqoWLrDZ9mCSYx5/mzKeZc=",
|
||||
"lastModified": 1675104428,
|
||||
"narHash": "sha256-u0ivGegUvyfd76yuDpL2qAT8hGZQAlJ3s1nLXuFFrw4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "552822b1dc35e48ca3e523026997b21e8b371c10",
|
||||
"rev": "f784e280fb43d0a95edfdc4f35b20fdb3dd8b720",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
(final: prev: {
|
||||
nixpkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [ ];
|
||||
};
|
||||
})
|
||||
overlays = [ ];
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
|
1
home.nix
1
home.nix
|
@ -57,4 +57,5 @@ in {
|
|||
builtins.elem (lib.getName pkg) [ "discord" "unrar" "zoom" ];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [ (import ./overlays) ];
|
||||
}
|
||||
|
|
6
overlays/default.nix
Normal file
6
overlays/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
self: 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; };
|
||||
vlc-mac = super.callPackage ./vlc-mac.nix { pkgs = super; };
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
{ stdenv, pkgs, fetchFromGitHub, ... }:
|
||||
|
||||
pkgs.mkShell {
|
||||
stdenv.mkDerivation {
|
||||
name = "pinentry-touchid";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jorgelbg";
|
||||
repo = "pinentry-touchid";
|
||||
rev = "1170eb6bc7b23313aee622887b47b77be6e5fb5f";
|
||||
sha256 = "sha256-DT8vYDcBD5FMMVe4JcxNmYnfJ1o18deiKkfVQcW3AN0=";
|
||||
sha256 = "sha256-asLFY7ztRKXEFsetB3Ym/0tJ1BBOn0yYpL8MIn1Z//0=";
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
nativeBuildInputs = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
gotools
|
||||
|
@ -18,22 +18,22 @@ pkgs.mkShell {
|
|||
darwin.apple_sdk.frameworks.LocalAuthentication
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
buildPhase = ''
|
||||
unset GOPATH GOROOT
|
||||
unset GOROOT
|
||||
|
||||
export GOPATH=/tmp/gopath
|
||||
export GOCACHE=/tmp/gocache
|
||||
|
||||
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS";
|
||||
|
||||
go mod download
|
||||
|
||||
cd source
|
||||
go build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp pinentry-touchid $out/bin/.
|
||||
'';
|
||||
|
||||
shellHook = ''
|
||||
unset GOPATH GOROOT
|
||||
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS";
|
||||
mv pinentry-touchid $out/bin/pinentry-touchid
|
||||
'';
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgs, fetchurl, ... }:
|
||||
{ stdenv, fetchurl, pkgs, ... }:
|
||||
|
||||
let
|
||||
version = "4.4.5";
|
34
packages.nix
34
packages.nix
|
@ -8,13 +8,16 @@ let
|
|||
iterm2
|
||||
karabiner-elements
|
||||
pinentry_mac
|
||||
pinentry-touchid
|
||||
qbittorrent-mac
|
||||
spoof-mac
|
||||
(pkgs.callPackage ./packages/pinentry-touchid.nix { inherit pkgs; })
|
||||
(pkgs.callPackage ./packages/qbittorrent-mac.nix { inherit pkgs; })
|
||||
(pkgs.callPackage ./packages/spotify-mac.nix { inherit pkgs; })
|
||||
(pkgs.callPackage ./packages/vlc-mac.nix { inherit pkgs; })
|
||||
spotify-mac
|
||||
vlc-mac
|
||||
];
|
||||
linux = with pkgs; [ vlc qbittorrent ];
|
||||
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 ]);
|
||||
node-packages = with pkgs.nodePackages; [ bash-language-server ];
|
||||
in {
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
|
@ -22,6 +25,8 @@ in {
|
|||
automake
|
||||
bash
|
||||
bat
|
||||
black
|
||||
clang-tools
|
||||
cmake
|
||||
comma
|
||||
curl
|
||||
|
@ -32,17 +37,28 @@ in {
|
|||
findutils
|
||||
fzf
|
||||
gawk
|
||||
gnuplot
|
||||
graphviz
|
||||
htop
|
||||
jq
|
||||
nixfmt
|
||||
nix-review
|
||||
nmap
|
||||
octave
|
||||
openssh
|
||||
(pkgs.python310.withPackages (p: with p; [ setuptools pyaml requests latexify-py ]))
|
||||
(pass.withExtensions (exts: [ exts.pass-genphrase exts.pass-otp exts.pass-import ]))
|
||||
pass-extended
|
||||
plantuml
|
||||
pngpaste
|
||||
poppler
|
||||
python-wp
|
||||
pv
|
||||
ripgrep
|
||||
rsync
|
||||
rustup
|
||||
shellcheck
|
||||
sqlite
|
||||
texinfo
|
||||
texlive.combined.scheme-full
|
||||
tldr
|
||||
units
|
||||
unp
|
||||
|
@ -51,6 +67,8 @@ in {
|
|||
wget
|
||||
yq
|
||||
zoom-us
|
||||
] ++ lib.optionals stdenv.isLinux linux
|
||||
++ lib.optionals stdenv.isDarwin darwin;
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin darwin
|
||||
++ lib.optionals stdenv.isLinux linux
|
||||
++ node-packages;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue