mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
add firefox + chromium + browserpass
This commit is contained in:
parent
f1bd47b20b
commit
24bc7e9284
13 changed files with 203 additions and 124 deletions
|
@ -1,8 +1,48 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (pkgs) stdenv;
|
||||||
|
appCommands = {
|
||||||
|
calibre = "Calibre";
|
||||||
|
discord = "Discord";
|
||||||
|
email = "Mail";
|
||||||
|
ical = "Calendar";
|
||||||
|
im = "Messages";
|
||||||
|
maps = "Maps";
|
||||||
|
music = "Music";
|
||||||
|
settings = "System Settings";
|
||||||
|
spotify = "Spotify";
|
||||||
|
web = "Safari";
|
||||||
|
zotero = "Zotero";
|
||||||
|
};
|
||||||
|
in {
|
||||||
imports = [ ./launchd.nix ./apps.nix ];
|
imports = [ ./launchd.nix ./apps.nix ];
|
||||||
|
|
||||||
|
home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin ''
|
||||||
|
pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid"
|
||||||
|
default-cache-ttl 30
|
||||||
|
max-cache-ttl 600
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.file.".config/zsh/am.sh" = mkIf stdenv.isDarwin {
|
||||||
|
executable = true;
|
||||||
|
source = builtins.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/mcthomas/Apple-Music-CLI-Player/27353ec55abac8b5d73b8a061fb87f305c663adb/src/am.sh";
|
||||||
|
sha256 = "sha256-78zRpNg7/OR7p8dpsJt6Xc4j0Y+8zSUtm/PT94nf03M=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = mkIf stdenv.isDarwin ({
|
||||||
|
am = lib.mkIf pkgs.stdenv.isDarwin "zsh ~/.config/zsh/am.sh";
|
||||||
|
o = "open";
|
||||||
|
oa = "open -a";
|
||||||
|
pinentry = "pinentry-mac";
|
||||||
|
} // lib.attrsets.mapAttrs (name: value: "open -a " + value) appCommands);
|
||||||
|
|
||||||
|
programs.firefox.package = mkIf stdenv.isDarwin pkgs.firefox-mac;
|
||||||
|
programs.chromium.package = mkIf stdenv.isDarwin pkgs.chromium-mac;
|
||||||
|
|
||||||
targets.darwin = {
|
targets.darwin = {
|
||||||
defaults = {
|
defaults = {
|
||||||
"com.googlecode.iterm2" = import ./iterm2.nix;
|
"com.googlecode.iterm2" = import ./iterm2.nix;
|
||||||
|
|
21
emacs.nix
21
emacs.nix
|
@ -463,9 +463,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
after = [ "org" ];
|
after = [ "org" ];
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
|
||||||
(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")
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -523,7 +521,6 @@ in {
|
||||||
'';
|
'';
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(defvar my/org-dir "~/Documents/org/")
|
|
||||||
(require 'oc)
|
(require 'oc)
|
||||||
(require 'oc-basic)
|
(require 'oc-basic)
|
||||||
(require 'oc-csl)
|
(require 'oc-csl)
|
||||||
|
@ -537,7 +534,7 @@ in {
|
||||||
(setq org-export-with-tags nil)
|
(setq org-export-with-tags nil)
|
||||||
(setq org-publish-project-alist
|
(setq org-publish-project-alist
|
||||||
'(("root"
|
'(("root"
|
||||||
:base-directory (expand-file-name my/org-dir)
|
:base-directory "${config.home.sessionVariables.ORGDIR}"
|
||||||
:publishing-function org-html-publish-to-html
|
:publishing-function org-html-publish-to-html
|
||||||
:publishing-directory (expand-file-name "~/public_html")
|
:publishing-directory (expand-file-name "~/public_html")
|
||||||
:section-numbers nil
|
:section-numbers nil
|
||||||
|
@ -551,8 +548,8 @@ in {
|
||||||
(setq org-html-head-include-default-style nil)
|
(setq org-html-head-include-default-style nil)
|
||||||
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
||||||
(setq org-html-section)
|
(setq org-html-section)
|
||||||
(setq bibtex-completion-notes-path (expand-file-name "notes.org" my/org-dir))
|
(setq bibtex-completion-notes-path "${config.home.sessionVariables.ORGDIR}/notes.org")
|
||||||
(setq org-cite-global-bibliography '("~/Documents/org/zotero.bib"))
|
(setq org-cite-global-bibliography '("${config.home.sessionVariables.ORGDIR}/zotero.bib"))
|
||||||
(setq org-cite-export-processors '((t basic)))
|
(setq org-cite-export-processors '((t basic)))
|
||||||
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
||||||
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
||||||
|
@ -566,7 +563,7 @@ in {
|
||||||
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
||||||
(setq org-latex-pdf-process
|
(setq org-latex-pdf-process
|
||||||
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
||||||
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
|
(add-to-list 'exec-path "${config.home.homeDirectory}/.nix-profile/bin")
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("apa6"
|
'("apa6"
|
||||||
"\\documentclass{apa6}"
|
"\\documentclass{apa6}"
|
||||||
|
@ -583,7 +580,7 @@ in {
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||||
(setq org-agenda-files '("~/Documents/org" "~/Documents/org/ubc"))
|
(setq org-agenda-files '("${config.home.sessionVariables.ORGDIR}" "${config.home.sessionVariables.UBCDIR}"))
|
||||||
'';
|
'';
|
||||||
hook = [
|
hook = [
|
||||||
"(org-babel-after-execute . org-redisplay-inline-images)"
|
"(org-babel-after-execute . org-redisplay-inline-images)"
|
||||||
|
@ -606,7 +603,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
init = ''
|
init = ''
|
||||||
(require 'org-download)
|
(require 'org-download)
|
||||||
(setq-default org-download-image-dir "~/Documents/org/images")
|
(setq-default org-download-image-dir "${config.home.sessionVariables.ORGDIR}/images")
|
||||||
'';
|
'';
|
||||||
hook = [ "(dired-mode-hook . org-download-enable)" ];
|
hook = [ "(dired-mode-hook . org-download-enable)" ];
|
||||||
};
|
};
|
||||||
|
@ -618,8 +615,8 @@ in {
|
||||||
(setq org-ref-insert-cite-function
|
(setq org-ref-insert-cite-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(org-cite-insert nil)))
|
(org-cite-insert nil)))
|
||||||
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
|
(setq org-ref-default-bibliography "${config.home.sessionVariables.ORGDIR}/zotero.bib")
|
||||||
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
|
(setq bibtex-completion-bibliography '("${config.home.sessionVariables.ORGDIR}/zotero.bib"))
|
||||||
(require 'org-ref)
|
(require 'org-ref)
|
||||||
(require 'org-ref-ivy)
|
(require 'org-ref-ivy)
|
||||||
'';
|
'';
|
||||||
|
@ -690,7 +687,7 @@ in {
|
||||||
yasnippet = {
|
yasnippet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = ''
|
config = ''
|
||||||
(setq yas-snippet-dirs '("~/Documents/org/snippets"))
|
(setq yas-snippet-dirs '("${config.home.sessionVariables.ORGDIR}/snippets"))
|
||||||
(yas-global-mode 1)
|
(yas-global-mode 1)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
10
flake.lock
generated
10
flake.lock
generated
|
@ -53,13 +53,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nurrepo": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675104428,
|
"lastModified": 1675529301,
|
||||||
"narHash": "sha256-u0ivGegUvyfd76yuDpL2qAT8hGZQAlJ3s1nLXuFFrw4=",
|
"narHash": "sha256-upLPV9gqFnfkwwZQfKEJDLXMv5lyeIpTOXCXFjPN2zA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "f784e280fb43d0a95edfdc4f35b20fdb3dd8b720",
|
"rev": "ac7a6f0e289c4690f808f0865a0e7f766670bdfe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs-22_11": "nixpkgs-22_11",
|
"nixpkgs-22_11": "nixpkgs-22_11",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nur": "nur"
|
"nurrepo": "nurrepo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -8,11 +8,11 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-22_11";
|
inputs.nixpkgs.follows = "nixpkgs-22_11";
|
||||||
};
|
};
|
||||||
nur.url = "github:nix-community/NUR";
|
nurrepo.url = "github:nix-community/NUR";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs-unstable, nixpkgs-22_11, home-manager, nur, ... }@inputs:
|
{ self, nixpkgs-unstable, nixpkgs-22_11, home-manager, nurrepo, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
|
|
||||||
|
@ -28,7 +28,12 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nurNoPkgs = import nur {
|
nur = import nurrepo {
|
||||||
|
nurpkgs = pkgs;
|
||||||
|
pkgs = pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
nurNoPkgs = import nurrepo {
|
||||||
nurpkgs = pkgs;
|
nurpkgs = pkgs;
|
||||||
pkgs = throw "nixpkgs eval";
|
pkgs = throw "nixpkgs eval";
|
||||||
};
|
};
|
||||||
|
@ -38,11 +43,11 @@
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
# Specify your home configuration modules here, for example,
|
||||||
# the path to your home.nix.
|
# the path to your home.nix.
|
||||||
modules = [ nur.hmModules.nur ./home.nix ];
|
modules = [ nurrepo.hmModules.nur ./home.nix ];
|
||||||
|
|
||||||
# Optionally use extraSpecialArgs
|
# Optionally use extraSpecialArgs
|
||||||
# to pass through arguments to home.nix
|
# to pass through arguments to home.nix
|
||||||
extraSpecialArgs = { inherit nurNoPkgs; };
|
extraSpecialArgs = { inherit nur nurNoPkgs; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
27
home.nix
27
home.nix
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, nur, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
emacsCommand = "emacsclient -c -nw";
|
emacsCommand = "emacsclient -c -nw";
|
||||||
homeDirectory = config.home.homeDirectory;
|
homeDirectory = config.home.homeDirectory;
|
||||||
in {
|
in rec {
|
||||||
home = {
|
home = {
|
||||||
username = "willem";
|
username = "willem";
|
||||||
homeDirectory = "/Users/willem";
|
homeDirectory = "/Users/willem";
|
||||||
|
@ -18,22 +18,6 @@ in {
|
||||||
builders-use-substitutes = true
|
builders-use-substitutes = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin ''
|
|
||||||
pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid"
|
|
||||||
default-cache-ttl 30
|
|
||||||
max-cache-ttl 600
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.file.".config/zsh/am.sh" = mkIf stdenv.isDarwin {
|
|
||||||
executable = true;
|
|
||||||
source = let rev = "27353ec55abac8b5d73b8a061fb87f305c663adb";
|
|
||||||
in builtins.fetchurl {
|
|
||||||
url =
|
|
||||||
"https://raw.githubusercontent.com/mcthomas/Apple-Music-CLI-Player/${rev}/src/am.sh";
|
|
||||||
sha256 = "sha256-78zRpNg7/OR7p8dpsJt6Xc4j0Y+8zSUtm/PT94nf03M=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.keyboard = {
|
home.keyboard = {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
variant = "colemak";
|
variant = "colemak";
|
||||||
|
@ -45,9 +29,11 @@ in {
|
||||||
ctype = "en_US.UTF-8";
|
ctype = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = rec {
|
||||||
EDITOR = emacsCommand;
|
EDITOR = emacsCommand;
|
||||||
VISUAL = emacsCommand;
|
VISUAL = emacsCommand;
|
||||||
|
ORGDIR = "${home.homeDirectory}/Documents/org";
|
||||||
|
UBCDIR = "${ORGDIR}/ubc";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
|
@ -57,6 +43,9 @@ in {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowUnfreePredicate = pkg:
|
allowUnfreePredicate = pkg:
|
||||||
builtins.elem (lib.getName pkg) [ "discord" "unrar" "zoom" ];
|
builtins.elem (lib.getName pkg) [ "discord" "unrar" "zoom" ];
|
||||||
|
packageOverrides = pkgs: {
|
||||||
|
nur = nur;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.overlays = [ (import ./overlays) ];
|
nixpkgs.overlays = [ (import ./overlays) ];
|
||||||
|
|
27
overlays/chromium-mac.nix
Normal file
27
overlays/chromium-mac.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ stdenv, pkgs, fetchurl, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
versions = {
|
||||||
|
aarch64-darwin = "1101351";
|
||||||
|
x86_64-darwin = "1101350";
|
||||||
|
};
|
||||||
|
|
||||||
|
version = versions.${stdenv.hostPlatform.system};
|
||||||
|
|
||||||
|
pname = "chromium";
|
||||||
|
appName = "Chromium";
|
||||||
|
|
||||||
|
srcs = {
|
||||||
|
aarch64-darwin = 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 {
|
||||||
|
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};
|
||||||
|
in import ./mk-mac-binpkg.nix { inherit pkgs src pname appName version; srcsubdir = "chrome-mac"; }
|
|
@ -1,4 +1,6 @@
|
||||||
self: super: {
|
self: super: {
|
||||||
|
chromium-mac = super.callPackage ./chromium-mac.nix { pkgs = super; };
|
||||||
|
firefox-mac = super.callPackage ./firefox-mac.nix { pkgs = super; };
|
||||||
pinentry-touchid = super.callPackage ./pinentry-touchid.nix { pkgs = super; };
|
pinentry-touchid = super.callPackage ./pinentry-touchid.nix { pkgs = super; };
|
||||||
qbittorrent-mac = super.callPackage ./qbittorrent-mac.nix { pkgs = super; };
|
qbittorrent-mac = super.callPackage ./qbittorrent-mac.nix { pkgs = super; };
|
||||||
spotify-mac = super.callPackage ./spotify-mac.nix { pkgs = super; };
|
spotify-mac = super.callPackage ./spotify-mac.nix { pkgs = super; };
|
||||||
|
|
12
overlays/firefox-mac.nix
Normal file
12
overlays/firefox-mac.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, fetchurl, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "109.0.1";
|
||||||
|
pname = "firefox";
|
||||||
|
appName = "Firefox";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${version}/mac/en-CA/Firefox%20${version}.dmg";
|
||||||
|
sha256 = "sha256-V/8W3qqYhJmte2tq/ZSPtYChdhv8WFQoSORYRaxva9Y=";
|
||||||
|
name = "${pname}_${version}.dmg";
|
||||||
|
};
|
||||||
|
in import ./mk-mac-binpkg.nix { inherit pkgs src pname appName version; }
|
25
overlays/mk-mac-binpkg.nix
Normal file
25
overlays/mk-mac-binpkg.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ src, version, pname, appName, pkgs, srcsubdir ? ".", ... }:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
name = pname;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgs.undmg pkgs.unzip pkgs.makeWrapper ];
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
|
||||||
|
cp -r "${srcsubdir}/${appName}.app" $out/Applications
|
||||||
|
|
||||||
|
# wrap executable to $out/bin
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper "$out/Applications/${appName}.app/Contents/MacOS/${appName}" "$out/bin/${pname}"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,33 +1,13 @@
|
||||||
{ stdenv, fetchurl, pkgs, ... }:
|
{ pkgs, fetchurl, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.4.5";
|
version = "4.4.5";
|
||||||
appName = "qBittorrent";
|
appName = "qBittorrent";
|
||||||
pname = "qbittorrent";
|
pname = "qbittorrent";
|
||||||
in stdenv.mkDerivation {
|
|
||||||
inherit pname;
|
|
||||||
name = pname;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url = "https://phoenixnap.dl.sourceforge.net/project/qbittorrent/qbittorrent-mac/qbittorrent-${version}/qbittorrent-${version}.dmg";
|
||||||
"https://phoenixnap.dl.sourceforge.net/project/qbittorrent/qbittorrent-mac/qbittorrent-${version}/qbittorrent-${version}.dmg";
|
|
||||||
sha256 = "sha256-9h+gFAEU0tKrltOjnOKLfylbbBunGZqvPzQogdP9uQM=";
|
sha256 = "sha256-9h+gFAEU0tKrltOjnOKLfylbbBunGZqvPzQogdP9uQM=";
|
||||||
};
|
};
|
||||||
|
in import ./mk-mac-binpkg.nix { inherit pkgs src pname appName version; }
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.undmg pkgs.makeWrapper ];
|
|
||||||
|
|
||||||
sourceRoot = ".";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/Applications
|
|
||||||
cp -r "${appName}.app" $out/Applications
|
|
||||||
|
|
||||||
# wrap executable to $out/bin
|
|
||||||
mkdir -p $out/bin
|
|
||||||
makeWrapper "$out/Applications/${appName}.app/Contents/MacOS/${pname}" "$out/bin/${pname}"
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,39 +1,21 @@
|
||||||
{ stdenv, pkgs, fetchurl, ... }:
|
{ stdenv, pkgs, fetchurl, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
appName = "VLC";
|
||||||
|
pname = "vlc";
|
||||||
version = "3.0.18";
|
version = "3.0.18";
|
||||||
srcs = {
|
srcs = {
|
||||||
aarch64-darwin = fetchurl {
|
aarch64-darwin = fetchurl {
|
||||||
url =
|
url = "http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-arm64.dmg";
|
||||||
"http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-arm64.dmg";
|
|
||||||
sha256 = "sha256-mcJZvbxSIf1QgX9Ri3Dpv57hdeiQdDkDyYB7x3hmj0c=";
|
sha256 = "sha256-mcJZvbxSIf1QgX9Ri3Dpv57hdeiQdDkDyYB7x3hmj0c=";
|
||||||
|
name = "${pname}_aarch64_${version}.dmg";
|
||||||
};
|
};
|
||||||
x86_64-darwin = fetchurl {
|
x86_64-darwin = fetchurl {
|
||||||
url =
|
url = "http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-intel64.dmg";
|
||||||
"http://get.videolan.org/vlc/${version}/macosx/vlc-${version}-intel64.dmg";
|
|
||||||
sha256 = "sha256-iO3N/Os70vaANn2QCdOKDBR/p1jy3TleQ0EsHgjOHMs=";
|
sha256 = "sha256-iO3N/Os70vaANn2QCdOKDBR/p1jy3TleQ0EsHgjOHMs=";
|
||||||
|
name = "${pname}_x86_64_${version}.dmg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
pname = "vlc";
|
src = srcs.${stdenv.hostPlatform.system};
|
||||||
in stdenv.mkDerivation {
|
in import ./mk-mac-binpkg.nix { inherit stdenv pkgs fetchurl src pname appName version; }
|
||||||
name = pname;
|
|
||||||
|
|
||||||
src = srcs.${stdenv.hostPlatform.system};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.undmg pkgs.makeWrapper ];
|
|
||||||
|
|
||||||
sourceRoot = ".";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/Applications
|
|
||||||
cp -r "VLC.app" $out/Applications
|
|
||||||
|
|
||||||
# wrap executable to $out/bin
|
|
||||||
mkdir -p $out/bin
|
|
||||||
makeWrapper "$out/Applications/VLC.app/Contents/MacOS/VLC" "$out/bin/vlc"
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ let
|
||||||
pass-extended = pkgs.pass.withExtensions (exts: [ exts.pass-genphrase exts.pass-otp exts.pass-import ]);
|
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 ]);
|
python-wp = pkgs.python310.withPackages (p: with p; [ setuptools pyaml requests latexify-py ]);
|
||||||
node-packages = with pkgs.nodePackages; [ bash-language-server ];
|
node-packages = with pkgs.nodePackages; [ bash-language-server ];
|
||||||
|
octave-wp = pkgs.octave.withPackages (p: with p; [ symbolic ]);
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
[
|
[
|
||||||
|
@ -44,7 +45,7 @@ in {
|
||||||
nixfmt
|
nixfmt
|
||||||
nix-review
|
nix-review
|
||||||
nmap
|
nmap
|
||||||
octave
|
octave-wp
|
||||||
openssh
|
openssh
|
||||||
pass-extended
|
pass-extended
|
||||||
plantuml
|
plantuml
|
||||||
|
|
83
programs.nix
83
programs.nix
|
@ -2,6 +2,22 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
browserpass = {
|
||||||
|
enable = true;
|
||||||
|
browsers = [
|
||||||
|
"chromium"
|
||||||
|
"firefox"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
chromium = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
{ id = "naepdomgkenhinolocfifgehidddafch"; } # browserpass
|
||||||
|
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv = { enable = true; };
|
nix-direnv = { enable = true; };
|
||||||
|
@ -12,6 +28,12 @@
|
||||||
enableAliases = true;
|
enableAliases = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
firefox = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
delta = { enable = true; };
|
delta = { enable = true; };
|
||||||
|
@ -109,33 +131,33 @@
|
||||||
autocd = true;
|
autocd = true;
|
||||||
defaultKeymap = "emacs";
|
defaultKeymap = "emacs";
|
||||||
envExtra = ''
|
envExtra = ''
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
eval $(gpg-agent --daemon -q 2>/dev/null)
|
eval $(gpg-agent --daemon -q 2>/dev/null)
|
||||||
|
|
||||||
function gsearch() {
|
function gsearch() {
|
||||||
open -a Safari "https://google.com/search?q=$(echo $@ | sed -e 's/ /%20/g')"
|
open -a Safari "https://google.com/search?q=$(echo $@ | sed -e 's/ /%20/g')"
|
||||||
}
|
}
|
||||||
|
|
||||||
function plistxml2nix() {
|
function plistxml2nix() {
|
||||||
tail -n +4 |
|
tail -n +4 |
|
||||||
sed -e "s/<dict>/{/g" \
|
sed -e "s/<dict>/{/g" \
|
||||||
-e "s/<\/dict>/\}\;/g" \
|
-e "s/<\/dict>/\}\;/g" \
|
||||||
-e "s/<key>/\"/g" \
|
-e "s/<key>/\"/g" \
|
||||||
-e "s/<\/key>/\"=/g" \
|
-e "s/<\/key>/\"=/g" \
|
||||||
-e "s/<real>//g" \
|
-e "s/<real>//g" \
|
||||||
-e "s/<\/real>/;/g" \
|
-e "s/<\/real>/;/g" \
|
||||||
-e "s/<integer>//g" \
|
-e "s/<integer>//g" \
|
||||||
-e "s/<\/integer>/;/g" \
|
-e "s/<\/integer>/;/g" \
|
||||||
-e "s/<string>/\"/g" \
|
-e "s/<string>/\"/g" \
|
||||||
-e "s/<\/string>/\"\;/g" \
|
-e "s/<\/string>/\"\;/g" \
|
||||||
-e "s/<array>/\[/g" \
|
-e "s/<array>/\[/g" \
|
||||||
-e "s/<\/array>/\];/g" \
|
-e "s/<\/array>/\];/g" \
|
||||||
-e "s/<true\/>/true;/g" \
|
-e "s/<true\/>/true;/g" \
|
||||||
-e "s/<false\/>/false;/g" \
|
-e "s/<false\/>/false;/g" \
|
||||||
-e "$ d" |
|
-e "$ d" |
|
||||||
sed \-e "$ s/;//"
|
sed \-e "$ s/;//"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
history = {
|
history = {
|
||||||
|
@ -144,19 +166,16 @@ function plistxml2nix() {
|
||||||
ignoreDups = true;
|
ignoreDups = true;
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
emw = "emacs";
|
cd = "z";
|
||||||
|
e = "emacsclient -c -nw";
|
||||||
em = "emacs -nw";
|
em = "emacs -nw";
|
||||||
ew = "emacsclient -c";
|
ew = "emacsclient -c";
|
||||||
e = "emacsclient -c -nw";
|
|
||||||
np = "nix-shell -p";
|
|
||||||
hms = "home-manager switch";
|
hms = "home-manager switch";
|
||||||
cd = "z";
|
|
||||||
l = "ls -1";
|
l = "ls -1";
|
||||||
web = "open -a Safari";
|
np = "nix-shell -p";
|
||||||
email = "open -a Mail";
|
org = "z ${config.home.sessionVariables.ORGDIR}";
|
||||||
o = "open -a";
|
ubc = "z ${config.home.sessionVariables.UBCDIR}";
|
||||||
am = lib.mkIf pkgs.stdenv.isDarwin "zsh ~/.config/zsh/am.sh";
|
emw = "emacs";
|
||||||
pinentry = "pinentry-mac";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue