mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
add(nixos): mount truenas share
This commit is contained in:
parent
7bf69d1f3c
commit
e51fe54d57
6 changed files with 41 additions and 23 deletions
|
|
@ -4,6 +4,8 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
# ./agenix.nix
|
||||
|
||||
./battery.nix
|
||||
./gui.nix
|
||||
./locale.nix
|
||||
|
|
@ -19,6 +21,7 @@
|
|||
programs.fish.enable = true;
|
||||
environment.shells = [pkgs.fish];
|
||||
users.users.leana = {
|
||||
uid = 1000;
|
||||
shell = pkgs.fish;
|
||||
isNormalUser = true;
|
||||
description = "leana";
|
||||
|
|
@ -32,7 +35,6 @@
|
|||
};
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
config,
|
||||
hostname,
|
||||
pkgs,
|
||||
...
|
||||
|
|
@ -12,4 +13,19 @@
|
|||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
age.identityPaths = ["/home/leana/.ssh/id_ed25519"];
|
||||
age.secrets.truenas_smb = {
|
||||
file = ../../secrets/truenas_smb.age;
|
||||
};
|
||||
environment.systemPackages = [pkgs.cifs-utils];
|
||||
fileSystems."/mnt/data" = {
|
||||
device = "//10.0.0.20/data";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
prevent_hanging = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
auth = "credentials=${config.age.secrets.truenas_smb.path}";
|
||||
uid = "uid=${toString config.users.users.leana.uid}";
|
||||
in ["${prevent_hanging},${auth},${uid}"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue