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