2024-08-23 10:20:05 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
2024-10-29 13:47:04 +01:00
|
|
|
|
{ config, pkgs, ... }:
|
2024-08-23 10:20:05 +02:00
|
|
|
|
{
|
|
|
|
|
|
imports = [
|
|
|
|
|
|
./hardware-configuration-void.nix
|
|
|
|
|
|
./common.nix
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
networking.hostName = "void"; # Define your hostname.
|
2024-08-26 14:23:58 +02:00
|
|
|
|
|
|
|
|
|
|
services.samba = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
|
securityType = "user";
|
2024-12-11 17:23:34 +01:00
|
|
|
|
settings.global = {
|
|
|
|
|
|
workgroup = "WORKGROUP";
|
|
|
|
|
|
"server string" = "void";
|
|
|
|
|
|
"netbios name" = "void";
|
|
|
|
|
|
security = "user";
|
|
|
|
|
|
"hosts allow" = "0.0.0.0/0";
|
|
|
|
|
|
"guest account" = "nobody";
|
|
|
|
|
|
"map to guest" = "bad user";
|
|
|
|
|
|
"log level" = 4;
|
|
|
|
|
|
#"smb encrypt" = "mandatory";
|
|
|
|
|
|
};
|
2024-08-26 14:23:58 +02:00
|
|
|
|
shares."Music" = {
|
|
|
|
|
|
path = "/pile/Music";
|
|
|
|
|
|
browsable = "yes";
|
|
|
|
|
|
"read only" = "yes";
|
|
|
|
|
|
"guest ok" = "no";
|
|
|
|
|
|
"read list" = "@music";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
users.users.music = {
|
|
|
|
|
|
group = "music";
|
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
|
};
|
2024-10-29 21:01:13 +01:00
|
|
|
|
|
|
|
|
|
|
# enqble i2c-dev kernel module for control of backlight in external monitor
|
|
|
|
|
|
# https://discourse.nixos.org/t/how-to-enable-ddc-brightness-control-i2c-permissions/20800/3
|
|
|
|
|
|
boot.extraModulePackages = [
|
|
|
|
|
|
config.boot.kernelPackages.ddcci-driver
|
|
|
|
|
|
];
|
|
|
|
|
|
boot.kernelModules = ["i2c-dev" "ddcci_backlight"];
|
|
|
|
|
|
hardware.i2c.enable = true;
|
2024-10-29 13:47:04 +01:00
|
|
|
|
|
|
|
|
|
|
# package for controlling brightness on external monitor
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
|
pkgs.ddcutil
|
|
|
|
|
|
];
|
2024-11-09 16:52:19 +01:00
|
|
|
|
|
|
|
|
|
|
# mount external drive
|
|
|
|
|
|
fileSystems."/external".label = "external";
|
2024-11-17 16:42:31 +01:00
|
|
|
|
|
2024-11-09 18:16:00 +01:00
|
|
|
|
# backup
|
|
|
|
|
|
services.borgbackup.jobs."external" = {
|
|
|
|
|
|
paths = [
|
|
|
|
|
|
"/home"
|
|
|
|
|
|
"/var"
|
|
|
|
|
|
"/pile"
|
|
|
|
|
|
];
|
|
|
|
|
|
exclude = [
|
|
|
|
|
|
"/home/*/.local/share/Steam"
|
|
|
|
|
|
"**/*cache"
|
|
|
|
|
|
"**/*Cache"
|
|
|
|
|
|
"**/*trash"
|
|
|
|
|
|
"**/*Trash"
|
|
|
|
|
|
"/home/*/.mozilla/firefox"
|
|
|
|
|
|
"/home/*/GOG Games"
|
|
|
|
|
|
"**/target"
|
|
|
|
|
|
"**/result"
|
|
|
|
|
|
];
|
|
|
|
|
|
repo = "/external/voidbackup";
|
|
|
|
|
|
encryption = {
|
|
|
|
|
|
mode = "repokey-blake2";
|
|
|
|
|
|
passCommand = "cat /root/borgbackup/passphrase";
|
|
|
|
|
|
};
|
|
|
|
|
|
compression = "auto,lzma";
|
|
|
|
|
|
startAt = "daily";
|
|
|
|
|
|
persistentTimer = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
systemd.services."borgbackup-job-external" = {
|
|
|
|
|
|
unitConfig = {
|
|
|
|
|
|
RequiresMountsFor = "/external";
|
|
|
|
|
|
Requires = "external.mount";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2024-08-23 10:20:05 +02:00
|
|
|
|
}
|