{ config, lib, pkgs, ... }: with lib; let mopidyExtensions = with pkgs; [ mopidy-iris mopidy-local mopidy-mpd mopidy-muse mopidy-ytmusic ]; # https://github.com/nix-community/home-manager/blob/ce563f591195cf363bca382fe02ea5ca87754773/modules/services/mopidy.nix#L22 mopidy-with-extensions = pkgs.buildEnv { name = "mopidy-with-extensions-${pkgs.mopidy.version}"; paths = closePropagation mopidyExtensions; pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ]; buildInputs = [ pkgs.makeWrapper ]; postBuild = '' makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \ --prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages} ''; }; zscaler-cert = '' -----BEGIN CERTIFICATE----- MIIE0zCCA7ugAwIBAgIJANu+mC2Jt3uTMA0GCSqGSIb3DQEBCwUAMIGhMQswCQYD VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIU2FuIEpvc2Ux FTATBgNVBAoTDFpzY2FsZXIgSW5jLjEVMBMGA1UECxMMWnNjYWxlciBJbmMuMRgw FgYDVQQDEw9ac2NhbGVyIFJvb3QgQ0ExIjAgBgkqhkiG9w0BCQEWE3N1cHBvcnRA enNjYWxlci5jb20wHhcNMTQxMjE5MDAyNzU1WhcNNDIwNTA2MDAyNzU1WjCBoTEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBK b3NlMRUwEwYDVQQKEwxac2NhbGVyIEluYy4xFTATBgNVBAsTDFpzY2FsZXIgSW5j LjEYMBYGA1UEAxMPWnNjYWxlciBSb290IENBMSIwIAYJKoZIhvcNAQkBFhNzdXBw b3J0QHpzY2FsZXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA qT7STSxZRTgEFFf6doHajSc1vk5jmzmM6BWuOo044EsaTc9eVEV/HjH/1DWzZtcr fTj+ni205apMTlKBW3UYR+lyLHQ9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_HOME is set correctly # See https://github.com/nix-community/home-manager/blob/086f619dd991a4d355c07837448244029fc2d9ab/modules/programs/java.nix#L39-L41 # and https://github.com/NixOS/nixpkgs/blob/4877ea239f4d02410c3516101faf35a81af0c30e/pkgs/development/compilers/openjdk/jre.nix#L32 passthru.home = "${zscaler-jdk}"; # make sure JAVA_HOME is set installPhase = old.installPhase + '' $out/bin/keytool -import -noprompt -trustcacerts -alias zscalerrootca -keystore $out/lib/security/cacerts <<< "${zscaler-cert}" ''; }); zscaler-lein = pkgs.leiningen.override { jdk = zscaler-jdk; }; in { imports = [ ./dev-common.nix ]; home.packages = with pkgs; [ awscli2 cacert coreutils curl diffutils ((emacsPackagesFor emacs29-macport).emacsWithPackages(ps: [ ps.vterm ps.multi-vterm ])) findutils gh gh-dash #gnused #mopidy-with-extensions #mpdscribble #mpc-cli #mpd #ncmpcpp nix # on darwin we are not using nixos (duh) nodejs nodePackages.eslint pam-reattach pinentry_mac pgcli pgformatter #pms postgresql podman #python310Packages.sqlparse sqls #vimpc wget zscaler-lein ]; nix.settings = { sandbox = true; keep-outputs = true; keep-derivations = true; }; programs.java = { enable = true; package = zscaler-jdk; }; }