configs/workstation/configuration.nix

235 lines
5.3 KiB
Nix
Raw Normal View History

2024-11-22 12:21:50 +01:00
2024-05-20 12:24:36 +02:00
{ config, lib, pkgs, ... }:
{
imports =
2024-08-06 10:13:59 +02:00
[
2024-05-20 12:24:36 +02:00
./hardware-configuration.nix
./k8s.nix
./podman.nix
2024-07-02 15:02:33 +02:00
./tty.nix
./aliases.nix
./zsh.nix
2024-08-06 10:13:59 +02:00
./incus.nix
./libvirt.nix
2024-11-14 09:34:10 +01:00
./plymouth.nix
2024-05-20 12:24:36 +02:00
];
# Kernel
2024-10-25 08:43:31 +02:00
# boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
2024-08-29 14:23:46 +02:00
# Insecure
2024-11-13 12:57:27 +01:00
#nixpkgs.config.permittedInsecurePackages = [
# "electron-29.4.6"
#];
2024-05-20 12:24:36 +02:00
# 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";
};
2024-08-06 10:20:32 +02:00
2024-05-20 12:24:36 +02:00
# firmaware
services.fwupd.enable = true;
2024-11-15 14:27:33 +01:00
hardware.enableRedistributableFirmware = true;
2024-08-06 10:20:32 +02:00
2024-05-20 12:24:36 +02:00
# Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
2024-08-06 10:20:32 +02:00
2024-05-20 12:24:36 +02:00
# enable unfree
nixpkgs.config.allowUnfree = true;
2024-08-06 10:20:32 +02:00
2024-05-20 12:24:36 +02:00
# Network
2024-08-06 10:20:32 +02:00
networking.nftables.enable = true;
2024-05-22 09:42:47 +02:00
networking.hostName = "work";
2024-05-20 12:24:36 +02:00
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";
};
};
};
2024-10-25 08:52:07 +02:00
# Gnome
2024-10-25 09:08:34 +02:00
services.xserver.desktopManager.gnome.enable = true;
services.flatpak.enable = true;
2024-07-04 10:53:25 +02:00
# Emacs
2024-07-04 10:53:25 +02:00
services.emacs.enable = true;
2024-06-19 16:17:22 +02:00
2024-08-19 10:00:55 +02:00
# Enable flakes and other experimental features
nix = {
extraOptions = "experimental-features = nix-command flakes";
2024-10-25 08:52:07 +02:00
#package = pkgs.nixFlakes;
2024-08-19 10:00:55 +02:00
};
2024-05-20 12:24:36 +02:00
# 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
2024-10-25 08:52:07 +02:00
noto-fonts-cjk-sans
2024-05-20 12:24:36 +02:00
noto-fonts-emoji
liberation_ttf
dina-font
proggyfonts
2024-12-03 13:36:22 +01:00
# Fonts
2024-12-03 13:30:43 +01:00
nerd-fonts.meslo-lg
nerd-fonts.jetbrains-mono
2024-12-03 13:36:22 +01:00
nerd-fonts.fira-code
2024-12-03 13:30:43 +01:00
nerd-fonts.droid-sans-mono
nerd-fonts.zed-mono
nerd-fonts.iosevka
nerd-fonts.iosevka-term
];
2024-05-20 12:24:36 +02:00
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
2024-08-12 11:59:45 +02:00
hardware.pulseaudio.enable = false;
2024-05-20 12:24:36 +02:00
2024-06-11 09:35:50 +02:00
programs.steam.enable = true;
programs.zsh.enable = true;
2024-07-28 15:21:54 +02:00
services.teamviewer.enable = true;
2024-05-20 12:24:36 +02:00
users.users.geir = {
isNormalUser = true;
2024-08-06 10:16:43 +02:00
extraGroups = [ "networkmanager" "wheel" "libvirt" ];
2024-06-11 09:27:36 +02:00
shell = pkgs.zsh;
2024-05-20 12:24:36 +02:00
packages = with pkgs; [
2024-12-02 08:08:51 +01:00
firefox ncpamixer starship fastfetch hyfetch nerdfetch
emacsPackages.vterm virt-manager
2024-11-13 12:57:27 +01:00
chromium pavucontrol gnome-tweaks beauty-line-icon-theme
2024-11-15 12:59:26 +01:00
neo-cowsay fortune lolcat
2024-11-22 12:32:26 +01:00
zellij zsh godot_4 gimp-with-plugins obs-studio
2024-12-03 13:30:43 +01:00
vesktop
2024-05-20 12:24:36 +02:00
];
2024-12-03 13:30:43 +01:00
};
2024-12-03 14:06:48 +01:00
# Allow insexure dotnet 7
nixpkgs.config.permittedInsecurePackages = [
"dotnet-sdk-7.0.120"
"dotnet-core-combined"
"dotnet-runtime-6.0.36"
"dotnet-sdk-wrapped-7.0.120"
];
2024-11-13 12:57:27 +01:00
2024-12-03 13:36:22 +01:00
2024-11-13 12:57:27 +01:00
# 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
];
2024-05-20 12:24:36 +02:00
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
kitty terminator
2024-05-20 12:24:36 +02:00
dbus
greetd.tuigreet
wayland
xdg-utils
2024-08-19 09:52:46 +02:00
nix-direnv
2024-09-16 08:48:41 +02:00
du-dust fd bat
2024-08-13 13:07:34 +02:00
# Sway
2024-05-20 12:24:36 +02:00
swaylock swayidle swaybg waybar fuzzel gammastep mako
2024-10-25 08:52:07 +02:00
neovim emacs
glances inxi htop bottom
2024-05-20 12:24:36 +02:00
wget curl
git
2024-07-02 15:02:33 +02:00
mc eza du-dust ripgrep
nix-direnv
2024-07-02 15:02:33 +02:00
# Languages
zig
python3 python3Packages.pip
guile
go gotools golint
rustup
2024-08-13 13:07:34 +02:00
nodejs
2024-12-03 13:30:43 +01:00
dotnet-sdk
dotnet-runtime
2024-12-03 13:51:59 +01:00
avalonia
2024-07-02 15:02:33 +02:00
# language servers
2024-11-19 15:00:52 +01:00
csharp-ls
2024-07-02 15:02:33 +02:00
zls
python3Packages.python-lsp-server
gopls
luajitPackages.lua-lsp
nodePackages.bash-language-server
vimPlugins.cmp-nvim-lsp
ccls
gdb
2024-07-02 15:08:34 +02:00
marksman
2024-08-10 11:20:12 +02:00
# Editor
vscode
2024-11-13 12:57:27 +01:00
2024-07-02 15:02:33 +02:00
];
2024-05-20 12:24:36 +02:00
2024-08-18 15:40:05 +02:00
# Enable the OpenSSH daemon.
2024-05-20 12:24:36 +02:00
services.openssh.enable = true;
# zfs options
services.zfs.autoScrub.enable = true;
services.zfs.trim.enable = true;
# Open ports in the firewall.
2024-08-06 10:20:32 +02:00
2024-05-20 12:24:36 +02:00
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?
}