2 originNixpkgs = import .config/nixpkgs-channel/nixos-19.09-small.nix;
3 originPkgs = import originNixpkgs {
4 config = {}; # Make the config pure, ignoring user's config.
8 { meta.description = "nsd : use types.lines where appropriate";
9 url = "https://github.com/NixOS/nixpkgs/pull/78968.diff";
10 sha256 = "11bqq1g1ax6i7xghihyhklmqpsq3njalardp6nvzphkjgxrypb47";
12 { meta.description = "shorewall: init at 5.2.3.3";
13 url = "https://github.com/NixOS/nixpkgs/pull/46131.diff";
14 sha256 = "0mfzlcr23ni5spnwksmmls50sw10alqbr5j6hjrwp9i30z0419yx";
16 { meta.description = "Dovecot plugin for Full Text Search (FTS) with Xapian";
17 url = "https://github.com/NixOS/nixpkgs/pull/78780.diff";
18 sha256 = "053md69ryybj27cp0xdfrza48zyzpblk6wvb2m2dbs9hm0gmcwc4";
21 nixpkgs = originPkgs.stdenv.mkDerivation {
22 name = "nixpkgs-patched";
24 phases = [ "unpackPhase" "patchPhase" ];
25 patches = map originPkgs.fetchpatch nixpkgsPatches;
27 patch=$(printf '%s\n' ${builtins.concatStringsSep " " (map (p: p.sha256) nixpkgsPatches)} |
28 sort | sha256sum | cut -c -7)
30 echo "+patch-$patch" >$out/.version-suffix
33 pkgs = import nixpkgs {
34 config = {}; # Make the config pure, ignoring user's config.
35 overlays = import ./overlays.nix;
40 nixos = pkgs.nixos {};
41 # Configuration of shell/modules/
42 configuration = {config, ...}: {
47 auto-optimise-store = true
55 gnupgHome = toString ../sec/gnupg;
56 keys = import shell/openpgp.nix;
58 trusted-key 0xB2450D97085B7B8C
63 opensslHome = toString ../sec/openssl;
64 certificates = import shell/x509.nix;
67 # WARNING: nixops uses its own ssh, not this one.
70 Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr
74 ControlPath ${builtins.toString ../sec/ssh}/ssh-%h-%p-%r.socket
76 #SSAPIAuthentication no
78 StrictHostKeyChecking yes
79 UserKnownHostsFile ${builtins.toString ../sec/ssh/known_hosts}
87 # Using modules enables to separate specific configurations
88 # from reusable code in shell/modules.nix and shell/modules/
89 # which may find its way in another git repository one day.
91 (import shell/modules.nix {
93 modules = [ configuration ];
97 name = "sourcephile-nix";
99 #preferLocalBuild = true;
100 #allowSubstitutes = false;
101 buildInputs = modules.nix-shell.buildInputs ++ [
103 nixos.nixos-generate-config
137 #pkgs.rxvt_unicode.terminfo
156 #enableParallelBuilding = true;
158 echo >&2 "nix: running shellHook"
159 # WARNING: beware that sudo may reset the environment,
160 # and especially PATH, to some system's default.
163 unset __ETC_PROFILE_SOURCED
164 unset __NIXOS_SET_ENVIRONMENT_DONE
165 test ! -e /etc/profile || . /etc/profile
166 test ! -e ~/.profile || . ~/.profile
169 test ! -e ~/.nix-profile/etc/profile.d/nix.sh ||
170 . ~/.nix-profile/etc/profile.d/nix.sh
173 unset __HM_SESS_VARS_SOURCED
174 test ! -e ~/.nix-profile/etc/profile.d/hm-session-vars.sh ||
175 . ~/.nix-profile/etc/profile.d/hm-session-vars.sh
177 PATH=$NIX_SHELL_PATH:$PATH
178 export NIX_PATH="nixpkgs=${pkgs.path}:nixpkgs-overlays="$PWD"/overlays"
180 # Cleanup "../sec/tmp/"
181 # This is done when exiting the nix-shell
182 # (or when… entering the directory with direnv
183 # which spawns a nix-shell just to get the env).
184 trap "cd '$PWD' && find ../sec/tmp -type f -exec shred -fu {} +" EXIT
186 ${modules.nix-shell.shellHook}
189 export LANG=fr_FR.UTF-8
190 export LC_CTYPE=fr_FR.UTF-8
193 export PASSWORD_STORE_DIR="$PWD"/../sec/pass
196 export GPG_TTY=$(tty)
197 gpg-connect-agent updatestartuptty /bye >/dev/null
201 test ! -f "$gitdir" || while IFS=" :" read -r hdr gitdir; do [ "$hdr" != gitdir ] || break; done <"$gitdir"
203 "$PWD"/.lib/git/hooks/prepare-commit-msg--longuest-common-prefix \
204 "$gitdir"/hooks/prepare-commit-msg
207 #export NIXOPS_DEPLOYMENT="staging"
208 export NIXOPS_STATE="$PWD"/../sec/nixops/state.nixops
209 NIXOPS_OPTS+=" --show-trace"
213 #export DISNIXOS_USE_NIXOPS=1
214 #export DISNIX_CLIENT_INTERFACE=disnix-nixops-client
215 #export DISNIX_PROFILE=default
216 #export DISNIX_TARGET_PROPERTY=hostname
217 #export DYSNOMIA_STATEDIR="$PWD"/../sec/dysnomia