218 lines
5 KiB
Nix
218 lines
5 KiB
Nix
# Edit this configuration file to define what should be installed on
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[
|
|
./hardware-configuration.nix
|
|
./k8s.nix
|
|
./podman.nix
|
|
./tty.nix
|
|
./aliases.nix
|
|
./zsh.nix
|
|
./incus.nix
|
|
./libvirt.nix
|
|
./plymouth.nix
|
|
];
|
|
|
|
# Kernel
|
|
# boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
# Insecure
|
|
#nixpkgs.config.permittedInsecurePackages = [
|
|
# "electron-29.4.6"
|
|
#];
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.grub = {
|
|
enable = true;
|
|
zfsSupport = true;
|
|
efiSupport = true;
|
|
efiInstallAsRemovable = true;
|
|
mirroredBoots = [
|
|
{ devices = [ "nodev"]; path = "/boot"; }
|
|
];
|
|
};
|
|
zramSwap = {
|
|
enable = true;
|
|
algorithm = "zstd";
|
|
};
|
|
|
|
# firmaware
|
|
services.fwupd.enable = true;
|
|
|
|
# Bluetooth
|
|
hardware.bluetooth.enable = true;
|
|
hardware.bluetooth.powerOnBoot = true;
|
|
#services.blueman.enable = true;
|
|
|
|
# enable unfree
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# Network
|
|
networking.nftables.enable = true;
|
|
networking.hostName = "work";
|
|
services.tailscale.enable = true;
|
|
networking.networkmanager.enable = true;
|
|
networking.hostId = "8425e349";
|
|
# Set your time zone.
|
|
time.timeZone = "Europe/Oslo";
|
|
|
|
|
|
# Select internationalisation properties.
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
console = {
|
|
font = "Lat2-Terminus16";
|
|
keyMap = "no";
|
|
};
|
|
|
|
# TuiGreet
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
|
|
user = "geir";
|
|
};
|
|
};
|
|
};
|
|
|
|
# Gnome
|
|
services.xserver.desktopManager.gnome.enable = true;
|
|
|
|
services.flatpak.enable = true;
|
|
|
|
# Emacs
|
|
services.emacs.enable = true;
|
|
|
|
# Enable flakes and other experimental features
|
|
nix = {
|
|
extraOptions = "experimental-features = nix-command flakes";
|
|
#package = pkgs.nixFlakes;
|
|
};
|
|
|
|
# Sway
|
|
programs.sway = {
|
|
enable = true;
|
|
wrapperFeatures.gtk = true;
|
|
};
|
|
services.dbus.enable = true;
|
|
xdg.portal = {
|
|
enable = true;
|
|
wlr.enable = true;
|
|
# gtk portal needed to make gtk apps happy
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
};
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
services.xserver.xkb.layout = "no";
|
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
fonts.packages = with pkgs; [
|
|
noto-fonts
|
|
noto-fonts-cjk-sans
|
|
noto-fonts-emoji
|
|
liberation_ttf
|
|
dina-font
|
|
proggyfonts
|
|
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
|
];
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
pulse.enable = true;
|
|
};
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
programs.steam.enable = true;
|
|
programs.zsh.enable = true;
|
|
services.teamviewer.enable = true;
|
|
|
|
users.users.geir = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "networkmanager" "wheel" "libvirt" ];
|
|
shell = pkgs.zsh;
|
|
packages = with pkgs; [
|
|
firefox ncpamixer starship fastfetch
|
|
emacsPackages.vterm virt-manager
|
|
chromium pavucontrol gnome-tweaks beauty-line-icon-theme
|
|
];
|
|
};
|
|
|
|
# ld
|
|
programs.nix-ld.enable = true;
|
|
programs.nix-ld.libraries = with pkgs; [
|
|
# Add any missing dynamic libraries for unpackaged programs
|
|
# here, NOT in environment.systemPackages
|
|
];
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
# $ nix search wget
|
|
environment.systemPackages = with pkgs; [
|
|
kitty terminator
|
|
dbus
|
|
greetd.tuigreet
|
|
wayland
|
|
xdg-utils
|
|
nix-direnv
|
|
du-dust fd bat
|
|
# Sway
|
|
swaylock swayidle swaybg waybar fuzzel gammastep mako
|
|
neovim emacs
|
|
glances inxi htop bottom
|
|
wget curl
|
|
git
|
|
mc eza du-dust ripgrep
|
|
nix-direnv
|
|
distrobox
|
|
|
|
|
|
# Languages
|
|
zig
|
|
python3 python3Packages.pip
|
|
guile
|
|
go gotools golint
|
|
rustup
|
|
nodejs
|
|
# language servers
|
|
zls
|
|
python3Packages.python-lsp-server
|
|
gopls
|
|
luajitPackages.lua-lsp
|
|
nodePackages.bash-language-server
|
|
vimPlugins.cmp-nvim-lsp
|
|
ccls
|
|
gdb
|
|
marksman
|
|
# Editor
|
|
vscode
|
|
|
|
];
|
|
|
|
# Enable the OpenSSH daemon.
|
|
services.openssh.enable = true;
|
|
|
|
# zfs options
|
|
services.zfs.autoScrub.enable = true;
|
|
services.zfs.trim.enable = true;
|
|
|
|
# Open ports in the firewall.
|
|
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
networking.firewall.allowedUDPPorts = [ 22 ];
|
|
networking.firewall.enable = true;
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
# accidentally delete configuration.nix.
|
|
# system.copySystemConfiguration = true;
|
|
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
}
|
|
|