2022-08-09 22:52:38 -07:00
|
|
|
let
|
|
|
|
|
nasIp = "192.168.1.168";
|
|
|
|
|
in
|
2022-07-30 19:42:03 -07:00
|
|
|
{
|
|
|
|
|
network = {
|
|
|
|
|
name = "house";
|
|
|
|
|
enableRollback = true;
|
|
|
|
|
description = "machines used in my house";
|
|
|
|
|
|
|
|
|
|
storage.legacy = { };
|
|
|
|
|
};
|
2022-07-31 22:42:37 -07:00
|
|
|
|
2022-08-09 20:30:53 -07:00
|
|
|
defaults = { pkgs, ... }:
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
# make sure you have properly added the home-manager channel!
|
|
|
|
|
<home-manager/nixos>
|
|
|
|
|
];
|
2022-07-31 00:28:11 -07:00
|
|
|
|
2022-08-09 20:30:53 -07:00
|
|
|
documentation.enable = false;
|
2022-07-31 00:25:55 -07:00
|
|
|
|
2022-08-09 20:30:53 -07:00
|
|
|
# for nixops to log in and perform operations as haak (instead of root)
|
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
2022-08-10 21:21:17 -07:00
|
|
|
home-manager.users.haak = (import ../home/commandline.nix);
|
|
|
|
|
|
|
|
|
|
# Configure the root account
|
2022-08-09 20:30:53 -07:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
|
(import ../system/framework/keys.nix).ssh.public
|
|
|
|
|
];
|
2022-08-10 21:21:17 -07:00
|
|
|
users.extraUsers.root = {
|
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
|
};
|
2022-08-09 20:30:53 -07:00
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
tmux
|
|
|
|
|
ripgrep
|
2022-08-10 21:21:17 -07:00
|
|
|
htop
|
2022-08-09 20:30:53 -07:00
|
|
|
];
|
2022-08-10 21:21:17 -07:00
|
|
|
|
|
|
|
|
# Optimize nix store by hardlinking identitical files.
|
|
|
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
|
|
|
|
|
|
# Limit the systemd journal to 100 MB of disk or the
|
|
|
|
|
# last 7 days of logs, whichever happens first.
|
|
|
|
|
services.journald.extraConfig = ''
|
|
|
|
|
SystemMaxUse=100M
|
|
|
|
|
MaxFileSec=7day
|
|
|
|
|
'';
|
2022-08-09 20:30:53 -07:00
|
|
|
};
|
2022-07-31 22:42:37 -07:00
|
|
|
|
2022-08-09 22:52:38 -07:00
|
|
|
server =
|
|
|
|
|
{ nodes, ... }:
|
|
|
|
|
{
|
|
|
|
|
deployment.targetHost = "192.168.1.65";
|
|
|
|
|
imports = [ ../system/xps11/configuration.nix ];
|
|
|
|
|
networking.wireless.networks.N904.pskRaw = (
|
|
|
|
|
(import ../system/framework/keys.nix).wifi.N904.pskRaw
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
fileSystems."/storage" = {
|
|
|
|
|
device = "${nasIp}:/storage";
|
|
|
|
|
fsType = "nfs";
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-08-09 17:11:56 -07:00
|
|
|
|
2022-08-09 23:56:09 -07:00
|
|
|
nas =
|
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
{
|
|
|
|
|
deployment.targetHost = nasIp;
|
2022-08-10 01:24:35 -07:00
|
|
|
imports = [
|
|
|
|
|
../system/svalbard/configuration.nix
|
|
|
|
|
../home/programs/flood
|
|
|
|
|
];
|
2022-08-09 23:56:09 -07:00
|
|
|
networking.wireless.networks.N904.pskRaw = (
|
|
|
|
|
(import ../system/framework/keys.nix).wifi.N904.pskRaw
|
|
|
|
|
);
|
2022-08-09 22:45:33 -07:00
|
|
|
|
2022-08-09 23:56:09 -07:00
|
|
|
services.nfs.server.enable = true;
|
|
|
|
|
services.nfs.server.exports = ''
|
|
|
|
|
/export 192.168.1.0/24(insecure,crossmnt,fsid=0)
|
|
|
|
|
/export/storage 192.168.1.0/24(insecure)
|
|
|
|
|
'';
|
2022-08-09 22:45:33 -07:00
|
|
|
|
2022-08-09 23:56:09 -07:00
|
|
|
networking.firewall.allowedTCPPorts = [ 2049 ];
|
|
|
|
|
};
|
2022-07-30 19:42:03 -07:00
|
|
|
}
|