Add nfs exports for home assistant

This commit is contained in:
Cyryl Płotnicki 2023-06-22 10:42:53 +01:00
parent ca1aae6112
commit 56e1c4356d
4 changed files with 56 additions and 7 deletions

View file

@ -264,21 +264,22 @@
"inputs": { "inputs": {
"nci": "nci", "nci": "nci",
"nixpkgs": [ "nixpkgs": [
"nixpkgs-nixos-unstable" "nixpkgs-stable"
], ],
"parts": "parts",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1670381690, "lastModified": 1684393286,
"narHash": "sha256-0VPEA2XixJ+5NGS0zcnntcDWDByUQD4EFuoSSE+Q7yk=", "narHash": "sha256-Ws9uWtZLvTwL5HNonFr4YwyPoTU8QlCvhs6IJ92aLDw=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "96ff64a84a4948b0aa85a453276cb0091fb9c792", "rev": "7f5940be80eaa3aec7903903072b7108f41dd97b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "helix-editor", "owner": "helix-editor",
"ref": "22.12", "ref": "23.05",
"repo": "helix", "repo": "helix",
"type": "github" "type": "github"
} }
@ -372,6 +373,24 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1685564631,
"narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1686940302, "lastModified": 1686940302,
@ -452,6 +471,24 @@
"type": "github" "type": "github"
} }
}, },
"parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"alejandra": "alejandra", "alejandra": "alejandra",

View file

@ -276,8 +276,8 @@
type = "github"; type = "github";
owner = "helix-editor"; owner = "helix-editor";
repo = "helix"; repo = "helix";
ref = "22.12"; ref = "23.05";
inputs.nixpkgs.follows = "nixpkgs-nixos-unstable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
sops = { sops = {
type = "github"; type = "github";

View file

@ -8,6 +8,7 @@
./home-security.nix ./home-security.nix
./influxdb.nix ./influxdb.nix
./matrix-server.nix ./matrix-server.nix
./nas.nix
./networking.nix ./networking.nix
./nix-store-server.nix ./nix-store-server.nix
./print-server.nix ./print-server.nix

11
nixos/boxes/bolty/nas.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, inputs, lib, ... }: {
networking.firewall.allowedTCPPorts = [ 2049 ];
services.nfs.server.enable = true;
services.nfs.server.exports = ''
/data/nfs 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/share 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/media 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/backups 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check)
'';
}