nix-config/hosts/configuration.nix

242 lines
5.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
config,
lib,
pkgs,
unstable,
inputs,
vars,
...
}: {
imports =
(import ../modules/desktops) ++ (import ../modules/shell) ++ [../modules/programs/librewolf.nix ../modules/programs/alacritty.nix] ++ (import ../modules/theming) ++ (import ../modules/coding);
users.users.${vars.user} = {
# System User
isNormalUser = true;
extraGroups = ["wheel" "video" "audio" "camera" "networkmanager" "lp" "scanner" "kvm" "libvirtd" "i2c" "tty" "dialout" "wireshark"];
};
boot.supportedFilesystems = ["ntfs" "exfat"];
# Set default shell -> move to module
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [fish];
programs.fish.enable = true;
services.flatpak.enable = true;
# Enable the X11 windowing system.
# services.xserver.enable = true;
# programs.ssh.startAgent = true;
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
# Configure keymap in X11
# services.xserver = {
# layout = "de";
# xkbVariant = "";
# };
environment.defaultCursor = {
enable = true;
theme = "breeze_cursors";
};
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
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";
};
};
console = {
# font = "Lat2-Terminus16";
keyMap = "de";
};
security = {
rtkit.enable = true;
polkit.enable = true;
};
fonts.fonts = with pkgs; [
# Fonts
carlito # NixOS
vegur # NixOS
source-code-pro
jetbrains-mono
font-awesome # Icons
corefonts # MS
carlito
dejavu_fonts
ipafont
kochi-substitute
source-code-pro
ttf_bitstream_vera
inter
noto-fonts-cjk-sans
(nerdfonts.override {
# Nerdfont Icons override
fonts = [
"JetBrainsMono"
];
})
];
environment = {
variables = {
# Environment Variables
TERMINAL = "${vars.terminal}";
EDITOR = "${vars.editor}";
VISUAL = "${vars.editor}";
};
systemPackages = with pkgs;
[
# System-Wide Packages
# Terminal
btop # Resource Manager
coreutils # GNU Utilities
git # Version Control
killall # Process Killer
nano # Text Editor
neovim
nix-tree # Browse Nix Store
pciutils # Manage PCI
tldr # Helper
usbutils # Manage USB
wget # Retriever
bat
lazygit
fzf
neofetch
jmtpfs # Android MTP
ipinfo
# Video/Audio
alsa-utils # Audio Control
feh # Image Viewer
mpv # Media Player
pavucontrol # Audio Control
pipewire # Audio Server/Control
pulseaudio # Audio Server/Control
jellyfin-media-player
# Apps
appimage-run # Runs AppImages on NixOS
webcord
signal-desktop
alacritty
librewolf
zathura
# File Management
unzip # Zip Files
unrar # Rar Files
zip # Zip
# Shell
fishPlugins.grc
grc
fishPlugins.fzf
fishPlugins.tide
fishPlugins.sponge
fishPlugins.colored-man-pages
fishPlugins.autopair
nix-your-shell
# Other Packages Found @
# - ./<host>/default.nix
# - ../modules
]
++ (with unstable; [
# Terminal
eza
# Apps
feishin
sddm
electron-mail
xournalpp
]);
};
programs = {
dconf.enable = true;
};
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
];
};
services = {
printing = {
# CUPS
enable = true;
};
pipewire = {
# Sound
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
};
#hardware.pulseaudio.enable = false;
nix = {
# Nix Package Manager Settings
settings = {
auto-optimise-store = true;
};
# gc = { # Garbage Collection
# automatic = true;
# dates = "weekly";
# options = "--delete-older-than 2d";
# };
package = pkgs.nixVersions.unstable; # Enable Flakes
registry.nixpkgs.flake = inputs.nixpkgs;
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true; # Allow Proprietary Software.
system = {
# NixOS Settings
stateVersion = "23.05";
};
home-manager.users.${vars.user} = {
# Home-Manager Settings
home = {
stateVersion = "23.05";
};
programs = {
home-manager.enable = true;
};
};
}