Files
lux-old/modules/profiles/workstation.nix
2026-03-04 09:17:35 +01:00

193 lines
4.4 KiB
Nix

{
lux,
den,
inputs,
...
}:
{
lux.workstation = den.lib.parametric {
includes = with lux; [
region-nl
greeter
niri
vicinae
xdg
theme
# GUI Applications & Dev Tools
bitwarden
email
dev
noctalia
pim
mpv
podman
gemini
];
homeManager =
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
brave
vivaldi
localsend
postman
wl-clipboard
spotify
qbittorrent
calcure
planify
(pkgs.writeShellApplication {
name = "ns";
runtimeInputs = [
fzf
nix-search-tv
];
text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh";
})
];
programs.imv.enable = true;
programs.sioyek.enable = true;
programs.television = {
enable = true;
enableZshIntegration = true;
};
programs.nix-search-tv = {
enable = true;
enableTelevisionIntegration = true;
};
programs.ripgrep.enable = true;
programs.uv.enable = true;
home.pointerCursor = {
name = "phinger-cursors-light";
package = pkgs.phinger-cursors;
size = 24;
gtk.enable = true;
};
# Make electron use wayland
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
BROWSER = "vivaldi";
EDITOR = "nvim";
VISUAL = "nvim";
CARGO_HOME = "${config.xdg.dataHome}/cargo";
STARSHIP_CACHE = "${config.xdg.cacheHome}/starship";
GEMINI_CONFIG_DIR = "${config.xdg.configHome}/gemini";
};
services.cliphist.enable = true;
services.wl-clip-persist.enable = true;
};
nixos =
{
config,
pkgs,
...
}:
{
# More modern version of dbus
services.dbus.implementation = "broker";
programs.nix-ld.enable = true;
environment.localBinInPath = true;
# For localsend
networking.firewall.allowedTCPPorts = [ 53317 ];
# Audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
# Bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# Fonts
fonts = {
enableDefaultPackages = false;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
iosevka
jetbrains-mono
fira-code
# Fonts for typst tasteful pairings
roboto
fira
merriweather
ibm-plex
lexend
literata
montserrat
source-sans-pro
source-serif-pro
];
};
# Printing
services.printing = {
enable = true;
drivers = with pkgs; [
cups-filters
cups-browsed
cnijfilter2
];
};
# Bootloader
boot = {
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
consoleMode = "auto";
configurationLimit = 5;
# Convert boot entry to a more readable name
extraInstallCommands = ''
ENTRIES="${config.boot.loader.efi.efiSysMountPoint}/loader/entries"
PROFILES="/nix/var/nix/profiles"
for file in "$ENTRIES"/nixos-generation-*.conf; do
generation=$(${pkgs.coreutils}/bin/basename "$file" | ${pkgs.gnugrep}/bin/grep -o -E '[0-9]+')
timestamp=$(${pkgs.coreutils}/bin/stat -c %y "$PROFILES/system-$generation-link" 2>/dev/null | ${pkgs.coreutils}/bin/cut -d. -f1)
if [ -z "$timestamp" ]; then
timestamp="Unknown Date"
fi
${pkgs.gnused}/bin/sed -i "s/^version .*/version Generation $generation - $timestamp/" "$file"
done
'';
};
};
tmp.cleanOnBoot = true;
kernelPackages = pkgs.linuxPackages_latest;
};
};
};
}