220 lines
5.1 KiB
Nix
220 lines
5.1 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
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
{ config
|
||
, pkgs
|
||
, inputs
|
||
, hostname
|
||
, username
|
||
, ...
|
||
}: {
|
||
imports = [
|
||
# Include the results of the hardware scan.
|
||
./hardware-configuration.nix
|
||
inputs.catppuccin.nixosModules.catppuccin
|
||
];
|
||
|
||
## Boot
|
||
# Bootloader.
|
||
boot.loader.grub = {
|
||
enable = true;
|
||
device = "/dev/nvme0n1";
|
||
configurationLimit = 10;
|
||
};
|
||
|
||
# Use latest kernel.
|
||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||
|
||
## Network
|
||
networking.hostName = hostname;
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
## Time/Language
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/Berlin";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
|
||
i18n.extraLocaleSettings = {
|
||
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";
|
||
};
|
||
|
||
# Configure console keymap
|
||
console.keyMap = "de";
|
||
|
||
## Nix
|
||
nix.settings.experimental-features = [
|
||
"nix-command"
|
||
"flakes"
|
||
];
|
||
|
||
nix.gc = {
|
||
automatic = true;
|
||
dates = "weekly";
|
||
options = "--delete-older-than 7d";
|
||
};
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
## Global packages
|
||
environment.systemPackages = with pkgs; [
|
||
vim
|
||
wget
|
||
git
|
||
cifs-utils # required for network mounting the NAS
|
||
age
|
||
rocmPackages.amdsmi
|
||
];
|
||
|
||
fonts = {
|
||
enableDefaultPackages = true;
|
||
packages = with pkgs; [
|
||
nerd-fonts.jetbrains-mono
|
||
];
|
||
fontDir.enable = true;
|
||
};
|
||
|
||
catppuccin.enable = true;
|
||
|
||
programs.hyprland.enable = true;
|
||
# Force electron apps to use wayland
|
||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||
|
||
programs.zsh.enable = true;
|
||
|
||
programs.steam = {
|
||
enable = true;
|
||
extraCompatPackages = [
|
||
pkgs.proton-ge-bin
|
||
];
|
||
protontricks = {
|
||
enable = true;
|
||
};
|
||
dedicatedServer.openFirewall = true;
|
||
localNetworkGameTransfers.openFirewall = true;
|
||
remotePlay.openFirewall = 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;
|
||
};
|
||
|
||
## User config
|
||
# enable auto-login
|
||
services.getty.autologinUser = username;
|
||
|
||
users.users.${username} = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "networkmanager" "wheel" ];
|
||
shell = pkgs.zsh;
|
||
};
|
||
|
||
## NAS Mount
|
||
|
||
fileSystems."/mnt/nas" = {
|
||
device = "//duke.veltnet/smb-share";
|
||
fsType = "cifs";
|
||
options = [
|
||
"x-systemd.automount"
|
||
"noauto"
|
||
"user,users"
|
||
"uid=1000"
|
||
"gid=100"
|
||
#TODO: we should use age for this
|
||
"credentials=/etc/nixos/secrets/nas-share.creds"
|
||
];
|
||
};
|
||
|
||
# required for zsh completion
|
||
environment.pathsToLink = [ "/share/zsh" ];
|
||
|
||
# List services that you want to enable:
|
||
|
||
services.kanata = {
|
||
enable = true;
|
||
#TODO: move kanata config to module
|
||
keyboards.remap-specials = {
|
||
config = ''
|
||
(deflocalkeys-linux
|
||
ö 39
|
||
)
|
||
|
||
(defsrc
|
||
a s d j k l ö
|
||
)
|
||
|
||
(defvar
|
||
tap-time 200
|
||
hold-time 200
|
||
)
|
||
|
||
(defalias
|
||
a (tap-hold $tap-time $hold-time a lmet)
|
||
s (tap-hold $tap-time $hold-time s lctl)
|
||
d (tap-hold $tap-time $hold-time d lsft)
|
||
k (tap-hold $tap-time $hold-time k rsft)
|
||
l (tap-hold $tap-time $hold-time l rctl)
|
||
ö (tap-hold $tap-time $hold-time ö ralt)
|
||
|
||
activate (tap-dance $tap-time (j _ _ (layer-switch home-mods)))
|
||
deactivate (tap-dance $tap-time (j _ _ (layer-switch base)))
|
||
)
|
||
|
||
(deflayer base
|
||
a s d @activate k l ö
|
||
)
|
||
|
||
(deflayer home-mods
|
||
@a @s @d @deactivate @k @l @ö
|
||
)
|
||
'';
|
||
extraDefCfg = ''
|
||
process-unmapped-keys yes
|
||
'';
|
||
};
|
||
};
|
||
|
||
services.nixseparatedebuginfod2.enable = true;
|
||
|
||
services.mullvad-vpn.enable = true;
|
||
services.pipewire = {
|
||
alsa.enable = true;
|
||
enable = true;
|
||
wireplumber.enable = true;
|
||
};
|
||
|
||
networking.firewall.enable = false;
|
||
|
||
# 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;
|
||
|
||
# This value determines the NixOS release from which the default
|
||
# settings for stateful data, like file locations and database versions
|
||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||
# this value at the release version of the first install of this system.
|
||
# Before changing this value read the documentation for this option
|
||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||
system.stateVersion = "25.11"; # Did you read the comment?
|
||
}
|