Add sarek and related NFS shares

This commit is contained in:
Felix Albrigtsen 2023-10-03 01:25:33 +02:00 committed by Felix Albrigtsen
parent d1f1291ee5
commit e96146640d
4 changed files with 85 additions and 0 deletions

View File

@ -65,6 +65,24 @@
} }
]; ];
}; };
sarek = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/sarek/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/sarek/home.nix;
}
];
};
chapel = nixpkgs.lib.nixosSystem { chapel = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {

View File

@ -0,0 +1,32 @@
{ config, pkgs, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/virtualisation/proxmox-lxc.nix")
../../base.nix
../../common/metrics-exporters.nix
# ./hardware-configuration.nix
];
fileSystems."/mnt/backup" = {
fsType = "nfs";
device = "//voyager.home.feal.no/defiant-backup";
options = [ "defaults" "noauto" "x-systemd.automount" ];
};
# Boot, console and networking is handled by proxmoxLXC.
boot.loader.systemd-boot.enable = lib.mkForce false; # Enabled in base.nix, forced off here.
networking.domain = lib.mkForce null;
sops.defaultSopsFile = ../../secrets/sarek/edison.yaml;
environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [
];
networking.firewall.allowedTCPPorts = [ 22 ];
system.stateVersion = "23.05";
}

20
hosts/sarek/home.nix Normal file
View File

@ -0,0 +1,20 @@
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [
bat
bottom
ncdu
neofetch
nix-index
];
imports = [
./../../home/base.nix
];
programs = {
zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config";
};
home.stateVersion = "23.05";
}

View File

@ -39,4 +39,19 @@
# Network mounts (export) # Network mounts (export)
fileSystems = {
"/export/defiant-backup" = {
device = "/tank/backup/defiant";
options = [ "bind" ];
};
};
services.nfs = {
enable = true;
exports = ''
/export 192.168.10.181(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)
/export/defiant-backup 192.168.10.181(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
'';
};
} }