This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/configuration.nix

258 lines
5.5 KiB
Nix
Raw Normal View History

2022-08-07 16:11:24 +01: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, inputs, ... }:
{
2022-10-03 23:21:40 +01:00
imports = [
2023-04-05 10:36:45 +01:00
# Include the results of the hardware scan.
2022-10-03 23:21:40 +01:00
./hardware-configuration.nix
];
2022-08-07 16:11:24 +01:00
2022-08-21 01:18:19 +01:00
nixpkgs.config.allowUnfree = true;
2022-08-07 16:11:24 +01:00
2022-08-21 01:18:19 +01:00
boot = {
2022-10-03 23:21:40 +01:00
kernelParams =
[
2023-04-05 10:36:45 +01:00
"amdgpu.ppfeaturemask=0xffffffff"
"net.ifnames=0"
];
2022-08-07 16:11:24 +01:00
2022-08-21 01:18:19 +01:00
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
grub = {
enable = true;
2023-05-10 13:37:18 +01:00
useOSProber = true;
2022-08-21 01:18:19 +01:00
efiSupport = true;
device = "nodev";
};
grub2-theme = {
enable = true;
2022-11-30 13:25:50 +00:00
theme = "stylish";
2022-08-21 01:18:19 +01:00
screen = "2k";
};
};
2022-08-07 16:11:24 +01:00
2023-02-26 00:49:03 +00:00
kernelPackages = pkgs.linuxPackages_zen;
2022-08-21 01:18:19 +01:00
kernelModules = [ "i2c-dev" "i2c-piix4" ];
};
2022-08-07 16:11:24 +01:00
2022-12-16 08:10:28 +00:00
powerManagement.cpuFreqGovernor = "schedutil";
2022-10-03 23:21:40 +01:00
2022-09-04 00:54:47 +01:00
networking = {
hostName = "terra"; # Define your hostname.
2023-03-14 15:23:24 +00:00
2023-05-10 13:37:18 +01:00
networkmanager = {
enable = true;
wifi.powersave = false;
2023-02-26 00:49:03 +00:00
};
2023-05-10 13:37:18 +01:00
firewall.enable = false;
2022-12-16 08:10:28 +00:00
extraHosts = ''
192.168.0.17 steam.deck
'';
2022-12-16 08:10:28 +00:00
2022-09-04 00:54:47 +01:00
};
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
# Set your time zone.
2022-08-07 16:11:24 +01:00
time.timeZone = "Europe/Vienna";
2023-04-05 10:36:45 +01:00
# Select internationalisation properties.
2022-08-14 21:20:39 +01:00
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_NUMERIC = "de_AT.UTF-8";
LC_TIME = "de_AT.UTF-8";
LC_MONETARY = "de_AT.UTF-8";
LC_MEASUREMENT = "de_AT.UTF-8";
LC_IDENTIFICATION = "de_AT.UTF-8";
};
};
2022-08-07 16:11:24 +01:00
console = {
font = "Lat2-Terminus16";
2022-08-08 10:01:42 +01:00
keyMap = "us-acentos";
2022-08-07 16:11:24 +01:00
};
2023-05-10 13:37:18 +01:00
chaotic.mesa-git.enable = true; # requires --impure for now
2023-05-15 21:06:28 +01:00
hardware.opengl = {
enable = true;
extraPackages = [ pkgs.libvdpau-va-gl ];
2022-08-07 16:11:24 +01:00
driSupport = true;
driSupport32Bit = true;
};
2022-08-07 16:11:24 +01:00
hardware.steam-hardware.enable = true;
2023-05-15 21:06:28 +01:00
programs.steam.enable = true;
chaotic.steam.extraCompatPackages = with pkgs; [ luxtorpeda proton-ge-custom ];
2022-08-07 16:11:24 +01:00
hardware.bluetooth.enable = true;
2023-02-26 00:49:03 +00:00
hardware.sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
};
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
# Enable sound.
2022-08-07 16:11:24 +01:00
sound.enable = true;
2022-11-14 11:58:04 +00:00
2022-09-04 00:54:47 +01:00
security = {
2023-04-05 10:36:45 +01:00
audit.enable = false;
auditd.enable = false;
polkit.enable = true;
rtkit.enable = true;
2022-09-04 00:54:47 +01:00
sudo.enable = false;
2023-04-05 10:36:45 +01:00
pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "262144";
}];
2022-09-04 00:54:47 +01:00
doas = {
enable = true;
extraRules = [{
users = [ "manuel" ];
keepEnv = true;
persist = true;
}];
};
};
2022-08-14 21:20:39 +01:00
2023-04-05 10:36:45 +01:00
# Define a user account. Don't forget to set a password with passwd.
2022-08-07 16:11:24 +01:00
users.users.manuel = {
isNormalUser = true;
2023-05-10 13:37:18 +01:00
extraGroups = [ "audio" "games" "input" "scanner" "lp" "users" "video" "vboxusers" "wheel" "networkmanager" ];
2022-08-07 16:11:24 +01:00
shell = pkgs.fish;
};
2023-04-05 10:36:45 +01:00
# List packages installed in system profile. To search, run:
# $ nix search wget
2022-09-04 00:54:47 +01:00
environment = {
systemPackages = with pkgs; [
bc distrobox fd file git htop links2 libsForQt5.dolphin libsForQt5.kio-extras lm_sensors nvtop-amd openrgb p7zip pciutils ripgrep unrar unzip usbutils
2022-09-04 00:54:47 +01:00
];
};
2022-08-07 16:11:24 +01:00
2023-04-12 23:27:05 +01:00
chaotic.gamescope = {
enable = true;
2023-05-10 13:37:18 +01:00
package = pkgs.gamescope_git;
2023-04-12 23:27:05 +01:00
};
2023-04-05 10:36:45 +01:00
# List services that you want to enable:
programs = {
dconf.enable = true;
2023-04-12 23:27:05 +01:00
hyprland.enable = true;
2023-04-05 10:36:45 +01:00
fish.enable = true;
kdeconnect.enable = true;
ssh.startAgent = true;
};
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
services = {
blueman.enable = true;
flatpak.enable = true;
fwupd.enable = true;
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
openssh.enable = true;
udisks2.enable = true;
2023-05-10 13:37:18 +01:00
udev = {
packages = [ pkgs.openrgb ];
};
2023-04-05 10:36:45 +01:00
printing = {
2023-05-15 21:06:28 +01:00
enable = true;
2023-04-05 10:36:45 +01:00
drivers = [ pkgs.cnijfilter2 ];
};
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
avahi = {
enable = true;
nssmdns = true;
};
2022-09-10 05:44:34 +01:00
2023-04-05 10:36:45 +01:00
mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
2022-11-14 11:58:04 +00:00
};
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
2022-11-14 11:58:04 +00:00
2022-08-07 16:11:24 +01:00
2023-04-05 10:36:45 +01:00
locate = {
enable = true;
locate = pkgs.plocate;
localuser = null;
prunePaths = lib.mkOptionDefault [ ];
interval = "hourly";
};
2022-08-14 21:20:39 +01:00
2023-04-05 10:36:45 +01:00
fstrim = {
enable = true;
interval = "weekly";
};
2022-08-14 21:20:39 +01:00
};
2023-05-10 13:37:18 +01:00
virtualisation = {
podman.enable = true;
# virtualbox.host.enable = true;
2023-05-10 13:37:18 +01:00
};
2023-04-12 23:27:05 +01:00
2023-04-05 10:36:45 +01:00
xdg.portal = {
2022-11-14 11:58:04 +00:00
enable = true;
2023-04-05 10:36:45 +01:00
xdgOpenUsePortal = true;
wlr.enable = false; #conflict with XDPH if enabled
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
2022-11-14 11:58:04 +00:00
};
2022-12-27 09:40:36 +00:00
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
2023-04-05 10:36:45 +01:00
'';
systemd.user.extraConfig = ''
2023-04-05 10:36:45 +01:00
# needed for xdg-open to find the default browser
2022-12-27 09:40:36 +00:00
DefaultEnvironment="PATH=/etc/profiles/per-user/manuel/bin:/run/current/system/sw/bin"
DefaultTimeoutStopSec=10s
2023-04-05 10:36:45 +01:00
'';
2022-12-16 08:10:28 +00:00
2022-11-14 11:58:04 +00:00
nix = {
2022-12-16 08:10:28 +00:00
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
2023-04-05 10:36:45 +01:00
'';
2022-11-14 11:58:04 +00:00
gc = {
persistent = true;
automatic = true;
dates = "weekly";
2023-04-05 10:36:45 +01:00
options = "--delete-older-than 7d";
2022-11-14 11:58:04 +00:00
};
settings = {
auto-optimise-store = true;
extra-substituters = [
"https://nyx.chaotic.cx"
];
extra-trusted-public-keys = [
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
];
};
2022-08-07 16:11:24 +01:00
};
2022-08-07 17:52:09 +01:00
2022-08-07 16:11:24 +01:00
system.stateVersion = "22.05"; # Did you read the comment?
}