# 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’). { config, pkgs, ... }: { imports = [ ./hardware-configuration-void.nix ./common.nix ]; networking.hostName = "void"; # Define your hostname. services.samba = { enable = true; openFirewall = true; securityType = "user"; extraConfig = '' 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 ''; shares."Music" = { path = "/pile/Music"; browsable = "yes"; "read only" = "yes"; "guest ok" = "no"; "read list" = "@music"; }; }; users.users.music = { group = "music"; isNormalUser = true; }; # 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; # package for controlling brightness on external monitor environment.systemPackages = [ pkgs.ddcutil ]; # mount external drive fileSystems."/external".label = "external"; # 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"; }; }; }