diff --git a/configs/common.nix b/configs/common.nix index 27c5592..1a3adca 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -3,22 +3,17 @@ let secrets = import ./secrets.nix; in { - imports = - [ - (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") - ]; - environment.shells = with pkgs; [ bashInteractive zsh ]; services = { vnstat.enable = true; tuptime.enable = true; - vscode-server.enable = true; openssh = { enable = true; permitRootLogin = "no"; passwordAuthentication = false; openFirewall = true; + extraConfig = "StreamLocalBindUnlink yes"; }; nextdns = { enable = true; @@ -31,6 +26,9 @@ in ]; }; fwupd.enable = true; + journald = { + extraConfig = "SystemMaxUse=500M"; + }; }; networking = { @@ -66,6 +64,8 @@ in ffmpeg gnupg gocryptfs + graphviz + hdparm home-manager inxi iotop @@ -74,6 +74,7 @@ in lsof manpages nix-du + nix-tree nmap nodejs pciutils @@ -83,9 +84,6 @@ in unzip usbutils wget - graphviz - nix-tree - hdparm ]; documentation.enable = false; diff --git a/configs/user-gui-applications.nix b/configs/user-gui-applications.nix new file mode 100644 index 0000000..5c2e513 --- /dev/null +++ b/configs/user-gui-applications.nix @@ -0,0 +1,48 @@ +{ config, pkgs, lib, ... }: + +let + unstable = import { config.allowUnfree = true; }; +in +{ + imports = [ ]; + + home-manager.users.alex = { pkgs, ... }: { + home = { + packages = with unstable.pkgs; [ + bitwarden + cura + cypress + discord + etcher + firefox + font-manager + fslint + gnome.cheese + homebank + insomnia + jellyfin-media-player + jellyfin-mpv-shim + kdenlive + keepassxc + libreoffice + lutris + lxrandr + mangohud + meld + pinta + prusa-slicer + rpi-imager + signal-desktop + solaar + spotify + steam + teams + virtmanager + vulkan-tools + wine + winetricks + obs-studio + ]; + }; + }; +} diff --git a/configs/user-gui.nix b/configs/user-gui.nix index 193cc08..e934c63 100644 --- a/configs/user-gui.nix +++ b/configs/user-gui.nix @@ -28,48 +28,13 @@ in arandr baobab barrier - bitwarden blueberry - cura - cypress - discord - etcher evince - firefox - font-manager - fslint - gnome.cheese gnome.eog gnome.file-roller gnome.gnome-calculator - gnome.seahorse - homebank - insomnia - jellyfin-media-player - jellyfin-mpv-shim - kdenlive keepassxc libnotify - libreoffice - lutris - lxrandr - mangohud - meld - nextcloud-client - pinta - prusa-slicer - rpi-imager - signal-desktop - solaar - spotify - steam - teams - unrar - virtmanager - vulkan-tools - wine - winetricks - obs-studio ]; }; @@ -228,12 +193,6 @@ in # SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"; # }; # }; - - # keychain = { - # enable = true; - # enableXsessionIntegration = true; - # enableZshIntegration = true; - # }; }; services = { @@ -364,10 +323,6 @@ in flameshot.enable = true; }; - xresources.properties = { - "Xft.dpi" = 120; - }; - xsession = { enable = true; pointerCursor = { @@ -414,10 +369,5 @@ in }; }; }; - - # manuals not needed - manual.html.enable = false; - manual.json.enable = false; - manual.manpages.enable = false; }; } diff --git a/configs/user.nix b/configs/user.nix index 07f28ae..48c3364 100644 --- a/configs/user.nix +++ b/configs/user.nix @@ -40,6 +40,7 @@ ranger sshfs tree + unrar youtube-dl ]; }; @@ -73,7 +74,11 @@ }; matchBlocks."nixos-vm" = { - hostname = "192.168.122.43"; + hostname = "192.168.122.222"; + remoteForwards = [{ + bind.address = "/run/user/1000/gnupg/S.gpg-agent"; + host.address = "/run/user/1000/gnupg/S.gpg-agent"; + }]; }; matchBlocks."mini" = { diff --git a/machine/desktop.nix b/machine/desktop.nix index 4084f63..7f1c4d4 100644 --- a/machine/desktop.nix +++ b/machine/desktop.nix @@ -11,6 +11,7 @@ in ../configs/docker.nix ../configs/libvirt.nix ../configs/common.nix + ../configs/user-gui-applications.nix ../configs/user-gui.nix ../configs/user.nix ]; @@ -91,16 +92,16 @@ in enable = true; config = '' INTERVAL=10 - DEVPATH=hwmon2=devices/platform/it87.656 - DEVNAME=hwmon2=it8665 - FCTEMPS=hwmon2/pwm3=hwmon2/temp1_input hwmon2/pwm2=hwmon2/temp1_input hwmon2/pwm1=hwmon2/temp1_input - FCFANS=hwmon2/pwm3=hwmon2/fan2_input hwmon2/pwm2=hwmon2/fan1_input hwmon2/pwm1= - MINTEMP=hwmon2/pwm3=60 hwmon2/pwm2=60 hwmon2/pwm1=60 - MAXTEMP=hwmon2/pwm3=75 hwmon2/pwm2=75 hwmon2/pwm1=75 - MINSTART=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51 - MINSTOP=hwmon2/pwm3=51 hwmon2/pwm2=51 hwmon2/pwm1=51 - MINPWM=hwmon2/pwm1=51 hwmon2/pwm2=51 hwmon2/pwm3=51 - MAXPWM=hwmon2/pwm3=127 hwmon2/pwm2=204 + DEVPATH=hwmon3=devices/platform/it87.656 + DEVNAME=hwmon3=it8665 + FCTEMPS=hwmon3/pwm3=hwmon3/temp1_input hwmon3/pwm2=hwmon3/temp1_input hwmon3/pwm1=hwmon3/temp1_input + FCFANS=hwmon3/pwm3=hwmon3/fan2_input hwmon3/pwm2=hwmon3/fan1_input hwmon3/pwm1= + MINTEMP=hwmon3/pwm3=60 hwmon3/pwm2=60 hwmon3/pwm1=60 + MAXTEMP=hwmon3/pwm3=75 hwmon3/pwm2=75 hwmon3/pwm1=75 + MINSTART=hwmon3/pwm3=51 hwmon3/pwm2=51 hwmon3/pwm1=51 + MINSTOP=hwmon3/pwm3=51 hwmon3/pwm2=51 hwmon3/pwm1=51 + MINPWM=hwmon3/pwm1=51 hwmon3/pwm2=51 hwmon3/pwm3=51 + MAXPWM=hwmon3/pwm3=127 hwmon3/pwm2=204 ''; }; @@ -124,17 +125,36 @@ in printing.enable = true; xserver.videoDrivers = [ "amdgpu" ]; hardware.xow.enable = true; - borgbackup.jobs.home-alex = { + borgbackup.jobs.home = rec { compression = "auto,zstd"; encryption = { mode = "repokey-blake2" ; passphrase = secrets.borg-desktop-key; }; - environment.BORG_RSH = "ssh -i /home/alex/.ssh/id_borg_rsa"; + extraCreateArgs = "--list --stats --verbose --checkpoint-interval 600 --exclude-caches"; + environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa"; paths = "/home/alex"; - repo = "ssh://alex@szczepan.ski/borg-backup/desktop"; + repo = "ssh://szczepan.ski/~/borg-backup/desktop"; startAt = "daily"; user = "alex"; + prune.keep = { + daily = 7; + weekly = 4; + monthly = 6; + }; + extraPruneArgs = "--save-space --list --stats"; + exclude = map (x: paths + "/" + x) [ + ".config/chromium/Default/Service Worker/CacheStorage" + ".cache" + ".local/share/libvirt/images" + ".local/share/Steam/steamapps" + "Games/guild-wars/drive_c/Program Files/Guild Wars/Gw.dat" + "Games/guild-wars-second/drive_c/Program Files/Guild Wars/Gw.dat" + "Kamera" + "Nextcloud" + "Sync" + "Workspace" + ]; }; }; diff --git a/machine/thinkpad.nix b/machine/thinkpad.nix index 2351d26..848266b 100644 --- a/machine/thinkpad.nix +++ b/machine/thinkpad.nix @@ -24,6 +24,7 @@ in ../configs/common.nix ../configs/user.nix ../configs/user-gui.nix + ../configs/user-gui-applications.nix ];