Files
lux-old/modules/workstation.nix
2026-02-28 14:18:57 +01:00

195 lines
4.6 KiB
Nix

{ den, ... }:
{
lux.workstation = {
includes = [
den.ful.lux.greeter
den.ful.lux.niri
den.ful.lux.xdg
den.ful.lux.dev
den.ful.lux.terminal
den.ful.lux.shell
den.ful.lux.noctalia
den.ful.lux.pim
# den.ful.lux.nvf
den.ful.lux.neovim
den.ful.lux.email
den.ful.lux.bitwarden
den.ful.lux.ssh
den.ful.lux.helium
];
homeManager =
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
brave
localsend
postman
wl-clipboard
spotify
gemini-cli
qbittorrent
planify
];
programs.mpv = {
enable = true;
bindings = {
D = "cycle deband";
};
config = {
profile = "high-quality";
osc = "no";
border = "no";
vo = "gpu-next";
gpu-api = "vulkan";
hwdec = "vulkan";
demuxer-mkv-subtitle-preroll = "yes";
sub-auto = "fuzzy";
sub-gauss = 1.0;
sub-gray = "yes";
tone-mapping = "bt.2446a";
keep-open = "yes";
save-position-on-quit = "yes";
volume-max = 150;
deband = "yes";
deband-iterations = 2;
deband-threshold = 64;
deband-range = 17;
deband-grain = 12;
};
scripts = with pkgs.mpvScripts; [
modernz
thumbfast
mpris
autosub
];
};
programs.ripgrep.enable = true;
programs.uv.enable = true;
home.pointerCursor = {
name = "phinger-cursors-light";
package = pkgs.phinger-cursors;
size = 32;
gtk.enable = true;
};
# Make electron use wayland
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
BROWSER = "brave";
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,
lib,
...
}:
{
# 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
];
};
# 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;
};
};
};
}