2022-03-23 13:10:18 +01:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
2022-10-05 22:37:57 +02:00
|
|
|
|
options,
|
2022-03-23 13:10:18 +01:00
|
|
|
|
...
|
2022-03-31 16:24:43 +02:00
|
|
|
|
}: {
|
2021-05-28 00:15:51 +02:00
|
|
|
|
boot = {
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
loader = {
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
};
|
2021-05-23 15:58:16 +02:00
|
|
|
|
};
|
2021-05-19 23:08:18 +02:00
|
|
|
|
|
2021-05-28 00:15:51 +02:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "helix-texta";
|
2022-03-12 23:23:53 +01:00
|
|
|
|
networkmanager.enable = true;
|
2021-05-19 23:08:18 +02:00
|
|
|
|
};
|
2021-05-25 15:02:16 +02:00
|
|
|
|
|
2022-03-23 13:10:18 +01:00
|
|
|
|
system.fsPackages = [pkgs.sshfs];
|
2021-07-21 09:11:00 +02:00
|
|
|
|
|
2022-04-13 08:50:12 +02:00
|
|
|
|
settings.minimalGnome.enable = true;
|
2022-05-18 17:01:03 +02:00
|
|
|
|
settings.printing.enable = true;
|
2022-08-22 16:08:53 +02:00
|
|
|
|
settings.batteryStuff.enable = true;
|
2022-04-13 08:50:12 +02:00
|
|
|
|
|
2021-05-28 00:15:51 +02:00
|
|
|
|
# Pipewire for my wayland
|
2021-05-25 15:02:16 +02:00
|
|
|
|
sound.enable = false;
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
2021-06-05 12:07:55 +02:00
|
|
|
|
alsa.enable = true;
|
2021-06-26 21:10:47 +02:00
|
|
|
|
alsa.support32Bit = true;
|
2021-05-25 15:02:16 +02:00
|
|
|
|
pulse.enable = true;
|
2021-06-10 20:57:35 +02:00
|
|
|
|
jack.enable = true;
|
2021-06-05 12:07:55 +02:00
|
|
|
|
|
2021-10-14 16:58:38 +02:00
|
|
|
|
config.pipewire-pulse."stream.properties" = {
|
|
|
|
|
"channelmix.upmix" = true;
|
|
|
|
|
"channelmix.lfe-cutoff" = 150;
|
|
|
|
|
};
|
|
|
|
|
|
2022-03-23 13:10:18 +01:00
|
|
|
|
config.pipewire = {"default.clock.allowed-rates" = [48000 44100];};
|
2021-12-26 23:02:32 +01:00
|
|
|
|
|
2022-10-05 22:37:57 +02:00
|
|
|
|
media-session.config.media-session = lib.recursiveUpdate options.services.pipewire.media-session.config.media-session.default {
|
|
|
|
|
"session.modules".default = options.services.pipewire.media-session.config.media-session.default."session.modules".default ++ ["default-profile"];
|
|
|
|
|
};
|
|
|
|
|
|
2021-06-05 12:07:55 +02:00
|
|
|
|
media-session.config.alsa-monitor = {
|
2022-03-23 13:10:18 +01:00
|
|
|
|
rules = [
|
|
|
|
|
{
|
|
|
|
|
matches = [
|
|
|
|
|
{
|
|
|
|
|
"node.name" = "alsa_output.usb-Focusrite_Scarlett_Solo_USB_Y7ENM550A6399B-00.pro-output-0";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
actions = {
|
|
|
|
|
update-props = {
|
|
|
|
|
#"audio.rate" = 96000;
|
|
|
|
|
"api.alsa.headroom" = 1024;
|
|
|
|
|
};
|
2021-06-05 12:07:55 +02:00
|
|
|
|
};
|
2022-03-23 13:10:18 +01:00
|
|
|
|
}
|
|
|
|
|
];
|
2021-06-05 12:07:55 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
2021-07-06 18:23:17 +02:00
|
|
|
|
xdg.portal = {
|
|
|
|
|
enable = true;
|
2022-03-23 13:10:18 +01:00
|
|
|
|
extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
|
2021-07-06 18:23:17 +02:00
|
|
|
|
};
|
2021-06-05 12:07:55 +02:00
|
|
|
|
|
2021-11-29 16:36:30 +01:00
|
|
|
|
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"
|
|
|
|
|
'';
|
|
|
|
|
}
|
|
|
|
|
];
|
2021-08-16 20:09:08 +02:00
|
|
|
|
|
2021-06-05 16:01:32 +02:00
|
|
|
|
security.pam = {
|
|
|
|
|
yubico = {
|
2022-03-31 16:24:43 +02:00
|
|
|
|
control = "sufficient";
|
2021-06-05 16:01:32 +02:00
|
|
|
|
mode = "challenge-response";
|
|
|
|
|
debug = false;
|
|
|
|
|
};
|
2022-03-31 16:24:43 +02:00
|
|
|
|
# TODO: Update once my PR lands
|
|
|
|
|
services.login.yubicoAuth = true;
|
|
|
|
|
services.login.fprintAuth = true;
|
|
|
|
|
services.swaylock.yubicoAuth = true;
|
|
|
|
|
services.swaylock.fprintAuth = true;
|
|
|
|
|
services.sshd.fprintAuth = false;
|
2021-05-25 15:02:16 +02:00
|
|
|
|
};
|
2022-03-31 16:24:43 +02:00
|
|
|
|
# TODO: This is not good
|
2021-06-05 16:01:32 +02:00
|
|
|
|
services.fprintd.enable = true;
|
2021-05-19 23:08:18 +02:00
|
|
|
|
|
2022-03-23 13:10:18 +01:00
|
|
|
|
users.mutableUsers = false;
|
|
|
|
|
users.custom.malte.enable = true;
|
2021-07-08 11:44:14 +02:00
|
|
|
|
|
2021-05-28 00:15:51 +02:00
|
|
|
|
# Use some fonts
|
2021-07-09 10:46:19 +02:00
|
|
|
|
fonts = {
|
|
|
|
|
enableDefaultFonts = true;
|
2022-04-17 19:44:06 +02:00
|
|
|
|
fonts = with pkgs; [hackNerdLigatures noto-fonts noto-fonts-cjk joypixels];
|
2021-07-09 10:46:19 +02:00
|
|
|
|
fontconfig = {
|
|
|
|
|
enable = true;
|
2022-04-17 19:44:06 +02:00
|
|
|
|
defaultFonts.monospace = ["Hack NF FC Ligatured"];
|
2021-07-09 10:46:19 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
2021-05-28 00:15:51 +02:00
|
|
|
|
|
|
|
|
|
# Configure GPG with SSH support and enable the yubikey
|
2021-05-22 22:17:13 +02:00
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSSHSupport = true;
|
|
|
|
|
pinentryFlavor = "qt";
|
|
|
|
|
};
|
2021-05-19 23:08:18 +02:00
|
|
|
|
|
2022-08-18 14:26:03 +02:00
|
|
|
|
# TODO: This defaults to true, why does it not work with virtualisation.containers.enable?
|
|
|
|
|
boot.enableContainers = false;
|
2021-07-04 12:20:47 +02:00
|
|
|
|
virtualisation = {
|
|
|
|
|
podman = {
|
|
|
|
|
enable = true;
|
|
|
|
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
|
|
|
|
dockerCompat = true;
|
2021-09-11 12:38:30 +02:00
|
|
|
|
dockerSocket.enable = true;
|
|
|
|
|
defaultNetwork.dnsname.enable = true;
|
2021-07-04 12:20:47 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-06-15 18:15:54 +02:00
|
|
|
|
programs.steam.enable = true;
|
2021-07-18 13:33:50 +02:00
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
2022-03-23 13:10:18 +01:00
|
|
|
|
steam = pkgs.steam.override {extraPkgs = pkgs: [pkgs.openssl];};
|
2021-07-15 14:12:24 +02:00
|
|
|
|
};
|
|
|
|
|
|
2021-06-05 12:08:33 +02:00
|
|
|
|
programs.sway.enable = true;
|
2022-03-23 13:10:18 +01:00
|
|
|
|
services.udev.packages = with pkgs; [yubikey-personalization chrysalis];
|
2021-05-28 00:15:51 +02:00
|
|
|
|
|
2021-11-20 10:36:41 +01:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
thunderbolt
|
|
|
|
|
qt5.qtwayland
|
2021-12-22 18:45:44 +01:00
|
|
|
|
chrysalis
|
2021-11-20 10:36:41 +01:00
|
|
|
|
];
|
2022-03-29 12:13:07 +02:00
|
|
|
|
# TODO: Remove when firefox' RDD is fixed (allows libva)
|
|
|
|
|
environment.variables."MOZ_DISABLE_RDD_SANDBOX" = "1";
|
2021-05-28 00:15:51 +02:00
|
|
|
|
|
2021-05-31 14:39:02 +02:00
|
|
|
|
services.fwupd.enable = true;
|
2021-06-01 22:42:38 +02:00
|
|
|
|
services.devmon.enable = true;
|
2021-05-19 23:08:18 +02:00
|
|
|
|
|
2022-01-13 21:20:59 +01:00
|
|
|
|
sops.defaultSopsFile = ../secrets/hosts/helix-texta/secrets.yaml;
|
2022-03-23 13:10:18 +01:00
|
|
|
|
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
2021-12-04 12:47:59 +01:00
|
|
|
|
|
2021-05-19 23:08:18 +02:00
|
|
|
|
# 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 = "20.09"; # Did you read the comment?
|
|
|
|
|
}
|