config/hosts/garp/default.nix

107 lines
3.8 KiB
Nix
Raw Normal View History

2023-09-29 15:59:42 +02:00
{ config, pkgs, lib, ... }:
{
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "pbsds";
# tmp: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
#boot.kernelPackages = pkgs.linuxPackages_latest;
#hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
#hardware.nvidia.modesetting.enable = false; # makes atom behave, but mpv refuses to start
# PRIME: (lspci)
#hardware.nvidia.prime.intelBusId = "PCI:0:02:0";
#hardware.nvidia.prime.nvidiaBusId = "PCI:1:00:0";
imports = [
./hardware-configuration.nix
#../../hardware/gpu/cuda.nix
../../hardware/gpu/intel.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix
../../profiles/no-suspend.nix
../../profiles/podman.nix
../../profiles/docker.nix
../../users # home-manager
../../users/pbsds
../../profiles/shell/base.nix
../../profiles/shell/archives.nix
../../profiles/shell/nix-utils.nix
#../../profiles/shell/binfmt-emu.nix # qemu won't compile...
../../profiles/desktop/base.nix
../../profiles/desktop/gnome # configures gdm
#../../profiles/desktop/sound/alsa.nix
#../../profiles/desktop/sound/pulseaudio.nix
../../profiles/desktop/sound/pipewire.nix
2023-09-30 02:01:55 +02:00
../../profiles/domeneshop-dyndns # TODO: secrets
2023-09-29 15:59:42 +02:00
];
2023-10-14 18:23:24 +02:00
services.domeneshop-updater.targets = [ config.networking.fqdn ];
2023-09-29 15:59:42 +02:00
2023-09-30 02:01:55 +02:00
#networking.firewall.allowedTCPPorts = [ 57621 ]; # spotify local discovery
2023-09-29 15:59:42 +02:00
# Networking
networking.networkmanager.enable = true;
# Installed system packages
environment.systemPackages = with pkgs; [
cage
weston
];
# TODO: remove? Move?
programs.dconf.enable = true;
# nvidia bad
#nixpkgs.config.packageOverrides = lib.mkIf (!config.hardware.nvidia.prime.offload.enable) (pkgs: {
nixpkgs.config.packageOverrides = (pkgs: {
teams = pkgs.teams.overrideAttrs (old: rec {
postInstall = (old.postInstall or "") + ''
substituteInPlace $out/share/applications/teams.desktop \
--replace 'Exec=teams' 'Exec=teams --disable-gpu'
'';
});
discord = pkgs.discord.overrideAttrs (old: rec {
desktopItem = old.desktopItem.override (old: {
#exec = "${pkgs.coreutils}/bin/env NIXOS_OZONE_WL=1 ${old.exec}";
exec = "${pkgs.coreutils-full}/bin/env NIXOS_OZONE_WL=1 Discord";
});
postInstall = ''
ln -sf "${desktopItem}/share/applications" $out/share/
'' + old.postInstall;
});
slack = pkgs.slack.overrideAttrs (old: {
postInstall = old.postInstall or "" + ''
substituteInPlace $out/share/applications/slack.desktop \
--replace "$out/bin/slack " "$out/bin/slack --disable-gpu --in-process-gpu "
'';
});
element-desktop = pkgs.element-desktop.overrideAttrs (old: {
desktopItem = old.desktopItem.override (old: {
exec = "element-desktop --disable-gpu --in-process-gpu %u";
});
});
});
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}