dotfiles/logical/woodhouse.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2016-08-26 20:14:24 +02:00
{ config, pkgs, lib, ... }:
let
secrets = import <secrets>;
2018-02-27 16:31:16 +01:00
mkFuseMount = device: opts: {
# todo: "ServerAliveCountMax=3" "ServerAliveInterval=30"
device = "${pkgs.sshfsFuse}/bin/sshfs#${device}";
fsType = "fuse";
options = ["noauto" "x-systemd.automount" "_netdev" "users" "idmap=user"
"defaults" "allow_other" "transform_symlinks" "default_permissions"
"uid=1000"
"reconnect" "IdentityFile=/root/.ssh/id_sshfs"] ++ opts;
};
2016-08-26 20:14:24 +02:00
in
{
imports =
[ # Include the results of the hardware scan.
2017-02-02 17:22:03 +01:00
../physical/nuc.nix
2016-08-26 20:14:24 +02:00
../roles/common.nix
2018-02-27 16:31:16 +01:00
# ../roles/collectd.nix
2016-08-26 20:14:24 +02:00
../roles/graphical.nix
];
networking.hostName = secrets.hostnames.woodhouse;
# The NixOS release to be compatible with for stateful data such as databases.
2018-02-27 16:31:16 +01:00
system.stateVersion = "17.09";
2016-08-26 20:14:24 +02:00
system.fsPackages = [ pkgs.sshfsFuse ];
2018-02-27 16:31:16 +01:00
fileSystems."/mnt/frumar" = mkFuseMount "yorick@${secrets.hostnames.frumar}:/data/yorick" [];
fileSystems."/mnt/oxygen" = mkFuseMount "yorick@oxygen.obfusk.ch:" [];
fileSystems."/mnt/nyamsas" = mkFuseMount "yorick@nyamsas.quezacotl.nl:" ["port=1337"];
2016-08-26 20:14:24 +02:00
2017-06-16 17:12:03 +02:00
2016-08-26 20:14:24 +02:00
networking.firewall.allowedTCPPorts = [7 8080 9090 9777]; # kodi
}