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’).
|
|
|
|
|
|
2022-08-21 01:18:19 +01:00
|
|
|
|
{ config, pkgs, lib, ... }:
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
];
|
|
|
|
|
|
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 = {
|
|
|
|
|
consoleLogLevel = 3;
|
|
|
|
|
|
|
|
|
|
kernelParams = [
|
|
|
|
|
"quiet"
|
|
|
|
|
"udev.log_level=3"
|
|
|
|
|
"amdgpu.ppfeaturemask=0xffffffff"
|
|
|
|
|
];
|
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;
|
2022-09-10 05:44:34 +01:00
|
|
|
|
useOSProber = false;
|
2022-08-21 01:18:19 +01:00
|
|
|
|
efiSupport = true;
|
|
|
|
|
device = "nodev";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
grub2-theme = {
|
|
|
|
|
enable = true;
|
|
|
|
|
theme = "vimix";
|
|
|
|
|
screen = "2k";
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
2022-08-21 01:18:19 +01:00
|
|
|
|
initrd.availableKernelModules = [ "amdgpu" ];
|
2022-09-20 14:26:47 +01:00
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2022-08-21 01:18:19 +01:00
|
|
|
|
kernelModules = [ "i2c-dev" "i2c-piix4" ];
|
2022-09-10 05:44:34 +01:00
|
|
|
|
|
2022-08-21 01:18:19 +01:00
|
|
|
|
};
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
2022-09-04 00:54:47 +01:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "terra"; # Define your hostname.
|
|
|
|
|
networkmanager = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
firewall.checkReversePath = false;
|
|
|
|
|
};
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Vienna";
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
hardware.opengl = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraPackages = [
|
|
|
|
|
pkgs.libvdpau-va-gl
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
driSupport = true;
|
|
|
|
|
driSupport32Bit = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
hardware.steam-hardware.enable = true;
|
|
|
|
|
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
sound.enable = true;
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-21 01:18:19 +01:00
|
|
|
|
services.locate = {
|
|
|
|
|
enable = true;
|
|
|
|
|
locate = pkgs.plocate;
|
|
|
|
|
localuser = null;
|
|
|
|
|
prunePaths = lib.mkOptionDefault [
|
|
|
|
|
];
|
|
|
|
|
interval = "hourly";
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-04 00:54:47 +01:00
|
|
|
|
services.fstrim = {
|
|
|
|
|
enable = true;
|
|
|
|
|
interval = "weekly";
|
|
|
|
|
};
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
2022-09-04 00:54:47 +01:00
|
|
|
|
security = {
|
|
|
|
|
sudo.enable = false;
|
|
|
|
|
doas = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraRules = [{
|
|
|
|
|
users = [ "manuel" ];
|
|
|
|
|
keepEnv = true;
|
|
|
|
|
persist = true;
|
|
|
|
|
}];
|
|
|
|
|
};
|
|
|
|
|
polkit.enable = true;
|
|
|
|
|
};
|
2022-08-14 21:20:39 +01:00
|
|
|
|
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
2022-09-10 05:44:34 +01:00
|
|
|
|
|
2022-08-07 16:11:24 +01:00
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.manuel = {
|
|
|
|
|
isNormalUser = true;
|
2022-09-04 00:54:47 +01:00
|
|
|
|
extraGroups = [ "users" "wheel" "audio" "video" "games" "input" "geoclue" "networkmanager" "nm-openvpn" ];
|
2022-08-07 16:11:24 +01:00
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
2022-09-04 00:54:47 +01:00
|
|
|
|
environment = {
|
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
|
git
|
|
|
|
|
links2
|
|
|
|
|
ripgrep
|
|
|
|
|
fd
|
|
|
|
|
htop
|
|
|
|
|
openrgb
|
|
|
|
|
unzip
|
|
|
|
|
unrar
|
|
|
|
|
p7zip
|
|
|
|
|
];
|
|
|
|
|
pathsToLink = [ "/share/zsh" ];
|
|
|
|
|
binsh = "${pkgs.dash}/bin/dash";
|
|
|
|
|
};
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
services.udev.packages = [ pkgs.openrgb ];
|
|
|
|
|
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
|
2022-09-10 05:44:34 +01:00
|
|
|
|
programs.kdeconnect.enable = true;
|
|
|
|
|
|
2022-08-07 16:11:24 +01:00
|
|
|
|
services.geoclue2 = {
|
|
|
|
|
enable = true;
|
|
|
|
|
appConfig."gammastep".isAllowed = true;
|
|
|
|
|
appConfig."gammastep".isSystem = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
2022-08-14 21:20:39 +01:00
|
|
|
|
|
2022-08-07 16:11:24 +01:00
|
|
|
|
xdg.portal = {
|
|
|
|
|
enable = true;
|
2022-08-08 10:01:42 +01:00
|
|
|
|
wlr.enable = true;
|
2022-08-07 16:11:24 +01:00
|
|
|
|
extraPortals = [
|
2022-09-20 14:26:47 +01:00
|
|
|
|
#pkgs.xdg-desktop-portal-gtk
|
2022-08-07 16:11:24 +01:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-14 21:20:39 +01:00
|
|
|
|
services.printing = {
|
|
|
|
|
enable = true;
|
|
|
|
|
drivers = [ pkgs.cnijfilter2 ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.avahi = {
|
|
|
|
|
enable = true;
|
|
|
|
|
nssmdns = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-21 01:18:19 +01:00
|
|
|
|
services.greetd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
default_session = {
|
|
|
|
|
vt = 1;
|
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway";
|
|
|
|
|
};
|
|
|
|
|
user = "manuel";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-10 05:44:34 +01:00
|
|
|
|
services.fwupd.enable = true;
|
|
|
|
|
|
2022-08-07 16:11:24 +01:00
|
|
|
|
nix.gc = {
|
|
|
|
|
persistent = true;
|
|
|
|
|
automatic = true;
|
|
|
|
|
};
|
2022-08-07 17:52:09 +01:00
|
|
|
|
|
|
|
|
|
nix.extraOptions = ''
|
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
|
warn-dirty = false
|
|
|
|
|
'';
|
2022-08-07 16:11:24 +01:00
|
|
|
|
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|