nixos-config/configuration.nix

161 lines
2.9 KiB
Nix
Raw Normal View History

2022-06-18 14:46:22 +00:00
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
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-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;
2024-01-14 21:07:04 +00:00
powertop.enable = true;
2022-06-21 12:32:49 +00:00
};
2024-01-14 21:07:04 +00:00
services.tlp.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;
programs = {
appgate-sdp.enable = true;
zsh.enable = true;
gphoto2.enable = 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-14 16:14:54 +00:00
font = "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 = {
opengl.enable = true;
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-wlr
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;
nssmdns = true;
};
2022-06-18 14:46:22 +00:00
nix = {
package = pkgs.nixFlakes;
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";
}