273 lines
7.9 KiB
Nix
273 lines
7.9 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page, on
|
||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||
|
||
{ inputs, config, lib, pkgs, ... }:
|
||
|
||
{
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
./hardware-configuration.nix
|
||
];
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader.systemd-boot.xbootldrMountPoint = "/boot";
|
||
boot.loader.efi.efiSysMountPoint = "/efi";
|
||
boot.initrd.luks.devices.cryptroot = {
|
||
device = "/dev/disk/by-uuid/9aaac705-2737-4222-9887-51131acec90c";
|
||
};
|
||
|
||
networking.hostName = "hermes"; # Define your hostname.
|
||
# Pick only one of the below networking options.
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||
networking.wireless.iwd.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/Paris";
|
||
|
||
# Configure network proxy if necessary
|
||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
# console = {
|
||
# font = "Lat2-Terminus16";
|
||
# keyMap = "us";
|
||
# useXkbConfig = true; # use xkb.options in tty.
|
||
# };
|
||
|
||
# Enable the X11 windowing system.
|
||
# services.xserver.enable = true;
|
||
|
||
services.avahi.enable = true;
|
||
hardware.graphics.enable = true;
|
||
services.xserver.videoDrivers = [ "modesetting" "nvidia" ];
|
||
hardware.nvidia.open = true;
|
||
hardware.nvidia.nvidiaSettings = true;
|
||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||
|
||
hardware.graphics.extraPackages = with pkgs; [
|
||
intel-media-driver # VA-API (iHD) userspace
|
||
vpl-gpu-rt # oneVPL (QSV) runtime
|
||
];
|
||
programs.nix-ld.enable = true;
|
||
|
||
environment.sessionVariables = {
|
||
LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend
|
||
# VDPAU_DRIVER = "va_gl"; # Only if using libvdpau-va-gl
|
||
};
|
||
|
||
hardware.nvidia.prime = {
|
||
# offload.enable = true;
|
||
intelBusId = "PCI:0:2:0";
|
||
nvidiaBusId = "PCI:2:0:0";
|
||
};
|
||
|
||
# May help if FFmpeg/VAAPI/QSV init fails (esp. on Arc with i915):
|
||
hardware.enableRedistributableFirmware = true;
|
||
boot.kernelParams = [ "i915.enable_guc=3" ];
|
||
|
||
programs.niri.enable = true;
|
||
|
||
|
||
# Configure keymap in X11
|
||
# services.xserver.xkb.layout = "us";
|
||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||
|
||
# Enable CUPS to print documents.
|
||
# services.printing.enable = true;
|
||
|
||
# Enable sound.
|
||
# services.pulseaudio.enable = true;
|
||
# OR
|
||
# services.pipewire = {
|
||
# enable = true;
|
||
# pulse.enable = true;
|
||
# };
|
||
|
||
# Enable touchpad support (enabled default in most desktopManager).
|
||
# services.libinput.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.pml = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "i2c" "wheel" ]; # Enable ‘sudo’ for the user.
|
||
};
|
||
|
||
# programs.firefox.enable = true;
|
||
|
||
# List packages installed in system profile.
|
||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||
environment.systemPackages = with pkgs; [
|
||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
wget
|
||
sbctl
|
||
alacritty
|
||
fuzzel
|
||
libva-utils
|
||
firefox
|
||
(openrgb.overrideAttrs (old: {
|
||
src = pkgs.fetchFromGitLab {
|
||
owner = "CalcProgrammer1";
|
||
repo="OpenRGB";
|
||
rev = "release_candidate_1.0rc2";
|
||
sha256 = "vdIA9i1ewcrfX5U7FkcRR+ISdH5uRi9fz9YU5IkPKJQ=";
|
||
};
|
||
patches = [
|
||
./remove_systemd_service.patch
|
||
];
|
||
postPatch = ''
|
||
patchShebangs scripts/build-udev-rules.sh
|
||
substituteInPlace scripts/build-udev-rules.sh \
|
||
--replace-fail /usr/bin/env "${pkgs.coreutils}/bin/env"
|
||
'';
|
||
version = "1.0rc2";
|
||
}))
|
||
|
||
i2c-tools
|
||
];
|
||
fonts.fontconfig = {
|
||
enable = true;
|
||
antialias = true;
|
||
hinting = {
|
||
enable = true;
|
||
style = "slight";
|
||
};
|
||
subpixel = {
|
||
rgba = "rgb";
|
||
lcdfilter = "default";
|
||
};
|
||
|
||
defaultFonts = {
|
||
serif = [ "SF Pro" "DejaVu Serif" ];
|
||
sansSerif = [ "SF Pro" "DejaVu Sans" ];
|
||
monospace = [ "Iosevka" "DejaVu Sans Mono" ];
|
||
emoji = [ "Noto Color Emoji" ];
|
||
};
|
||
};
|
||
|
||
fonts.packages = with pkgs; [
|
||
noto-fonts-color-emoji
|
||
(iosevka.override {
|
||
set = "cavalier";
|
||
|
||
privateBuildPlan = {
|
||
family = "Iosevka Cavalier";
|
||
spacing = "normal";
|
||
serifs = "sans";
|
||
noCvSs = false;
|
||
exportGlyphNames = true;
|
||
|
||
variants.inherits = "ss08";
|
||
|
||
variants.weights.Regular = {
|
||
shape = 400;
|
||
menu = 400;
|
||
css = 400;
|
||
};
|
||
|
||
variants.weights.Bold = {
|
||
shape = 700;
|
||
menu = 700;
|
||
css = 700;
|
||
};
|
||
|
||
variants.weights.Italic = {
|
||
angle = 9.4;
|
||
shape = "italic";
|
||
menu = "italic";
|
||
css = "italic";
|
||
};
|
||
|
||
variants.weights.Upright = {
|
||
angle = 0;
|
||
shape = "upright";
|
||
menu = "upright";
|
||
css = "upright";
|
||
};
|
||
};
|
||
})
|
||
];
|
||
|
||
programs._1password.enable = true;
|
||
programs._1password-gui = {
|
||
enable = true;
|
||
# Certain features, including CLI integration and system authentication support,
|
||
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
||
polkitPolicyOwners = [ "pml" ];
|
||
};
|
||
|
||
#services.hardware.openrgb.enable = true;
|
||
services.udev.packages = [ pkgs.openrgb ];
|
||
boot.kernelModules = [ "i2c-dev" ];
|
||
hardware.i2c.enable = true;
|
||
|
||
environment.etc = {
|
||
"1password/custom_allowed_browsers" = {
|
||
text = ''
|
||
firefox
|
||
'';
|
||
mode = "0755";
|
||
};
|
||
};
|
||
hardware.bluetooth.enable = true;
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true; # if not already enabled
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
# If you want to use JACK applications, uncomment the following
|
||
jack.enable = true;
|
||
};
|
||
|
||
|
||
# Some programs need SUID wrappers, can be configured further or are
|
||
# started in user sessions.
|
||
# programs.mtr.enable = true;
|
||
# programs.gnupg.agent = {
|
||
# enable = true;
|
||
# enableSSHSupport = true;
|
||
# };
|
||
|
||
# List services that you want to enable:
|
||
|
||
# Enable the OpenSSH daemon.
|
||
services.openssh.enable = true;
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
# Copy the NixOS configuration file and link it from the resulting system
|
||
# (/run/current-system/configuration.nix). This is useful in case you
|
||
# accidentally delete configuration.nix.
|
||
# system.copySystemConfiguration = true;
|
||
|
||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||
#
|
||
# Most users should NEVER change this value after the initial install, for any reason,
|
||
# even if you've upgraded your system to a new NixOS release.
|
||
#
|
||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||
# to actually do that.
|
||
#
|
||
# This value being lower than the current NixOS release does NOT mean your system is
|
||
# out of date, out of support, or vulnerable.
|
||
#
|
||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||
# and migrated your data accordingly.
|
||
#
|
||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||
system.stateVersion = "25.05"; # Did you read the comment?
|
||
|
||
}
|
||
|