2024-05-10 16:35:43 +02:00
|
|
|
|
# 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’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
];
|
|
|
|
|
|
2024-06-16 15:10:25 +02:00
|
|
|
|
# keyring for nextcloud etc.
|
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
|
security.pam.services.greetd.enableGnomeKeyring = true;
|
|
|
|
|
environment.variables.XDG_RUNTIME_DIR = "/run/user/$UID";
|
|
|
|
|
programs.seahorse.enable = true;
|
|
|
|
|
|
2024-05-10 16:35:43 +02:00
|
|
|
|
# optimize power usage
|
|
|
|
|
powerManagement.enable = true;
|
|
|
|
|
|
2024-05-13 08:40:09 +02:00
|
|
|
|
# prevent overheat
|
|
|
|
|
services.thermald.enable = true;
|
|
|
|
|
|
|
|
|
|
services.tlp = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
|
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
|
|
|
|
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
|
|
|
|
|
|
|
|
CPU_MIN_PERF_ON_AC = 0;
|
|
|
|
|
CPU_MAX_PERF_ON_AC = 100;
|
|
|
|
|
CPU_MIN_PERF_ON_BAT = 0;
|
|
|
|
|
CPU_MAX_PERF_ON_BAT = 20;
|
|
|
|
|
|
|
|
|
|
#Optional helps save long term battery health
|
|
|
|
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
|
|
|
|
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-05-10 16:35:43 +02:00
|
|
|
|
# optimize storage
|
|
|
|
|
nix.optimise.automatic = true;
|
|
|
|
|
|
|
|
|
|
# Bootloader.
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
|
|
|
|
# udev for brillo
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
|
|
|
|
'';
|
|
|
|
|
|
2024-05-13 08:40:09 +02:00
|
|
|
|
services.logind.extraConfig = ''
|
|
|
|
|
# don’t shutdown when power button is short-pressed
|
2024-05-27 13:26:41 +02:00
|
|
|
|
HandlePowerKey=suspend
|
2024-05-13 08:40:09 +02:00
|
|
|
|
'';
|
2024-05-27 13:26:41 +02:00
|
|
|
|
services.logind.lidSwitch = "suspend";
|
2024-05-13 08:40:09 +02:00
|
|
|
|
|
2024-05-10 16:35:43 +02:00
|
|
|
|
networking.hostName = "absol";
|
|
|
|
|
# networking.wireless.enable = true;
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
2025-01-20 13:11:25 +01:00
|
|
|
|
time.hardwareClockInLocalTime = true;
|
2024-05-10 16:35:43 +02:00
|
|
|
|
|
|
|
|
|
i18n.supportedLocales = [
|
|
|
|
|
"en_US.UTF-8/UTF-8"
|
|
|
|
|
"de_DE.UTF-8/UTF-8"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
|
LANG = "en_US.UTF-8";
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
LANGUAGE = "en_US.UTF-8";
|
|
|
|
|
LC_ADDRESS = "de_DE.UTF-8";
|
|
|
|
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
|
|
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
|
|
|
LC_MONETARY = "de_DE.UTF-8";
|
|
|
|
|
LC_NAME = "de_DE.UTF-8";
|
|
|
|
|
LC_NUMERIC = "de_DE.UTF-8";
|
|
|
|
|
LC_PAPER = "de_DE.UTF-8";
|
|
|
|
|
LC_TELEPHONE = "de_DE.UTF-8";
|
|
|
|
|
LC_TIME = "de_DE.UTF-8";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.greetd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
default_session = {
|
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
|
|
|
|
|
user = "greeter";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Configure console keymap
|
|
|
|
|
console.keyMap = "us";
|
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
2024-05-13 08:40:09 +02:00
|
|
|
|
services.avahi = {
|
|
|
|
|
enable = true;
|
|
|
|
|
nssmdns4 = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
};
|
2024-05-10 16:35:43 +02:00
|
|
|
|
services.printing = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-05-18 14:37:40 +02:00
|
|
|
|
# iwlwifi fix?
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
2024-05-10 16:35:43 +02:00
|
|
|
|
# bluetooth
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
hardware.bluetooth.powerOnBoot = true;
|
|
|
|
|
services.blueman.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Define a user account.
|
|
|
|
|
users.users.leonv = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "Leon Vatthauer";
|
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
|
|
|
|
initialPassword = "leonv"; # just for setup
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile.
|
|
|
|
|
environment.systemPackages =
|
2024-05-18 14:37:40 +02:00
|
|
|
|
with pkgs;
|
|
|
|
|
[
|
2024-05-13 08:40:09 +02:00
|
|
|
|
texliveFull
|
2024-06-16 15:10:25 +02:00
|
|
|
|
libsecret
|
2024-05-10 16:35:43 +02:00
|
|
|
|
# for connecting to nas
|
|
|
|
|
nfs-utils
|
|
|
|
|
|
|
|
|
|
# some standards for convenience
|
|
|
|
|
vim
|
|
|
|
|
parted
|
|
|
|
|
qpdfview
|
|
|
|
|
|
|
|
|
|
# deps for hyprland / eww
|
|
|
|
|
socat
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "24.05";
|
|
|
|
|
|
|
|
|
|
# source zsh
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
|
|
|
|
|
|
nix.settings.substituters = [
|
|
|
|
|
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# environment variables
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
|
## disable logging when direnv changes
|
|
|
|
|
DIRENV_LOG_FORMAT = [];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# fonts
|
|
|
|
|
fonts = {
|
2024-10-22 14:20:35 +02:00
|
|
|
|
fontDir.enable = true; # links fonts to /run/current-system/sw/share/X11/fonts
|
2024-05-10 16:35:43 +02:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
mononoki
|
2024-11-06 14:03:40 +01:00
|
|
|
|
noto-fonts-cjk-sans
|
2024-05-10 16:35:43 +02:00
|
|
|
|
noto-fonts-emoji
|
|
|
|
|
];
|
|
|
|
|
enableDefaultPackages = true;
|
|
|
|
|
fontconfig = {
|
|
|
|
|
defaultFonts = {
|
2025-01-20 23:18:57 +01:00
|
|
|
|
monospace = [ "BerkeleyMono Nerd Font Mono" ];
|
2024-05-10 16:35:43 +02:00
|
|
|
|
sansSerif = [ "NotoSans Nerd Font" ];
|
|
|
|
|
serif = [ "NotoSans Nerd Font" ];
|
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# enable flakes
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
|
|
# hyprland
|
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
|
|
|
|
|
|
# ssh
|
|
|
|
|
programs.ssh.startAgent = true;
|
|
|
|
|
programs.ssh.extraConfig = ''
|
|
|
|
|
AddKeysToAgent yes
|
|
|
|
|
IdentityFile ~/.ssh/git
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# thunar
|
|
|
|
|
programs.thunar = {
|
|
|
|
|
enable = true;
|
|
|
|
|
plugins = with pkgs.xfce; [
|
|
|
|
|
thunar-archive-plugin
|
|
|
|
|
thunar-volman
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
services.gvfs.enable = true; # Mount, trash, and others
|
|
|
|
|
services.tumbler.enable = true; # thumbnail support for images
|
|
|
|
|
}
|