feat: added smb mounts

This commit is contained in:
Patrick Großmann 2023-02-14 01:33:38 +01:00
parent b1d0ea5d62
commit 9bbed49c8f
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
8 changed files with 62 additions and 23 deletions

View file

@ -17,6 +17,7 @@
./modules/rekey.nix
./modules/nvidia.nix
./modules/wireguard.nix
./modules/smb-mounts.nix
];
# Use the systemd-boot EFI boot loader.

View file

@ -8,11 +8,11 @@
]
},
"locked": {
"lastModified": 1675176355,
"narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
"lastModified": 1676153903,
"narHash": "sha256-uetRyjgMiZCs6srmZ10M764Vn7F53M9mVuqnzHmyBqU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
"rev": "ea17cc71b4e1bc5b2601f210a1c85db9453ad723",
"type": "github"
},
"original": {
@ -103,11 +103,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1675888750,
"narHash": "sha256-w3T9UiRN6SaKMYI62+Ic3ka1Tyr9zaBcclhh3e4RCUk=",
"lastModified": 1675935446,
"narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1232d0e13305f462a5a7c29584f50eb232cc4ba0",
"rev": "2dce7f1a55e785a22d61668516df62899278c9e4",
"type": "github"
},
"original": {
@ -118,11 +118,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1675763311,
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
"lastModified": 1676110339,
"narHash": "sha256-kOS/L8OOL2odpCOM11IevfHxcUeE0vnZUQ74EOiwXcs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2",
"rev": "e5530aba13caff5a4f41713f1265b754dc2abfd8",
"type": "github"
},
"original": {

31
modules/smb-mounts.nix Normal file
View file

@ -0,0 +1,31 @@
{
pkgs,
lib,
config,
...
}: let
options = [
"noauto"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"credentials=${config.rekey.secrets.smb-creds.path}"
"uid=${builtins.toString config.users.users.patrick.uid}"
"gid=${builtins.toString config.users.groups.patrick.gid}"
];
in {
environment.systemPackages = [pkgs.cifs-utils];
rekey.secrets.smb-creds.file = ../secrets/smb.cred.age;
fileSystems = {
"/mnt/smb/patri-data" = {
device = "//10.0.0.1/patri-data";
fsType = "cifs";
inherit options;
};
"/mnt/smb/patri-paperless" = {
device = "//10.0.0.1/patri-paperless";
fsType = "cifs";
inherit options;
};
};
}

11
secrets/smb.cred.age Normal file
View file

@ -0,0 +1,11 @@
age-encryption.org/v1
-> X25519 3VPtgGs+YkYHBe63OyhOuUVL/fVX//XSizOdLHR3wDI
I/a7lYzVFGXLuBGtvn9hbsq6Tb5NMjgb6C0x44AW9hc
-> piv-p256 XTQkUA A8ttYGbQD9jY7zA2X3SDynQy6WCOsp9qUenalQ0KtbPx
ssWdY0MKCJ33cVLLxR8Kv1wLbEz6F6MrV/yRcZK5fuk
-> piv-p256 ZFgiIw Aqe9ZNtlViD+o+pMDP0F1FtUGFw35KmHyhjnFB4XVPRK
+I0y5TtoxGBla/46dk0tEzBEakHdb//m9ts92QCm7XA
-> --grease S[|%w\&o t$efh*] jl8~ cB\tOaM
DpG7+qrkZLPtzRtZ38GatDO2rthpFyT93E/pqizz69QK0OXgv4ZAjA
--- f7oAB4l0kZpBDfwwwUwH/g76YX7GhbSIw2WCTNcg6dc
Ó§1øvz´z¾N9Òxt!ÿCr_‡˜ºý·DG³Ø˜Vcrù*Áý[Rít…é¶CÅ ï­MR%oïXî@Þá™sf!!b&Î1>±]

View file

@ -15,6 +15,7 @@
bat
ripgrep
killall
fd
];
# has to be enabled to support zsh reverse search

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
programs.thunderbird = {
enable = true;
};
}

View file

@ -109,10 +109,11 @@
enable = true;
interactiveShellInit = lib.mkMerge [
(lib.mkBefore ''
set -g ATUIN_NOBIND true
set -g fish_greeting
set -g fish_autosuggestion_enabled 0
set -g FZF_COMPLETE 2
set -g ATUIN_NOBIND true
set -g fish_greeting
set -g fish_autosuggestion_enabled 0
set -g FZF_COMPLETE 2
set -g FZF_COMPLETE_OPTS "--bind=ctrl-space:select --multi"
'')
(lib.mkAfter ''
bind \cr _atuin_search
@ -127,10 +128,10 @@
{
name = "fzf";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "fzf";
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
owner = "oddlama";
repo = "fzf.fish";
rev = "63c8f8e65761295da51029c5b6c9e601571837a1";
sha256 = "036n50zr9kyg6ad408zn7wq2vpfwhmnfwab465km4dk60ywmrlcb";
};
}
];

View file

@ -10,7 +10,6 @@
common/programs/polybar.nix
common/programs/rofi.nix
common/touchscreen.nix
#common/programs/thunderbird.nix
#common/touchegg.nix
];