diff --git a/common.nix b/common.nix index f3fd890..679aea4 100644 --- a/common.nix +++ b/common.nix @@ -7,7 +7,7 @@ swapDevices = [ { device = "/var/swapfile"; } ]; users.users.root.hashedPasswordFile = "/secrets/user/root-pw"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; - environment.systemPackages = with pkgs; [ jq _7zz sbctl openssl python314 ]; + environment.systemPackages = with pkgs; [ jq _7zz sbctl openssl python314 speedtest-go ]; fileSystems = { "/".options = [ "noatime" ]; "/boot".options = [ "noatime" ]; diff --git a/desktop/configuration.nix b/desktop/configuration.nix index a2622fa..93326ae 100644 --- a/desktop/configuration.nix +++ b/desktop/configuration.nix @@ -1,8 +1,10 @@ { config, lib, pkgs, ... }: { programs.niri.enable = true; + security.apparmor.enable = true; hardware.bluetooth.enable = true; imports = [ ../common.nix ./hardware.nix ]; + boot.kernelParams = [ "hibernate.compressor=lz4" ]; users.users.bogale = { uid = 1551; isNormalUser = true; @@ -25,6 +27,7 @@ }; services = { tuned.enable = true; + flatpak.enable = true; pipewire = { enable = true; pulse.enable = true; diff --git a/desktop/hardware.nix b/desktop/hardware.nix index 7af382a..9111d1a 100644 --- a/desktop/hardware.nix +++ b/desktop/hardware.nix @@ -5,6 +5,7 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; boot = { kernelModules = [ "kvm-amd" ]; + kernelParams = [ "ttm.pages_limit=3014656" ]; initrd = { luks.devices.root.device = "/dev/disk/by-uuid/70ac6613-2e6c-4817-a0ce-43a97efb8bab"; availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; diff --git a/home/bogale.nix b/home/bogale.nix index 6e520cc..c4f4db9 100644 --- a/home/bogale.nix +++ b/home/bogale.nix @@ -3,13 +3,10 @@ imports = [ ./common.nix ]; wayland.windowManager.niri.enable = true; xdg.configFile."niri/config.kdl".source = ./mods/niri.kdl; - home = { - username = "bogale"; - homeDirectory = "/home/bogale"; - packages = with pkgs; [ bluez brave-origin libqalculate bibata-cursors ]; - }; programs = { + mpv.enable = true; alacritty.enable = true; + bash.sessionVariables.TTS_MODEL = "ggml-org/Qwen3-TTS-12Hz-1.7B-Base-GGUF"; noctalia = { enable = true; systemd.enable = true; @@ -29,4 +26,21 @@ brightness-night = 0.6; }; }; + home = { + username = "bogale"; + homeDirectory = "/home/bogale"; + packages = with pkgs; [ + bluez + heroic + qbittorrent + thunderbird + brave-origin + libqalculate + bibata-cursors + ffmpeg-headless + llama-cpp-vulkan + telegram-desktop + nvtopPackages.amd + ]; + }; } diff --git a/home/common.nix b/home/common.nix index f138fc8..446c2ac 100644 --- a/home/common.nix +++ b/home/common.nix @@ -6,7 +6,6 @@ packages = with pkgs; [ ncdu yt-dlp ]; }; programs = { - home-manager.enable = true; ssh = { enable = true; enableDefaultConfig = false; diff --git a/home/mods/niri.kdl b/home/mods/niri.kdl index e6ea619..99fee03 100644 --- a/home/mods/niri.kdl +++ b/home/mods/niri.kdl @@ -1,7 +1,12 @@ include "./noctalia.kdl"; gestures { hot-corners { off; }; }; hotkey-overlay { skip-at-startup; }; +environment { QT_QPA_PLATFORMTHEME "qt6ct"; }; screenshot-path "~/Multimedia/Screenshots/%Y-%m-%d_%H-%M-%S.png"; +window-rule { + match app-id="mpv"; + open-fullscreen true; +}; cursor { xcursor-size 24; xcursor-theme "Bibata-Modern-Amber"; @@ -13,7 +18,7 @@ layout { window-rule { open-floating false; clip-to-geometry true; - geometry-corner-radius 24; + geometry-corner-radius 8; }; input { touchpad { diff --git a/home/mods/noctalia.toml b/home/mods/noctalia.toml index e0e74a3..bd085eb 100644 --- a/home/mods/noctalia.toml +++ b/home/mods/noctalia.toml @@ -3,7 +3,7 @@ order = [ "default" ] [bar.default] center = [ "workspaces" ] - end = [ "tray", "notifications", "battery", "keyboard_layout" ] + end = [ "tray", "keyboard_layout", "battery", "notifications" ] margin_ends = 0 start = [ "date", "clock", "sysmon" ] widget_spacing = 12 diff --git a/home/root.nix b/home/root.nix index cab8b6f..8b18d7e 100644 --- a/home/root.nix +++ b/home/root.nix @@ -5,9 +5,12 @@ username = "root"; homeDirectory = "/root"; }; - programs.bash.initExtra = '' - session() { - systemd-run -tGM $1@ --user --wait $SHELL - } - ''; + programs.bash = { + shellAliases.dd = "dd bs=1M conv=fsync status=progress"; + initExtra = '' + user-session() { + systemd-run -tGM $1@ --user --wait $SHELL + } + ''; + }; } diff --git a/mods/pxeboot.nix b/mods/pxeboot.nix index c2d3488..c1639d7 100644 --- a/mods/pxeboot.nix +++ b/mods/pxeboot.nix @@ -60,13 +60,12 @@ tmpfiles.rules = [ "d /srv/tftp" ]; services.pxeboot = { before = [ "nfs-server.service" ]; - after = [ "wg-quick-awg0.service" ]; requiredBy = [ "nfs-server.service" ]; - requires = [ "wg-quick-awg0.service" ]; path = with pkgs; [ xz curl e2fsprogs grub2_efi util-linux ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; + TimeoutStartSec = "infinity"; ExecStop = pkgs.writeShellScript "stop.sh" '' set -e for distro in arch fedora; do @@ -130,6 +129,7 @@ mkdir -p /srv/nfs/$distro cd /srv/nfs/$distro if [ ! -e $distro.iso ]; then + until curl --head --max-time 3 https://www.google.com; do sleep 5; done curl -C - "$url" -Lo $distro.iso.tmp mv $distro.iso{.tmp,} sha256sum $distro.iso | grep $hash