summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/Arc/configuration.nix28
-rw-r--r--host/Arc/optional/gui/wayland.nix2
-rw-r--r--host/Arc/printing.nix54
-rw-r--r--host/AspireTC705/configuration.nix205
-rwxr-xr-xhost/AspireTC705/hooks/post-rebuild.sh7
-rwxr-xr-xhost/AspireTC705/hooks/pre-rebuild.sh7
-rw-r--r--host/AspireTC705/optional/hardware-specific/amd.nix42
-rw-r--r--host/AspireTC705/optional/hardware-specific/nvidia.nix40
-rw-r--r--host/AspireTC705/printing.nix54
9 files changed, 427 insertions, 12 deletions
diff --git a/host/Arc/configuration.nix b/host/Arc/configuration.nix

index d4c593d..4a7ba93 100644 --- a/host/Arc/configuration.nix +++ b/host/Arc/configuration.nix
@@ -12,13 +12,15 @@ args@{ # base imports ../../modules/base-client.nix ../../packages/vim.nix - ../../modules/users/Arci.nix + #../../modules/users/Arci.nix + ../../modules/users/geba.nix # hardware-specific imports #./optional/hardware-specific/nvidia.nix #./optional/gui/x11.nix ./optional/gui/wayland.nix + ./printing.nix ]; boot = { @@ -36,8 +38,9 @@ args@{ }; programs.noisetorch.enable = true; programs.gamemode.enable = true; - users.users.Rory.extraGroups = [ "gamemode" ]; - users.users.Arci.extraGroups = [ "gamemode" ]; + #users.users.Rory.extraGroups = [ "gamemode" ]; + #users.users.Arci.extraGroups = [ "gamemode" ]; + users.users.geba.extraGroups = [ "gamemode" ]; environment.sessionVariables = { ZSH_DISABLE_COMPFIX = "true"; @@ -61,8 +64,8 @@ args@{ services = { displayManager.gdm.enable = true; - displayManager.lightdm.enable = false; xserver = { + displayManager.lightdm.enable = false; enable = true; updateDbusEnvironment = true; xkb.layout = "us"; @@ -92,7 +95,7 @@ args@{ environment.systemPackages = with pkgs; [ eog #mpv - libreoffice + #libreoffice qt6.qtwayland #easyeffects @@ -124,15 +127,16 @@ args@{ firefox-bin #ungoogled-chromium #needed for Rider in order to debug WASM + google-chrome unrar-wrapper #mangohud #prismlauncher #vesktop #mindustry - thunderbird + #thunderbird - blueman - ft2-clone + #blueman + #ft2-clone (callPackage ../../packages/nheko-git.nix { inherit nhekoSrc; @@ -143,7 +147,7 @@ args@{ programs.steam = { enable = false; - gamescopeSession.enable = true; + gamescopeSession.enable = false; extraCompatPackages = with pkgs; [ steam-play-none proton-ge-bin @@ -221,8 +225,8 @@ args@{ #}; # }; - virtualisation.libvirtd.enable = true; - programs.virt-manager.enable = true; + virtualisation.libvirtd.enable = false; + programs.virt-manager.enable = false; monitoring = { monitorAll = false; @@ -238,7 +242,7 @@ args@{ services.gvfs.enable = true; zramSwap = { enable = true; - memoryPercent = 200; + memoryPercent = 300; }; services.pcscd.enable = true; diff --git a/host/Arc/optional/gui/wayland.nix b/host/Arc/optional/gui/wayland.nix
index f3bc56d..639906f 100644 --- a/host/Arc/optional/gui/wayland.nix +++ b/host/Arc/optional/gui/wayland.nix
@@ -52,6 +52,8 @@ virt-viewer keepassxc networkmanagerapplet + mpv + #obs-studio ]; #environment.etc."hyprPlugins" = { diff --git a/host/Arc/printing.nix b/host/Arc/printing.nix new file mode 100644
index 0000000..4f86347 --- /dev/null +++ b/host/Arc/printing.nix
@@ -0,0 +1,54 @@ +{ pkgs, ... }: + +{ + imports = [ ]; + + users.users = { + Rory = { + extraGroups = [ + "lp" + "scanner" + ]; + }; + }; + + environment.systemPackages = with pkgs; [ + xsane + simple-scan + ]; + + hardware = { + sane.enable = true; + sane.extraBackends = [ + pkgs.hplipWithPlugin + pkgs.sane-airscan + ]; + }; + + programs.system-config-printer.enable = true; + + services = { + gvfs.enable = true; + saned.enable = true; + system-config-printer.enable = true; + ipp-usb.enable = true; + printing = { + enable = true; + browsing = true; + drivers = with pkgs; [ hplip ]; + }; + avahi = { + enable = true; + nssmdns4 = true; + reflector = true; + publish = { + workstation = true; + userServices = true; + hinfo = true; + enable = true; + domain = true; + addresses = true; + }; + }; + }; +} diff --git a/host/AspireTC705/configuration.nix b/host/AspireTC705/configuration.nix new file mode 100644
index 0000000..06296a3 --- /dev/null +++ b/host/AspireTC705/configuration.nix
@@ -0,0 +1,205 @@ +args@{ + config, + pkgs, + lib, + nhekoSrc, + mtxclientSrc, + ... +}: + +{ + imports = [ + # base imports + ../../modules/base-client.nix + ../../packages/vim.nix + ../../modules/users/geba.nix + ../../modules/software-templates/eid-mw.nix + + ./printing.nix + ]; + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + loader = { + grub = { + configurationLimit = 10; + enable = true; + device = "nodev"; # nodev for EFI only + # EFI + efiSupport = true; + efiInstallAsRemovable = true; + }; + }; + }; + programs.noisetorch.enable = true; + programs.gamemode.enable = true; + users.users.geba.extraGroups = [ "gamemode" ]; + + environment.sessionVariables = { + ZSH_DISABLE_COMPFIX = "true"; + }; + + networking = { + hostName = "AspireTC705"; + networkmanager.enable = true; + wireless.enable = true; + firewall = { + enable = false; + # allowedTCPPorts = [ ... ]; + # allowedUDPPorts = [ ... ]; + }; + + #useDHCP = true; # Doesn't work with NetworkManager, investigate + }; + + time.timeZone = "Europe/Brussels"; + i18n.defaultLocale = "en_US.UTF-8"; + + services = { + displayManager.gdm.enable = true; + xserver = { + displayManager.lightdm.enable = false; + enable = true; + updateDbusEnvironment = true; + xkb.layout = "us"; + }; + libinput.enable = true; + + openssh = { + enable = true; + extraConfig = '' + MaxAuthTries 32 + ''; + settings.PermitRootLogin = "yes"; + }; + pipewire = { + enable = true; + audio.enable = true; + pulse.enable = true; + wireplumber.enable = true; + jack.enable = true; + alsa.enable = true; + }; + + desktopManager.plasma6.enable = true; + }; + + services.desktopManager.gnome.enable = false; + environment.systemPackages = with pkgs; [ + anydesk + eog + libreoffice + qt6.qtwayland + + easyeffects + kitty + vscode + + # - Utilities + #inkscape-with-extensions + gimp + + # - Languages + steam-run + file-roller + + google-chrome + unrar-wrapper + keepassxc + thunderbird + + blueman + # Wrapper script to tell to Chrome/Chromium to use p11-kit-proxy to load + # security devices, so they can be used for TLS client auth. + # Each user needs to run this themselves, it does not work on a system level + # due to a bug in Chromium: + # + # https://bugs.chromium.org/p/chromium/issues/detail?id=16387 + (pkgs.writeShellScriptBin "setup-browser-eid" '' + NSSDB="''${HOME}/.pki/nssdb" + mkdir -p ''${NSSDB} + + ${pkgs.nssTools}/bin/modutil -force -dbdir sql:$NSSDB -add p11-kit-proxy \ + -libfile ${pkgs.p11-kit}/lib/p11-kit-proxy.so + '') + ]; + + programs.steam = { + enable = false; + gamescopeSession.enable = false; + extraCompatPackages = with pkgs; [ + steam-play-none + proton-ge-bin + ]; + }; + virtualisation.waydroid.enable = false; + + xdg = { + portal = { + enable = true; + extraPortals = with pkgs; [ + #xdg-desktop-portal-gtk + xdg-desktop-portal-xapp + # (callPackage ../../modules/packages/xdg-desktop-portal-gtk.nix { }) + ]; + config = { + common = { + default = [ "gtk" ]; + }; + }; + xdgOpenUsePortal = true; + }; + #sounds.enable = true; + #mime.enable = true; + #menus.enable = true; + #icons.enable = true; + #autostart.enable = true; + }; + + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "electron-25.9.0" + "olm-3.2.16" + "dotnet-sdk-wrapped-7.0.410" + "dotnet-sdk-7.0.410" + ]; + }; + }; + security = { + polkit.enable = true; + sudo.wheelNeedsPassword = false; + }; + + hardware = { + pulseaudio.enable = false; + }; + + programs.dconf.enable = true; + services.power-profiles-daemon.enable = true; + + + services.gvfs.enable = true; + zramSwap = { + enable = true; + memoryPercent = 300; + }; + services.pcscd.enable = true; + + virtualisation.vmVariant = { + users = { + mutableUsers = false; + users.Rory.password = "password"; + }; + networking.interfaces.enp34s0 = lib.mkForce { }; + }; + + system.stateVersion = "24.11"; # DO NOT EDIT! + system.activationScripts.web-eid-app = { + text = '' + mkdir -p /usr/lib/x86_64-linux-gnu + ln -sf ${pkgs.eid-mw}/lib/pkcs11/beidpkcs11.so /usr/lib/x86_64-linux-gnu/libbeidpkcs11.so.0 + ''; +}; +} diff --git a/host/AspireTC705/hooks/post-rebuild.sh b/host/AspireTC705/hooks/post-rebuild.sh new file mode 100755
index 0000000..30733ad --- /dev/null +++ b/host/AspireTC705/hooks/post-rebuild.sh
@@ -0,0 +1,7 @@ +#!/usr/bin/env sh +set -x + +git restore --staged hardware-configuration.nix +git restore --staged Ran.ca +git restore --staged modules/opensuse/ +git restore --staged opensuse/ \ No newline at end of file diff --git a/host/AspireTC705/hooks/pre-rebuild.sh b/host/AspireTC705/hooks/pre-rebuild.sh new file mode 100755
index 0000000..d4ec9d3 --- /dev/null +++ b/host/AspireTC705/hooks/pre-rebuild.sh
@@ -0,0 +1,7 @@ +#!/usr/bin/env sh +set -x + +git add -f hardware-configuration.nix +git add -f Ran.ca +git add -f modules/opensuse/ +git add -f opensuse/ \ No newline at end of file diff --git a/host/AspireTC705/optional/hardware-specific/amd.nix b/host/AspireTC705/optional/hardware-specific/amd.nix new file mode 100644
index 0000000..e4758a6 --- /dev/null +++ b/host/AspireTC705/optional/hardware-specific/amd.nix
@@ -0,0 +1,42 @@ +{ + config, + pkgs, + lib, + nhekoSrc, + mtxclientSrc, + ... +}: + +{ + imports = [ ]; + + boot.initrd.kernelModules = [ "amdgpu" ]; + + services = { + xserver = { + windowManager.i3.extraSessionCommands = '' + xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off + ''; + wacom.enable = true; + }; + picom.backend = "glx"; + }; + + environment.systemPackages = with pkgs; [ + rocmPackages.rocm-smi # useful to have + ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + rocmPackages.clr.icd + #amdvlk + ]; + #extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + }; + }; + + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; +} diff --git a/host/AspireTC705/optional/hardware-specific/nvidia.nix b/host/AspireTC705/optional/hardware-specific/nvidia.nix new file mode 100644
index 0000000..1f98541 --- /dev/null +++ b/host/AspireTC705/optional/hardware-specific/nvidia.nix
@@ -0,0 +1,40 @@ +{ + config, + pkgs, + lib, + nhekoSrc, + mtxclientSrc, + ... +}: + +{ + imports = [ + + ]; + + services = { + xserver = { + #videoDrivers = [ "nvidia" ]; + #windowManager.i3.extraSessionCommands = '' + # todo: restore + #''; + }; + picom.backend = "glx"; + }; + + hardware = { + graphics = { + enable = true; + }; + + nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + nvidiaPersistenced = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; +} diff --git a/host/AspireTC705/printing.nix b/host/AspireTC705/printing.nix new file mode 100644
index 0000000..4f86347 --- /dev/null +++ b/host/AspireTC705/printing.nix
@@ -0,0 +1,54 @@ +{ pkgs, ... }: + +{ + imports = [ ]; + + users.users = { + Rory = { + extraGroups = [ + "lp" + "scanner" + ]; + }; + }; + + environment.systemPackages = with pkgs; [ + xsane + simple-scan + ]; + + hardware = { + sane.enable = true; + sane.extraBackends = [ + pkgs.hplipWithPlugin + pkgs.sane-airscan + ]; + }; + + programs.system-config-printer.enable = true; + + services = { + gvfs.enable = true; + saned.enable = true; + system-config-printer.enable = true; + ipp-usb.enable = true; + printing = { + enable = true; + browsing = true; + drivers = with pkgs; [ hplip ]; + }; + avahi = { + enable = true; + nssmdns4 = true; + reflector = true; + publish = { + workstation = true; + userServices = true; + hinfo = true; + enable = true; + domain = true; + addresses = true; + }; + }; + }; +}