171 lines
4.7 KiB
Nix
171 lines
4.7 KiB
Nix
{ config, pkgs, lib, ... }:
|
||
|
||
{
|
||
imports =
|
||
[
|
||
# Include the results of the hardware scan.
|
||
../../os-mods/common
|
||
../../os-mods/cachix
|
||
../../os-mods/network
|
||
./hardware-configuration.nix
|
||
];
|
||
|
||
# Bootloader.
|
||
boot.loader.grub.enable = true;
|
||
boot.loader.grub.device = "/dev/sda";
|
||
boot.loader.grub.useOSProber = true;
|
||
|
||
networking.hostName = "nixos";
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
fileSystems."/etc/nixos" = {
|
||
device = lib.mkForce "/home/reopen5194/nix";
|
||
fsType = "none";
|
||
options = [ "bind" ];
|
||
};
|
||
|
||
# Enable the X11 windowing system.
|
||
services.xserver.enable = true;
|
||
|
||
# Enable the KDE Plasma Desktop Environment.
|
||
services.xserver.displayManager.sddm.enable = true;
|
||
services.xserver.desktopManager.plasma5.enable = true;
|
||
|
||
# Configure keymap in X11
|
||
services.xserver = {
|
||
layout = "us";
|
||
xkbVariant = "";
|
||
};
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
|
||
# Enable sound with pipewire.
|
||
sound.enable = true;
|
||
hardware.pulseaudio.enable = false;
|
||
security.rtkit.enable = true;
|
||
security.sudo.wheelNeedsPassword = false;
|
||
security.polkit.extraConfig = ''
|
||
polkit.addRule(function(action, subject) {
|
||
if (action.id == "org.freedesktop.login1.suspend" ||
|
||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
|
||
action.id == "org.freedesktop.login1.hibernate" ||
|
||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
|
||
{
|
||
return polkit.Result.NO;
|
||
}
|
||
});
|
||
'';
|
||
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
jack.enable = true;
|
||
|
||
wireplumber.enable = true;
|
||
};
|
||
|
||
# Enable touchpad support (enabled default in most desktopManager).
|
||
# services.xserver.libinput.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.reopen5194 = {
|
||
isNormalUser = true;
|
||
description = "reopen5194";
|
||
extraGroups = [ "docker" "networkmanager" "wheel" ];
|
||
packages = with pkgs; [
|
||
firefox
|
||
kate
|
||
emacs
|
||
# thunderbird
|
||
];
|
||
openssh.authorizedKeys.keys = [
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4fBDj1/He/uimO97RgjGWZLAimTrLmIlYS2ekD73GC tristan@arch-pulse"
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDP8ztBIgQsYh7LefSKtuDRYDWNheZWbmIr51T/Np/jc tristand@nixos-pulse"
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/tkVxnPZB+C6sK9A12pUsB38OhXieMNaij6pC3foSH admin@vault81.de"
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMuH8L7mQDg86uJME6jndOu4niwLMASuJKpdbJU8Hfet tristan+desktop@vault81.de"
|
||
];
|
||
};
|
||
|
||
# Enable automatic login for the user.
|
||
services.xserver.displayManager.autoLogin.enable = true;
|
||
services.xserver.displayManager.autoLogin.user = "reopen5194";
|
||
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
neovim
|
||
vim
|
||
curl
|
||
fish
|
||
netmaker
|
||
# wget
|
||
];
|
||
|
||
# Some programs need SUID wrappers, can be configured further or are
|
||
# started in user sessions.
|
||
# programs.mtr.enable = true;
|
||
|
||
|
||
# QemuGuest
|
||
services.qemuGuest.enable = true;
|
||
|
||
# Virtualization
|
||
virtualisation.docker = {
|
||
enable = true;
|
||
rootless = {
|
||
enable = true;
|
||
setSocketVariable = true;
|
||
};
|
||
};
|
||
services.netdata = {
|
||
enable = true;
|
||
|
||
config = {
|
||
global = {
|
||
# uncomment to reduce memory to 32 MB
|
||
#"page cache size" = 32;
|
||
|
||
# update interval
|
||
"update every" = 15;
|
||
};
|
||
db = {
|
||
"update every" = 5;
|
||
"storage tiers" = 3;
|
||
"dbengine multihost disk space MB" = 1024;
|
||
"dbengine tier 1 multihost disk space MB" = 1024;
|
||
"dbengine tier 2 multihost disk space MB" = 512;
|
||
"cleanup obsolete charts after secs" = 600;
|
||
};
|
||
ml = {
|
||
# enable machine learning
|
||
"enabled" = "yes";
|
||
};
|
||
};
|
||
|
||
configDir = {
|
||
"stream.conf" = pkgs.writeText "stream.conf" ''
|
||
[8fcb63b3-8361-4339-a010-fc459c2132b0]
|
||
enabled = yes
|
||
default history = 36000
|
||
default memory mode = dbengine
|
||
health enabled by default = auto
|
||
allow from = 192.*
|
||
'';
|
||
};
|
||
};
|
||
|
||
|
||
# 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 = "23.05"; # Did you read the comment?
|
||
}
|