nixos-config/configuration.nix

176 lines
3.2 KiB
Nix
Raw Normal View History

2024-01-15 07:12:22 +00:00
{ config, pkgs, lib, ... }:
2022-06-18 14:46:22 +00:00
{
nixpkgs.config.allowUnfree = true;
2024-01-14 21:07:21 +00:00
boot.kernelPackages = pkgs.linuxPackages_latest;
2022-06-18 14:46:22 +00:00
boot.loader = {
2024-01-13 11:19:00 +00:00
timeout = 5;
2022-06-18 14:46:22 +00:00
efi.canTouchEfiVariables = true;
grub = {
efiSupport = true;
device = "nodev";
configurationLimit = 5;
2024-01-12 22:32:13 +00:00
useOSProber = true;
2024-04-15 20:08:11 +00:00
default = "saved";
2024-01-13 11:19:00 +00:00
theme = pkgs.sleek-grub-theme.override {
withBanner = "welcome to ${config.networking.hostName}";
withStyle = "dark";
};
2022-06-18 14:46:22 +00:00
};
};
2022-06-22 19:50:09 +00:00
powerManagement = {
2022-06-21 12:32:49 +00:00
enable = true;
};
2022-06-22 19:50:09 +00:00
services.acpid = {
enable = true;
logEvents = true;
};
2022-06-18 18:27:17 +00:00
2022-06-26 14:31:56 +00:00
services.logind = {
2024-01-12 22:32:31 +00:00
lidSwitch = "suspend-then-hibernate";
2022-06-26 14:31:56 +00:00
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleAction=suspend-then-hibernate
2022-06-26 14:31:56 +00:00
'';
};
2023-12-29 15:06:38 +00:00
services.fwupd.enable = true;
2022-06-28 14:08:43 +00:00
services.gnome.gnome-keyring.enable = true;
2023-03-08 09:50:08 +00:00
services.resolved.enable = true;
2022-06-28 14:08:43 +00:00
networking.networkmanager = {
enable = true;
wifi = {
backend = "iwd";
powersave = true;
};
};
2022-06-28 14:08:43 +00:00
2024-01-26 19:27:47 +00:00
services.upower = {
enable = true;
percentageCritical = 5;
criticalPowerAction = "HybridSleep";
};
programs = {
zsh.enable = true;
gphoto2.enable = true;
2024-03-11 07:36:01 +00:00
ausweisapp = {
enable = true;
openFirewall = true;
};
};
2022-06-28 14:08:43 +00:00
2022-06-22 19:37:55 +00:00
virtualisation.docker.enable = true;
2022-06-18 14:46:22 +00:00
time.timeZone = "Europe/Berlin";
services.timesyncd.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
console = {
2024-01-15 07:12:22 +00:00
font = lib.mkDefault "ter-u24n";
2022-06-18 14:46:22 +00:00
keyMap = "de-latin1-nodeadkeys";
2024-01-14 16:14:54 +00:00
packages = with pkgs; [ terminus_font ];
earlySetup = true;
2022-06-18 14:46:22 +00:00
};
2023-11-30 14:11:22 +00:00
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "DejaVuSansMono" "NerdFontsSymbolsOnly" ]; })
2023-09-24 19:56:38 +00:00
dejavu_fonts
fira-code
2022-06-18 14:46:22 +00:00
];
2022-06-20 09:33:39 +00:00
2023-09-24 19:56:38 +00:00
hardware = {
2024-12-01 11:45:12 +00:00
graphics.enable = true;
2023-09-24 19:56:38 +00:00
sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
};
2023-06-22 06:26:47 +00:00
};
2023-09-26 06:48:56 +00:00
security = {
polkit.enable = true;
rtkit.enable = true;
2023-09-26 06:48:56 +00:00
pam.services.swaylock = { };
2023-11-05 17:25:07 +00:00
pam.yubico = {
enable = true;
mode = "challenge-response";
id = [ "23664350" ];
control = "sufficient";
};
2023-09-26 06:48:56 +00:00
};
2023-09-24 19:56:38 +00:00
2022-06-18 14:46:22 +00:00
environment.systemPackages = with pkgs; [
neovim
git
];
2022-11-22 09:34:42 +00:00
environment.pathsToLink = [ "/share/zsh" ];
2023-10-23 06:38:46 +00:00
xdg.portal = {
enable = true;
wlr.enable = true;
2023-12-11 06:38:39 +00:00
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config = {
common = {
default = [ "wlr" "gtk" ];
};
};
2023-10-23 06:38:46 +00:00
};
2023-11-05 17:25:07 +00:00
services.udev.packages = [ pkgs.yubikey-personalization ];
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
};
2022-06-24 10:39:55 +00:00
services.openssh = {
enable = true;
settings.X11Forwarding = true;
2022-06-24 10:39:55 +00:00
};
2022-06-18 14:46:22 +00:00
2023-10-18 07:20:55 +00:00
services.udisks2.enable = true;
2022-08-29 06:19:29 +00:00
services.printing = {
enable = true;
};
services.avahi = {
enable = true;
2024-06-02 10:06:14 +00:00
nssmdns4 = true;
2022-08-29 06:19:29 +00:00
};
2022-06-18 14:46:22 +00:00
nix = {
2024-12-01 11:45:12 +00:00
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
2022-12-07 14:11:38 +00:00
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
2022-06-18 14:46:22 +00:00
};
system.stateVersion = "22.05";
}