nixconf/hosts/gabbielaptop/configuration.nix

195 lines
4.9 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
lib,
pkgs,
config,
...
}: {
imports = [
./hardware-configuration.nix
];
boot = {
initrd.systemd.enable = true;
loader.systemd-boot.enable = lib.mkForce false; # Required for lanzaboote to function, which enables secure boot
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
};
nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
};
boot.initrd.kernelModules = ["amdgpu"];
boot.extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
boot.kernelModules = ["v4l2loopback"];
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "gabbielaptop"; # Define your hostname.
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = [pkgs.stable.rocmPackages.clr.icd]; # Needed for davinci-resolve to utilize the gpu, otherwise it refuses to launch
};
# Enable networking
networking.networkmanager.enable = true;
services.tailscale.enable = true;
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
# Enable PPD to improve battery life maybe
services.power-profiles-daemon.enable = true;
# Enable greetd with ReGreet
services.greetd = {
enable = true;
# settings.default_session = {
# command = "${pkgs.greetd.regreet}/bin/regreet";
# };
};
programs.regreet = {
enable = true;
cageArgs = ["-m" "last"];
};
# Enable the Hyprland WM functionality for NixOS (xdg portals etc.)
programs.hyprland.enable = true;
# Enable fwupd for BIOS updates
services.fwupd.enable = true;
# Enable nix-ld for dynamically linked executeables
programs.nix-ld.enable = true;
# Configure keymap in X11
services.xserver.xkb.layout = "gb";
# Configure console keymap
console.keyMap = "uk";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber = {
enable = true;
extraConfig.enableMIDI = {
"wireplumber.settings" = {
node.features.audio.control-port = true; # This is needed for ardour to recognise my USB MIDI keyboard
};
}; # This is JSON
};
};
musnix.enable = true;
# pam.services = [
# { name = "gnome_keyring"
# text = ''
# auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# session optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so auto_start
#
# password optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# '';
# }
# ];
services.gnome.gnome-keyring.enable = true;
nix.settings.trusted-users = [
"root"
"blue"
];
programs.zsh.enable = true;
users.users.blue = {
isNormalUser = true;
description = "Gabriella Bere";
extraGroups = [
"networkmanager"
"wheel"
"dialout"
"audio"
];
shell = pkgs.zsh;
};
# Enable fingerprint daemon
services.fprintd.enable = true;
# services.fprintd.tod.enable = true;
# Enable bluetooth and blueman
hardware.bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
services.blueman.enable = true;
# Enable flatpak for nix-flatpak used in home-manager
services.flatpak.enable = true;
# Enable qmk for managing framework laptop keyboards
hardware.keyboard.qmk.enable = true;
# Enable steam and enable steam remoteplay
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
programs.gamemode.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
43391 # used to forward minecraft traffic to minecraft.gabbie.blue:33991
4455 # used for OBS websocket
7777 # used for Satisfactory Server
];
networking.firewall.allowedUDPPorts = [
7777 # # used for Satisfactory Server
43391 # used to forward simple voice chat traffic to minecraft.gabbie.blue:33991
];
networking.firewall.allowedUDPPortRanges = [
{
from = 45000;
to = 60000;
}
];
system.stateVersion = "24.05";
}