157 lines
3.6 KiB
Nix
157 lines
3.6 KiB
Nix
{ config, pkgs, inputs, ... }:
|
||
|
||
{
|
||
nix.settings.experimental-features = [
|
||
"nix-command"
|
||
"flakes"
|
||
];
|
||
|
||
# Bootloader.
|
||
boot.loader = {
|
||
efi.canTouchEfiVariables = true;
|
||
grub = {
|
||
enable = true;
|
||
devices = [ "nodev" ];
|
||
efiSupport = true;
|
||
useOSProber = true;
|
||
};
|
||
};
|
||
|
||
boot.initrd.kernelModules = [ "amdgpu" "coretemp" ];
|
||
|
||
services.hardware.bolt.enable = true;
|
||
|
||
networking.hostName = "nixpad"; # Define your hostname.
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
# 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";
|
||
};
|
||
|
||
imports = [
|
||
./programm_configs/yubikey-gpg.nix
|
||
./printing/config.nix
|
||
|
||
] ++ (if inputs.x11mode then
|
||
[ ./programm_configs/x11.nix ]
|
||
else [
|
||
./programm_configs/wayland.nix
|
||
]);
|
||
|
||
|
||
services.gvfs.enable = true;
|
||
|
||
# VPN services
|
||
services.openvpn.servers = {
|
||
KIT = {
|
||
autoStart = false;
|
||
config = '' config /home/clemens/Uni/kit.ovpn '';
|
||
};
|
||
};
|
||
|
||
# VirtualBox
|
||
virtualisation.virtualbox.host.enable = true;
|
||
users.extraGroups.vboxusers.members = [ "clemens" ];
|
||
|
||
# Bluetooth
|
||
services.blueman.enable = true;
|
||
|
||
#scanning
|
||
hardware.sane.enable = true;
|
||
|
||
# GNOME Keyring
|
||
services.gnome.gnome-keyring.enable = true;
|
||
|
||
# duplicati
|
||
services.duplicati = {
|
||
enable = true;
|
||
user = "clemens";
|
||
};
|
||
|
||
# PipeWire Setup
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
audio.enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
};
|
||
|
||
# Configure console keymap
|
||
console.keyMap = "de";
|
||
|
||
# enable zsh to allow setting it as a default shell
|
||
programs.zsh.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.clemens = {
|
||
isNormalUser = true;
|
||
description = "clemens";
|
||
initialPassword = "123456";
|
||
extraGroups = [ "networkmanager" "wheel" "scanner" "lp" ];
|
||
shell = pkgs.zsh;
|
||
};
|
||
|
||
# home manager
|
||
home-manager.useGlobalPkgs = true;
|
||
home-manager.useUserPackages = true;
|
||
home-manager.users.clemens = (import ./home.nix {
|
||
config = config;
|
||
pkgs = pkgs;
|
||
x11mode = inputs.x11mode;
|
||
});
|
||
|
||
# enable polkit
|
||
security.polkit.enable = true;
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
nixpkgs.config = {
|
||
packageOverrides = pkgs: rec {
|
||
polybar = pkgs.polybar.override {
|
||
i3Support = true;
|
||
pulseSupport = true;
|
||
};
|
||
};
|
||
};
|
||
|
||
# systemwide packages
|
||
environment.systemPackages = with pkgs; [
|
||
vim
|
||
wget
|
||
] ++ (if !inputs.x11mode then [greetd.regreet] else []);
|
||
|
||
programs.dconf.enable = true;
|
||
|
||
environment.pathsToLink = [ "/share/zsh" ];
|
||
|
||
environment.sessionVariables = {
|
||
GTK_THEME = "Adwaita:dark";
|
||
};
|
||
|
||
# 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 = "24.05"; # Did you read the comment?
|
||
}
|