1 # NixOS configuration of losurdo.sourcephile.fr
3 # Show configuration options with, for example:
4 # nix-instantiate servers/losurdo.nix --eval -A config.networking.hostName
5 # Install/upgrade with:
6 # nix run install -f servers/losurdo.nix
8 system = import <nixpkgs/nixos/lib/eval-config.nix> {
9 system = "x86_64-linux";
15 losurdo/fileSystems.nix
17 losurdo/networking.nix
22 losurdo/transmission.nix
29 inherit (system.config) networking;
30 target = "root@${networking.hostName}.${networking.domain}";
31 lib = system.pkgs.lib;
32 in with system; system // {
34 let profile = "/nix/var/nix/profiles/system";
36 nixos = config.system.build.toplevel;
38 pkgs.writeShellScriptBin "bash" ''
39 PATH="$PATH:${with pkgs; lib.makeBinPath [nix openssh pass]}"
41 nix ''${TRACE:+-L} copy \
42 --to ssh://${target} --substitute-on-destination \
45 ${config.install.shellHook}
46 ssh ${target} nix-env --profile "${profile}" --set "${nixos}" \
47 '&&' nix-env --profile "${profile}" --delete-generations "${generations}" \
48 '&&' "${profile}"/bin/switch-to-configuration "''${switch:-switch}"