2 nixpkgs = import .lib/nix/nixpkgs.nix;
3 pkgs = import nixpkgs {
4 config = {}; # Make the config pure, ignoring user's config.
5 overlays = []; # Make the overlays pure, ignoring user's overlays.
8 pkgs.stdenv.mkDerivation {
9 name = "commonsoft-nix";
23 #pkgs.rxvt_unicode.terminfo
35 (pkgs.glibcLocales.override {
49 pkgs.sudo # NOTE: sudo needs to be own by root with the setuid bit,
50 # but this won't be the case for the sudo provided by Nix outside NixOS,
51 # hence the addition of $PATH_FHS in shellHook
52 # to provide the host system's sudo.
53 # WARNING: beware that sudo may reset the environment,
54 # and especially PATH, to some system's default.
64 #enableParallelBuilding = true;
66 export NIX_PATH="nixpkgs=${nixpkgs}:nixpkgs-commonsoft=$PWD/lib/nixpkgs-commonsoft"
67 #NIX_PATH+=":nixpkgs-overlays=$PWD/install/overlays.nix"
71 PATH_NIX=$(dirname $(readlink ~/.nix-profile/bin/nix))
72 PATH_NIXOS=/run/wrappers/bin
73 PATH_NIX_BUILD=$PWD/result/bin
74 PATH_FHS=$PWD/.lib/fhs-bin
75 export PATH=$PATH_NIX_BUILD:$PWD/bin:$PATH_NIXOS:$PATH_FHS:$PATH:$PATH_NIX
78 export LANG=fr_FR.UTF-8
79 export LC_CTYPE=fr_FR.UTF-8
82 gpgconf --launch gpg-agent
83 export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
85 export GNUPGHOME=$PWD/../sec/gnupg
88 export PASSWORD_STORE_DIR="$PWD/../sec/pass"
92 export NIXOPS_DEPLOYMENT="virtualbox"
93 export NIXOPS_STATE="$PWD/.var/nixops/state.db"
94 # Extend the Nix interpreter
95 # to enable builtins.extraBuiltins,
96 # which provides an unsafe exec useful to get secrets
97 # from the local password-store.
98 NIXOPS_OPTS+=" --show-trace"
99 NIXOPS_OPTS+=" --option plugin-files $PWD/result/nix/plugins/libnix-extra-builtins.so"
100 NIXOPS_OPTS+=" --option extra-builtins-file $PWD/result/nix/extra-builtins.nix"
104 #export DISNIXOS_USE_NIXOPS=1
105 #export DISNIX_CLIENT_INTERFACE=disnix-nixops-client
106 #export DISNIX_PROFILE=default
107 #export DISNIX_TARGET_PROPERTY=hostname
108 #export DYSNOMIA_STATEDIR=var/dysnomia