nixos/configuration.nix

155 lines
3.5 KiB
Nix
Raw Permalink Normal View History

2026-03-03 20:15:06 +01:00
{
config,
pkgs,
...
}:
{
imports = [
# Include the results of the hardware scan.
./stylix.nix
];
fonts = {
packages = with pkgs; [
noto-fonts-cjk-sans
noto-fonts
nerd-fonts._0xproto
material-symbols
2026-03-03 20:15:06 +01:00
];
};
services.displayManager.gdm.enable = true;
2026-03-04 16:48:43 +01:00
programs.hyprland.enable = true;
nixpkgs.config.permittedInsecurePackages = [
"ventoy-1.1.10"
];
2026-03-03 20:15:06 +01:00
boot = {
plymouth = {
enable = true;
};
# Enable "Silent boot"
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_priority=3"
"rd.systemd.show_status=auto"
];
loader.timeout = 0;
};
hardware.graphics.enable = true;
nix = {
extraOptions = "experimental-features = nix-command flakes";
optimise.automatic = true;
optimise.dates = [ "12:00" ];
gc = {
automatic = true;
};
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
2026-03-04 16:48:43 +01:00
security.doas.enable = true;
security.sudo.enable = false;
security.doas.extraRules = [
{
keepEnv = true;
persist = true; # Optional, only require password verification a single time
}
];
2026-03-03 20:15:06 +01:00
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
services.power-profiles-daemon.enable = false;
services.upower.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "balanced";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "balanced";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
PCIE_ASPM_ON_BAT = "powersupersave";
PCIE_ASPM_ON_AC = "default";
};
};
2026-03-03 20:15:06 +01:00
services.auto-cpufreq.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
# Enable networking
2026-03-09 23:24:36 +01:00
networking.networkmanager = {
enable = true;
};
2026-03-03 20:15:06 +01:00
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
services.xserver.xkb = {
layout = "us";
};
console.keyMap = "us";
programs.zsh.enable = true;
users.users.lucy = {
isNormalUser = true;
description = "lucy";
shell = pkgs.zsh;
extraGroups = [
"networkmanager"
"wheel"
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.pathsToLink = [
"/share/applications"
"/share/xdg-desktop-portal"
];
environment.systemPackages = with pkgs; [
openssl
fastfetch
quickshell
flashrom
usbutils
clang-tools
clang
2026-03-09 23:24:36 +01:00
iw
2026-03-03 20:15:06 +01:00
];
programs.steam = {
enable = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
programs.git.enable = true;
systemd.user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
};
};
system.stateVersion = "25.05"; # Did you read the comment?
}