171 lines
4.5 KiB
Nix
171 lines
4.5 KiB
Nix
{
|
||
pkgs,
|
||
lib,
|
||
inputs,
|
||
...
|
||
}: {
|
||
imports = [
|
||
inputs.nixos-hardware.nixosModules.common-pc
|
||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||
inputs.nixos-hardware.nixosModules.common-gpu-amd
|
||
inputs.self.nixosModules.homeManagerConfig
|
||
inputs.custom-udev-rules.nixosModule
|
||
../../hardware/aorus.nix
|
||
../../modules/snapclient.nix
|
||
./topology.nix
|
||
];
|
||
|
||
config = {
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot.loader = {
|
||
systemd-boot.enable = true;
|
||
efi.canTouchEfiVariables = true;
|
||
};
|
||
|
||
networking = {
|
||
hostName = "murex-pecten";
|
||
networkmanager.enable = true;
|
||
};
|
||
|
||
system.fsPackages = [pkgs.sshfs];
|
||
|
||
nixpkgs.overlays = [
|
||
inputs.nixpkgs-wayland.overlay
|
||
];
|
||
|
||
settings.minimalGnome.enable = true;
|
||
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
jack.enable = true;
|
||
};
|
||
services.snapclient.enable = true;
|
||
services.pipewire.extraConfig.pipewire."99-snapcast-stream"."context.modules" = lib.singleton {
|
||
name = "libpipewire-module-snapcast-discover";
|
||
args = {
|
||
stream.rules = lib.singleton {
|
||
matches = lib.singleton { "snapcast.hostname" = "snapserver"; };
|
||
};
|
||
};
|
||
};
|
||
|
||
xdg.portal = {
|
||
enable = true;
|
||
config.common.default = "*";
|
||
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
|
||
};
|
||
|
||
hardware = {
|
||
graphics = {
|
||
enable = true;
|
||
enable32Bit = true;
|
||
extraPackages = with pkgs; [amdvlk];
|
||
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
|
||
};
|
||
};
|
||
|
||
users.mutableUsers = false;
|
||
users.custom.malte.enable = true;
|
||
|
||
fonts = {
|
||
enableDefaultPackages = true;
|
||
packages = with pkgs; [hack-nerdfont noto-fonts noto-fonts-cjk joypixels];
|
||
fontconfig = {
|
||
enable = true;
|
||
defaultFonts.monospace = ["Hack Nerd Font Mono"];
|
||
};
|
||
};
|
||
|
||
# Configure GPG with SSH support and enable the yubikey
|
||
programs.gnupg.agent = {
|
||
enable = true;
|
||
enableSSHSupport = true;
|
||
pinentryPackage = pkgs.pinentry-qt;
|
||
};
|
||
|
||
security.pam = {
|
||
yubico = {
|
||
enable = false;
|
||
mode = "challenge-response";
|
||
control = "sufficient";
|
||
};
|
||
services.login.yubicoAuth = true;
|
||
};
|
||
|
||
services.udev.customRules = [
|
||
# Rename the Scarlett Solo using udev
|
||
{
|
||
name = "85-scarlett-solo";
|
||
rules = ''
|
||
SUBSYSTEM=="usb", ENV{ID_MODEL_ID}=="8211", ENV{ID_VENDOR_ID}=="1235", TAG+="systemd", SYMLINK+="scarlett_solo"
|
||
'';
|
||
}
|
||
{
|
||
name = "85-yubikey";
|
||
rules = ''
|
||
SUBSYSTEM=="usb", ENV{ID_MODEL_ID}=="0407", ENV{ID_VENDOR_ID}=="1050", TAG+="systemd", SYMLINK+="yubikey"
|
||
'';
|
||
}
|
||
];
|
||
|
||
# TODO: This defaults to true, why does it not work with virtualisation.containers.enable?
|
||
boot.enableContainers = false;
|
||
virtualisation = {
|
||
podman = {
|
||
enable = true;
|
||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||
dockerCompat = true;
|
||
dockerSocket.enable = true;
|
||
};
|
||
};
|
||
|
||
programs.steam = {
|
||
enable = true;
|
||
remotePlay.openFirewall = true;
|
||
};
|
||
|
||
programs.corectrl.enable = true;
|
||
|
||
services.dbus.packages = with pkgs; [openrgb];
|
||
services.udev.packages = with pkgs; [
|
||
yubikey-personalization
|
||
chrysalis
|
||
openrgb
|
||
i2c-tools
|
||
gnome-settings-daemon
|
||
qmk-udev-rules
|
||
vial
|
||
];
|
||
|
||
sops.defaultSopsFile = ../../secrets/hosts/murex-pecten/secrets.yaml;
|
||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
qt5.qtwayland
|
||
thunderbolt
|
||
chrysalis
|
||
openrgb
|
||
gnomeExtensions.appindicator
|
||
qmk
|
||
vial
|
||
];
|
||
|
||
services.fwupd.enable = true;
|
||
services.devmon.enable = true;
|
||
services.ratbagd.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 = "21.11"; # Did you read the comment?
|
||
};
|
||
}
|