clean the shit

This commit is contained in:
Zastian Pretorius
2025-09-07 14:47:56 +01:00
parent 59cb67267c
commit 3839a0e292
10 changed files with 874 additions and 907 deletions

View File

@@ -1,6 +1,5 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
# your system. Help is available in configuration.nix(5) and via `nixos-help`.
{
config,
@@ -14,11 +13,18 @@
let
oreo = pkgs.callPackage ./personalPKGS/oreo.nix { };
in
# Window manager toggles
wmAll = window_manager == "all";
useRiver = window_manager == "river" || wmAll;
useNiri = window_manager == "niri" || wmAll;
useHypr = window_manager == "hyprland" || wmAll;
in
{
##############################################################################
# Imports
##############################################################################
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./system/hardware.nix
./system/boot.nix
@@ -30,195 +36,169 @@ in
inputs.home-manager.nixosModules.home-manager
inputs.niri.nixosModules.niri
];
# niri settings
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
build-dir = "/var/tmp";
auto-optimise-store = true;
};
##############################################################################
# Nix settings
##############################################################################
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
build-dir = "/var/tmp";
auto-optimise-store = true;
};
# Set your time zone.
#time.timeZone = "Europe/Dublin";
#programs.river.enable = true;
#programs.niri.enable = true;
#programs.niri.package = pkgs.niri-stable;
#nixpkgs.overlays = [ inputs.niri.overlays.niri ];
#programs.hyprland.enable = true;
programs.river.enable = window_manager == "river" || window_manager == "all";
qt.enable = true;
#qt.style = "gtk2";
qt.platformTheme = "qt5ct";
##############################################################################
# Desktop / WM
##############################################################################
programs.river.enable = useRiver;
qt = {
enable = true;
# style = "gtk2";
platformTheme = "qt5ct";
};
xdg.menus.enable = true;
#shitty dolphin shit coz fuck that is why
environment.etc."/xdg/menus/applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
# Work around Dolphin menu oddities: force Plasma menu definition
environment.etc."/xdg/menus/applications.menu".text =
builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
# Niri (via overlay)
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs.niri = {
enable = window_manager == "niri" || window_manager == "all";
enable = useNiri;
package = pkgs.niri-stable; # Only needed if not provided by the overlay
};
programs.hyprland.enable = window_manager == "hyprland" || window_manager == "all";
# Configure keymap in X11
# Hyprland
programs.hyprland.enable = useHypr;
# X11 base (kept enabled for keymap + DM if needed)
services.xserver = {
enable = true;
xkb = {
layout = "ie";
variant = "";
};
enable = true;
#displayManager.lightdm = {
# enable = true;
# greeters.gtk = {
# enable = true;
# theme.package = pkgs.amarena-theme;
# theme.name = "amarena";
# cursorTheme.package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; };
# cursorTheme.name = "oreo_spark_pink_cursors";
# extraConfig = "background=${./assets/Wallpapers/138.png}";
# };
#};
# displayManager.lightdm = {
# enable = true;
# greeters.gtk = {
# enable = true;
# theme.package = pkgs.amarena-theme;
# theme.name = "amarena";
# cursorTheme.package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; };
# cursorTheme.name = "oreo_spark_pink_cursors";
# extraConfig = "background=${./assets/Wallpapers/138.png}";
# };
# };
};
# greetd + tuigreet
services.greetd = {
enable = true;
restart = true;
settings = {
default_session = {
command = "${lib.getExe pkgs.greetd.tuigreet} --window-padding 1 --time --time-format '%R - %F' --remember --remember-session --asterisks";
user = "greeter";
};
useTextGreeter = true;
settings.default_session = {
command = "${lib.getExe pkgs.tuigreet} --window-padding 1 --time --time-format '%R - %F' --remember --remember-session --asterisks";
user = "greeter";
};
};
security.rtkit.enable = true;
security.polkit = {
enable = true;
#package = pkgs.polkit_gnome;
##############################################################################
# Security / PolicyKit / PAM
##############################################################################
security = {
rtkit.enable = true;
polkit.enable = true;
pam.services = {
swaylock = { };
greetd.enableGnomeKeyring = true;
greetd.kwallet.enable = true;
};
};
environment.sessionVariables = {
ZDOTDIR = "$HOME/.config/zsh";
};
environment.pathsToLink = [ "/share/zsh" ];
environment.variables = {
# VAAPI and VDPAU config for accelerated video.
# See https://wiki.archlinux.org/index.php/Hardware_video_acceleration
VDPAU_DRIVER = "radeonsi";
LIBVA_DRIVER_NAME = "radeonsi";
#AMD_VULKAN_ICD = "RADV";
#VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
#XDG_CURRENT_DESKTOP = "hyprland";
#QT_QPA_PLATFORMTHEME = "qt6ct";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.mrfluffy = {
isNormalUser = true;
shell = pkgs.zsh;
createHome = true;
extraGroups = [
"wheel"
"networkmanager"
"video"
"render"
"docker"
"libvirt"
"input"
]; # Enable sudo for the user.
packages = with pkgs; [
##############################################################################
# Environment
##############################################################################
environment = {
sessionVariables = {
ZDOTDIR = "$HOME/.config/zsh";
};
pathsToLink = [ "/share/zsh" ];
variables = {
# VAAPI and VDPAU config for accelerated video.
# See https://wiki.archlinux.org/index.php/Hardware_video_acceleration
VDPAU_DRIVER = "radeonsi";
LIBVA_DRIVER_NAME = "radeonsi";
# AMD_VULKAN_ICD = "RADV";
# VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
# XDG_CURRENT_DESKTOP = "hyprland";
# QT_QPA_PLATFORMTHEME = "qt6ct";
};
systemPackages = with pkgs; [
vim
wget
neovim
];
};
users.users.work = {
isNormalUser = true;
shell = pkgs.zsh;
createHome = true;
extraGroups = [
"wheel"
"networkmanager"
"video"
"render"
"docker"
"libvirt"
"input"
]; # Enable sudo for the user.
packages = with pkgs; [
];
##############################################################################
# Users
##############################################################################
users = {
users.mrfluffy = {
isNormalUser = true;
shell = pkgs.zsh;
createHome = true;
extraGroups = [ "wheel" "networkmanager" "video" "render" "docker" "libvirt" "input" ];
packages = with pkgs; [ ];
};
users.work = {
isNormalUser = true;
shell = pkgs.zsh;
createHome = true;
extraGroups = [ "wheel" "networkmanager" "video" "render" "docker" "libvirt" "input" ];
packages = with pkgs; [ ];
};
groups.libvirtd.members = [ "mrfluffy" "work" ];
};
users.groups.libvirtd.members = [
"mrfluffy"
"work"
];
##############################################################################
# Home-Manager
##############################################################################
home-manager = {
# also pass inputs to home-manager modules
extraSpecialArgs = {
inherit inputs window_manager systemName;
};
extraSpecialArgs = { inherit inputs window_manager systemName; };
users = {
"mrfluffy" = import ./home/mrfluffy.nix;
"work" = import ./home/work.nix;
mrfluffy = import ./home/mrfluffy.nix;
work = import ./home/work.nix;
};
};
virtualisation.docker = {
enable = true;
storageDriver = lib.mkIf (systemName == "pc") "btrfs";
};
virtualisation.libvirtd.enable = true;
# Allow unfree packages
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
];
##############################################################################
# Virtualisation
##############################################################################
virtualisation = {
docker = {
enable = true;
storageDriver = lib.mkIf (systemName == "pc") "btrfs";
};
libvirtd.enable = true;
};
security.pam.services.swaylock = { };
security.pam.services.greetd.enableGnomeKeyring = true;
security.pam.services.greetd.kwallet.enable = true;
##############################################################################
# Nixpkgs policy
##############################################################################
nixpkgs.config = {
allowUnfree = true;
permittedInsecurePackages = [ ];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
neovim
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
#services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
##############################################################################
# State version
##############################################################################
system.stateVersion = "24.11"; # Did you read the comment?
}

View File

@@ -6,259 +6,278 @@
...
}:
let
# hyprlock = pkgs.callPackage ../../universal/personalPKGS/hyprlock.nix {};
# hypridle = pkgs.callPackage ../../universal/personalPKGS/hypridle.nix {};
defaultProfile = {
id = 0;
name = "default";
isDefault = true;
};
anyrunPlugins = with pkgs.anyrun; [
"${pkgs.anyrun}/lib/libapplications.so"
"${pkgs.anyrun}/lib/libdictionary.so"
"${pkgs.anyrun}/lib/libsymbols.so"
"${pkgs.anyrun}/lib/librink.so"
"${pkgs.anyrun}/lib/libtranslate.so"
"${pkgs.anyrun}/lib/libwebsearch.so"
];
in
#hyprlock = pkgs.callPackage ../../universal/personalPKGS/hyprlock.nix {};
#hypridle = pkgs.callPackage ../../universal/personalPKGS/hypridle.nix {};
{
imports = [
inputs.zen-browser.homeModules.beta
];
programs.zen-browser = {
enable = true;
profiles.default = {
id = 0;
name = "default";
isDefault = true;
};
};
programs.firefox = {
enable = true;
profiles.default = {
id = 0;
name = "default";
isDefault = true;
};
};
programs.nix-index.enable = true;
programs.lazygit.enable = true;
programs = {
zen-browser = {
enable = true;
profiles.default = defaultProfile;
};
firefox = {
enable = true;
profiles.default = defaultProfile;
};
nix-index.enable = true;
lazygit.enable = true;
vscode = {
enable = true;
profiles.default.extensions = [
pkgs.vscode-extensions.platformio.platformio-vscode-ide
];
};
anyrun = {
enable = true;
config = {
plugins = anyrunPlugins;
x.fraction = 0.5;
y.fraction = 0.3;
width.fraction = 0.3;
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
.some_class
enable = true;{
background: red;
}
'';
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "",
engines: [Google]
)
'';
extraConfigFiles."dictionary.ron".text = ''
Config(
prefix: "",
max_entries: 5,
)
'';
extraConfigFiles."rink.ron".text = ''
Config(
prefix: "",
max_entries: 5,
)
'';
extraConfigFiles."translate.ron".text = ''
Config(
prefix: ":",
language_delimiter: ">",
max_entries: 3,
)
'';
extraConfigFiles."symbols.ron".text = ''
Config (
prefix: "",
// Custom user defined symbols to be included along the unicode symbols
symbols: {
// "name": "text to be copied"
"shrug": "¯\\_()_/¯",
},
max_entries: 3,
)
'';
};
};
qt.enable = true;
#qt.style = "gtk2";
#qt.platformTheme = "qt5ct";
#imports = [ inputs.anyrun.homeManagerModules.default ];
# qt.style = "gtk2";
# qt.platformTheme = "qt5ct";
# imports = [ inputs.anyrun.homeManagerModules.default ];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01"
"qtwebengine-5.15.19"
];
programs.vscode = {
enable = true;
profiles = {
default = {
extensions = [
pkgs.vscode-extensions.platformio.platformio-vscode-ide
];
};
};
};
programs.anyrun = {
enable = true;
nixpkgs = {
config = {
plugins = [
# An array of all the plugins you want, which either can be paths to the .so files, or their packages
"${pkgs.anyrun}/lib/libapplications.so"
"${pkgs.anyrun}/lib/libdictionary.so"
"${pkgs.anyrun}/lib/libsymbols.so"
"${pkgs.anyrun}/lib/librink.so"
"${pkgs.anyrun}/lib/libtranslate.so"
"${pkgs.anyrun}/lib/libwebsearch.so"
allowUnfree = true;
permittedInsecurePackages = [
"freeimage-unstable-2021-11-01"
"qtwebengine-5.15.19"
];
x = {
fraction = 0.5;
};
y = {
fraction = 0.3;
};
width = {
fraction = 0.3;
};
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
.some_class
enable = true;{
background: red;
}
'';
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "",
// Options: Google, Ecosia, Bing, DuckDuckGo, Custom
//
// Custom engines can be defined as such:
// Custom(
// name: "Searx",
// url: "searx.be/?q={}",
// )
//
// NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
engines: [Google]
)
'';
extraConfigFiles."dictionary.ron".text = ''
Config(
prefix: "",
max_entries: 5,
)
'';
extraConfigFiles."rink.ron".text = ''
Config(
prefix: "",
max_entries: 5,
)
'';
extraConfigFiles."translate.ron".text = ''
Config(
prefix: ":",
language_delimiter: ">",
max_entries: 3,
)
'';
extraConfigFiles."symbols.ron".text = ''
Config (
// The prefix that the search needs to begin with to yield symbol results
prefix: "",
// Custom user defined symbols to be included along the unicode symbols
symbols: {
// "name": "text to be copied"
"shrug": "¯\\_()_/¯",
},
max_entries: 3,
)
'';
};
services.kdeconnect.enable = true;
# programs.obs-studio = {
# enable = true;
# plugins = with pkgs.obs-studio-plugins; [
# wlrobs
# obs-backgroundremoval
# obs-pipewire-audio-capture
# ];
# };
#
home.packages = with pkgs; [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
############################
# Shells & Terminals
############################
alacritty
zsh
zoom-us
rink
firefox
btop
libreoffice-fresh
rustup
rustc
macchina
hyprpaper
#xwaylandvideobridge
############################
# CLI Shit
############################
atuin
############################
# System Utilities
############################
app2unit
brightnessctl
ddcutil
duf
grim
slurp
swappy
heroic
gamemode
goverlay
libnotify
lm_sensors
macchina
rm-improved
nodejs_20
playerctl
pamixer
openai-whisper
libreoffice
zathura
imv
libsixel
prismlauncher
godot_4
wf-recorder
#jellyfin-media-player
xarchiver
xdg-user-dirs
############################
# Monitoring & TUI Apps
############################
btop
cava
############################
# Wayland / Desktop Tools
############################
grim
hyprpaper
hyprpicker
mangohud
#discord
mpv
rofi
xdg-user-dirs
xarchiver
atuin
blender-hip
wineWowPackages.stable
gdb
slurp
swappy
wf-recorder
############################
# Audio / Media Tools
############################
openai-whisper
pamixer
playerctl
alsa-utils
############################
# Browsers & Web
############################
brave
firefox
zoom-us
############################
# Communication & Sharing
############################
element-desktop
localsend
slack
thunderbird
############################
# Documents & Viewers
############################
libreoffice
libreoffice-fresh
zathura
############################
# Media Players & Imaging
############################
imv
mpv
upscaler
youtube-music
libsixel
############################
# Development Toolchains
############################
gdb
nodejs_20
platformio
rustc
rustup
zed-editor
dualsensectl
mangayomi
scrcpy
# Language tooling from inputs
inputs.qs-qml.packages.${pkgs.system}.qml-ts-mode
inputs.qs-qml.packages.${pkgs.system}.tree-sitter-qmljs
############################
# Game Dev / Engines
############################
blender-hip
godot_4
############################
# Emulation
############################
fuse
fuse-emulator
fuse3
alacritty
#inputs.way-inhibitor.packages.${pkgs.system}.default
#inputs.zen-browser.packages.${pkgs.system}.twilight
#inputs.quickshell.packages.${pkgs.system}.default
inputs.qs-qml.packages.${pkgs.system}.tree-sitter-qmljs
inputs.qs-qml.packages.${pkgs.system}.qml-ts-mode
protonup-qt
ddcutil
brightnessctl
app2unit
cava
lm_sensors
thunderbird
libnotify
localsend
############################
# Android Tools
############################
android-tools
#grayjay
youtube-music
inputs.caelestia.packages.${pkgs.system}.caelestia-shell
inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli
kdePackages.dolphin
kdePackages.kio
kdePackages.kio-extras
#kdePackages.breeze-icons
#kdePackages.dolphin-plugins
kdePackages.kdesdk-thumbnailers # new
kdePackages.kdegraphics-thumbnailers # new
kdePackages.kdegraphics-mobipocket # new
kdePackages.kimageformats # new
#kdePackages.calligra # new
#kdePackages.qtimageformats # new
kdePackages.ffmpegthumbs # new
#kdePackages.taglib # new
scrcpy
############################
# Gaming & Launchers
############################
dualsensectl
gamemode
goverlay
heroic
prismlauncher
protonup-qt
wineWowPackages.stable
mangayomi
rink
############################
# KDE / File Management
############################
kdePackages.baloo # new
kdePackages.baloo-widgets # new
#kdePackages.kde-cli-tools
#resvg # new
#
#platformio
platformio
element-desktop
kdePackages.dolphin
kdePackages.ffmpegthumbs # new
kdePackages.kdegraphics-mobipocket # new
kdePackages.kdegraphics-thumbnailers # new
kdePackages.kdesdk-thumbnailers # new
kdePackages.kimageformats # new
kdePackages.kio
kdePackages.kio-extras
# kdePackages.breeze-icons
# kdePackages.dolphin-plugins
# kdePackages.kde-cli-tools
# resvg # new
upscaler
############################
# Blockchain (inputs)
############################
inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli
inputs.caelestia.packages.${pkgs.system}.caelestia-shell
];
}

View File

@@ -10,118 +10,96 @@ let
in
{
imports = [
# Core theming & integrations
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
#inputs.niri.homeModules.niri
# inputs.niri.homeModules.niri
# Local modules
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/waybar.nix
../dots/zsh.nix
../dots/nixcord.nix
../dots/hyprlock.nix
./stylix.nix
./homePkgs.nix
./services.nix
../dots/xdg.nix
../dots/river.nix
../dots/niri.nix
../dots/hyprland.nix
../dots/hyprpaper.nix
];
# you can go look here for a list of color schemes https://github.com/tinted-theming/schemes
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.hardcore;
stylix.base16Scheme.base00 = "141414";
# Home Manager needs a bit of information about you and the paths it should
# manage.
# Home Manager needs a bit of information about you and the paths it should manage.
home.username = "mrfluffy";
home.homeDirectory = "/home/mrfluffy";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
# This determines compatibility with a specific Home Manager release.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
#gtk = {
# enable = true;
# iconTheme = {
# name = "Dracula";
# # package = pkgs.dracula-icon-theme;
# };
#};
# Example GTK block (disabled)
# gtk = {
# enable = true;
# iconTheme = {
# name = "Dracula";
# # package = pkgs.dracula-icon-theme;
# };
# };
home.packages = with pkgs; [
swaybg
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
#inputs.ladybird.packages."${pkgs.system}".ladybird
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
############################
# Experimental (inputs)
############################
# inputs.ladybird.packages."${pkgs.system}".ladybird
# ##########################
# Examples (disabled)
# ##########################
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
# Dotfiles & static files managed by Home Manager
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
#
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
#".config/quickshell".source = ../dots/shell;
#".config/kitty".source = ../../universal/dots/kitty;
#".config/nvim".source = ../../universal/dots/nvim;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
#
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

View File

@@ -7,74 +7,69 @@
let
inherit (config.colorScheme) palette;
oreo = pkgs.callPackage ../personalPKGS/oreo.nix { };
openSans = {
package = pkgs.open-sans;
name = "Open Sans";
};
in
{
stylix = {
enable = true;
autoEnable = false;
targets.font-packages.enable = true;
#targets.fontconfig.enable = true;
targets.gtk = {
enable = true;
flatpakSupport.enable = true;
};
#targets.kde.enable = true;
targets.qt.enable = true;
targets.vscode.enable = true;
targets.lazygit.enable = true;
targets.foot.enable = true;
targets.river.enable = true;
targets.hyprland.enable = true;
targets.waybar.enable = true;
targets.nixcord.enable = true;
targets.zen-browser = {
enable = true;
profileNames = [ "default" ];
};
targets.firefox = {
enable = true;
profileNames = [ "default" ];
targets = {
font-packages.enable = true;
# fontconfig.enable = true;
gtk = {
enable = true;
flatpakSupport.enable = true;
};
# kde.enable = true;
qt.enable = true;
vscode.enable = true;
lazygit.enable = true;
foot.enable = true;
river.enable = true;
hyprland.enable = true;
waybar.enable = true;
nixcord.enable = true;
zen-browser = {
enable = true;
profileNames = [ "default" ];
};
firefox = {
enable = true;
profileNames = [ "default" ];
};
};
iconTheme = {
enable = true;
package = lib.mkForce (pkgs.reversal-icon-theme.override {allColorVariants = true;});
package = lib.mkForce (pkgs.reversal-icon-theme.override { allColorVariants = true; });
light = "Reversal-black";
dark = "Reversal-black-dark";
dark = "Reversal-black-dark";
};
polarity = "dark";
image = ../assets/Wallpapers/001.jpg;
base16Scheme = {
base00 = "${palette.base00}";
base01 = "${palette.base01}";
base02 = "${palette.base02}";
base03 = "${palette.base03}";
base04 = "${palette.base04}";
base05 = "${palette.base05}";
base06 = "${palette.base06}";
base07 = "${palette.base07}";
base08 = "${palette.base08}";
base09 = "${palette.base09}";
base0A = "${palette.base0A}";
base0B = "${palette.base0B}";
base0C = "${palette.base0C}";
base0D = "${palette.base0D}";
base0E = "${palette.base0E}";
base0F = "${palette.base0F}";
inherit (palette)
base00 base01 base02 base03 base04 base05 base06 base07
base08 base09 base0A base0B base0C base0D base0E base0F;
};
fonts = {
serif = {
package = pkgs.open-sans;
name = "Open Sans";
};
sansSerif = {
package = pkgs.open-sans;
name = "Open Sans";
};
#monospace = {
# package = pkgs.dejavu_fonts;
# name = "DejaVu Sans Mono";
#};
serif = openSans;
sansSerif = openSans;
# monospace = {
# package = pkgs.dejavu_fonts;
# name = "DejaVu Sans Mono";
# };
monospace = {
package = pkgs.iosevka-comfy.comfy;
name = "Iosevka Comfy";
@@ -85,11 +80,12 @@ in
};
sizes = {
applications = 12;
desktop = 12;
popups = 14;
terminal = 16;
desktop = 12;
popups = 14;
terminal = 16;
};
};
cursor = {
package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; };
name = "oreo_spark_pink_cursors";

View File

@@ -10,19 +10,24 @@ let
in
{
imports = [
# Core theming & apps
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
#inputs.niri.homeModules.niri
# inputs.niri.homeModules.niri
# Local modules
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/waybar.nix
../dots/zsh.nix
../dots/nixcord.nix
../dots/hyprlock.nix
./stylix.nix
./homePkgs.nix
./services.nix
../dots/xdg.nix
../dots/river.nix
../dots/niri.nix
@@ -30,99 +35,71 @@ in
../dots/hyprpaper.nix
];
# you can go look here for a list of color schemes https://github.com/tinted-theming/schemes
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.hardcore;
stylix.base16Scheme.base00 = "141414";
# Home Manager needs a bit of information about you and the paths it should
# manage.
# Home Manager user information
home.username = "work";
home.homeDirectory = "/home/work";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
# This determines compatibility with a specific Home Manager release.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
#gtk = {
# enable = true;
# iconTheme = {
# name = "Dracula";
# # package = pkgs.dracula-icon-theme;
# };
#};
# Example GTK block (disabled)
# gtk = {
# enable = true;
# iconTheme = {
# name = "Dracula";
# # package = pkgs.dracula-icon-theme;
# };
# };
home.packages = with pkgs; [
swaybg
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
############################
# Browsers
############################
brave
#swaynotificationcenter
#inputs.ladybird.packages."${pkgs.system}".ladybird
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# swaynotificationcenter
# inputs.ladybird.packages."${pkgs.system}".ladybird
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
# Dotfiles & static files managed by Home Manager
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
#
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
#".config/quickshell".source = ../dots/shell;
#".config/kitty".source = ../../universal/dots/kitty;
#".config/nvim".source = ../../universal/dots/nvim;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
#
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

View File

@@ -6,51 +6,52 @@
...
}:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
initrdBaseModules = [ "btusb" ];
initrdLPModules = [ "kvm" ]; # for laptop & pc
kernelBaseModules = [ "v4l2loopback" ];
kernelBaseParams = [ ];
kernelLPParams = [ "ipv6e=1" ]; # for laptop & pc
kernelLaptopOnly = [ "i915.force_probe=46a6" ];
kernelPcOnly = [ "video=2560x1440x32" ];
in
{
# Use the systemd-boot EFI boot loader.
boot = {
loader = {
systemd-boot = {
enable = true;
};
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.kernelModules = lib.mkMerge [
[
"btusb"
]
(lib.mkIf (systemName == "laptop") [
"kvm"
])
(lib.mkIf (systemName == "pc") [
"kvm"
])
initrdBaseModules
(lib.mkIf (isLaptop || isPc) initrdLPModules)
];
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "v4l2loopback" ];
extraModulePackages = [
kernelModules = kernelBaseModules;
extraModulePackages = [
pkgs.linuxPackages_latest.v4l2loopback
];
kernelParams = lib.mkMerge [
(lib.mkIf (systemName == "laptop") [
"ipv6e=1"
"i915.force_probe=46a6"
])
(lib.mkIf (systemName == "pc") [
"video=2560x1440x32"
"ipv6e=1"
])
(lib.mkIf (isLaptop || isPc) kernelLPParams)
(lib.mkIf isLaptop kernelLaptopOnly)
(lib.mkIf isPc kernelPcOnly)
];
extraModprobeConfig = ''
options v4l2loopback devices=2 video_nr=1,0 card_label="OBS Cam","phone cam" exclusive_caps=1,1
'';
plymouth = {
enable = false;
themePackages = [
pkgs.plymouth-matrix-theme
];
themePackages = [ pkgs.plymouth-matrix-theme ];
theme = "matrix";
};
};

View File

@@ -6,9 +6,18 @@
...
}:
let
# Shared VA-API / VDPAU bits across both machines
commonVA = with pkgs; [
libva
vaapiVdpau
libvdpau-va-gl
];
in
{
# hardware stuff
# ── Graphics ─────────────────────────────────────────────────────────────────
hardware.graphics = lib.mkMerge [
# Laptop: Intel stack
(lib.mkIf (systemName == "laptop") {
enable = true;
enable32Bit = true;
@@ -16,11 +25,10 @@
intel-media-driver
intel-vaapi-driver
vpl-gpu-rt
libva
vaapiVdpau
libvdpau-va-gl
];
] ++ commonVA;
})
# PC: AMD/ROCm stack
(lib.mkIf (systemName == "pc") {
enable = true;
enable32Bit = true;
@@ -36,35 +44,34 @@
rocmPackages.rocsolver
rocmPackages.rocm-comgr
rocmPackages.rocsparse
libva
vaapiVdpau
libvdpau-va-gl
#amdvlk
#driversi686Linux.amdvlk
#mesa
#driversi686Linux.mesa
];
# amdvlk
# driversi686Linux.amdvlk
# mesa
# driversi686Linux.mesa
] ++ commonVA;
})
];
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
# hardware.pulseaudio = {
# package = pkgs.pulseaudioFull;
# };
hardware.bluetooth.settings = {
General = {
# ── Bluetooth ────────────────────────────────────────────────────────────────
hardware.bluetooth = {
enable = true; # Enable Bluetooth support
powerOnBoot = true; # Power up controller on boot
settings.General = {
Enable = "Source,Sink,Media,Socket";
#Experimental = true;
# Experimental = true;
};
};
hardware.opentabletdriver.enable = true;
hardware.opentabletdriver.daemon.enable = true;
# Enable sound.
# sound.enable = true;
#hardware.pulseaudio = {
# enable = true;
# package = pkgs.pulseaudioFull;
#};
# ── Tablets ─────────────────────────────────────────────────────────────────
hardware.opentabletdriver = {
enable = true;
daemon.enable = true;
};
# ── Audio (disabled examples) ───────────────────────────────────────────────
# sound.enable = true;
# hardware.pulseaudio = {
# enable = true;
# package = pkgs.pulseaudioFull;
# };
}

View File

@@ -5,57 +5,57 @@
systemName,
...
}:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{
networking = {
# Define hostname based on system type
hostName = lib.mkMerge [
(lib.mkIf (systemName == "laptop") "mrfluffyLaptop")
(lib.mkIf (systemName == "pc") "mrfluffyPC")
];
networking = lib.mkMerge [
# Hostname per system type
(lib.mkIf isLaptop { hostName = "mrfluffyLaptop"; })
(lib.mkIf isPc { hostName = "mrfluffyPC"; })
# Firewall configuration
firewall = {
# Open ports in the firewall.
# allowedTCPPorts = [ ... ];
# allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
enable = false;
checkReversePath = false;
};
# Common networking config
{
# Firewall
firewall = {
# allowedTCPPorts = [ ... ];
# allowedUDPPorts = [ ... ];
enable = false;
checkReversePath = false;
};
# Networking options
# Pick only one of the below networking options.
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager = {
enable = true; # Easiest to use and most distros use this by default.
dns = "none";
};
# NetworkManager
networkmanager = {
enable = true;
dns = "none";
};
# DHCP settings
useDHCP = false;
dhcpcd.enable = false;
# DHCP
useDHCP = false;
dhcpcd.enable = false;
# IPv6 configuration
enableIPv6 = true;
# IPv6
enableIPv6 = true;
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Hosts and DNS configuration
extraHosts = ''
127.0.0.0 localhost
'';
nameservers = [
"192.168.1.1"
# Hosts & DNS
extraHosts = ''
127.0.0.0 localhost
'';
nameservers = [
"192.168.1.1"
];
search = [
"localdomain"
"local"
];
search = [
"localdomain"
"local"
];
# # environment.etc = {
# # "resolv.conf".text = "nameserver 192.168.1.180\noptions edns0 trust-ad\nsearch home\n";
# # };
};
# Proxies (disabled)
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Wireless (alternative approach, disabled)
# wireless.enable = true; # wpa_supplicant
}
];
}

View File

@@ -9,7 +9,7 @@
let
inherit (pkgs) anime4k;
# Use writeText instead of writeLua luacheck can't cry about the long lines
# Use writeText instead of writeLua so linters don't complain about long lines
autoAnime4k = pkgs.writeText "auto-anime4k-switcher.lua" ''
local function get_nearest(x, numbers)
local min_index = nil
@@ -26,13 +26,7 @@ let
return numbers[min_index]
end
-- Fast
-- local shader_map = {
-- [1080] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_M.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl",
-- [720] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_Soft_M.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl",
-- [480] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
-- }
-- HQ
-- HQ shader map
local shader_map = {
[1080] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_VL.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl",
[720] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_Soft_VL.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl",
@@ -55,162 +49,154 @@ let
end)
'';
in
{
programs.gamescope = {
enable = true;
capSysNice = true;
};
nixpkgs.config = {
allowUnfree = true;
############################
# Nixpkgs & overlays
############################
nixpkgs = {
config.allowUnfree = true;
overlays = [
(self: super: {
mpv = super.wrapMpv (super.mpv.unwrapped.override { sixelSupport = true; }) {
scripts = [ self.mpvScripts.mpris ];
};
})
];
};
nixpkgs.overlays = [
(self: super: {
mpv = super.wrapMpv (super.mpv.unwrapped.override { sixelSupport = true; }) {
scripts = [ self.mpvScripts.mpris ];
};
})
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
#
#
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "$HOME/nixos-dots/"; # sets NH_OS_FLAKE variable for you
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
silent = true;
};
programs.virt-manager.enable = true;
programs.zsh.enable = true;
programs.corectrl.enable = true;
programs.opengamepadui = {
enable = true;
gamescopeSession.enable = true;
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
extraCompatPackages = with pkgs; [ gamescope mangohud gamemode ];
gamescopeSession = {
############################
# Core programs
############################
programs = {
gamescope = {
enable = true;
capSysNice = true;
};
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep-since 4d --keep 3";
};
flake = "$HOME/nixos-dots/"; # sets NH_OS_FLAKE
};
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
silent = true;
};
virt-manager.enable = true;
zsh.enable = true;
corectrl.enable = true;
opengamepadui = {
enable = true;
gamescopeSession.enable = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
extraCompatPackages = with pkgs; [ gamescope mangohud gamemode ];
gamescopeSession.enable = true;
};
# Dynamic linker for foreign binaries
nix-ld = {
enable = true;
libraries = with pkgs; [
# add libraries here if needed
# alsa-lib
# libGL
# glibc
# ...
];
};
# Backlight tool
light.enable = true;
# NetworkManager applet
nm-applet = {
enable = true;
indicator = false;
};
};
# enable dynamic bin executables
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# add libraries here
#alsa-lib
#libGL
#glibc
#glib
#fontconfig
#xorg.libX11
#xorg.libXcomposite
#xorg.libXdamage
#xorg.libXfixes
#xorg.libXrender
#xorg.libXrandr
#xorg.libXtst
#xorg_sys_opengl
#xorg.libXi
#xorg.libxshmfence
#xorg.libxkbfile
#xorg.libxcb
#xorg.xcbutilwm
#xorg.xcbutilimage
#xorg.xcbutilkeysyms
#xorg.xcbutilrenderutil
#xcb-util-cursor
#libgbm
#libxkbcommon
#freetype
#dbus
#krb5
#nss
#zotero
#nspr
#gtk3
#libappindicator-gtk3
#mesa
#vulkan-loader
];
#backlight tool
programs.light.enable = true;
programs.nm-applet = {
enable = true;
indicator = false;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
############################
# System packages
############################
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
neovim
wl-clipboard
# --- Editors & Shell UX ---
bat
anime4k
socat
neovim
vim
zoxide
# --- CLI essentials ---
eza
wget
foot
spaceship-prompt
git
bitwarden
zip
xclip
fd
fzf
zotero
jdk11
hunspell
hunspellDicts.en_US
pavucontrol
zoxide
ripgrep
wget
xcp
polkit_gnome
zip
unzip
# --- Nix tooling ---
nil
nixfmt-rfc-style
inputs.nix-alien.packages.${pkgs.system}.nix-alien
# --- Wayland / Desktop ---
foot
libdecor
wl-clipboard
xwayland-satellite
# --- Media / Graphics ---
anime4k
ffmpeg
libva-utils
nixfmt-rfc-style
nil
kdePackages.qt6ct
ripgrep
xwayland-satellite
pavucontrol
# --- Networking / Secrets ---
bitwarden
polkit_gnome
xclip
socat
# --- Development toolchains ---
cmake
gnumake
gcc
libtool
gnumake
jdk11
ladspaPlugins
inputs.nix-alien.packages.${pkgs.system}.nix-alien
libtool
python311
# --- Spellcheck / Fonts ---
hunspell
hunspellDicts.en_US
# --- KDE Wallet bits ---
kdePackages.kwallet
kdePackages.kwalletmanager
kdePackages.kwallet-pam # For PAM integration if needed
#
kdePackages.kwallet-pam
# --- Apps ---
git
zotero
# --- Handy script: send steam URL to FIFO ---
(pkgs.writeShellScriptBin "steam-run-url" ''
FIFO="/run/user/$(id --user)/steam-run-url.fifo"
echo "$1" > "$FIFO"
'')
libdecor
];
}

View File

@@ -1,27 +1,20 @@
{
config,
lib,
pkgs,
systemName,
...
}:
{ config, lib, pkgs, systemName, ... }:
{
###############################################
# Desktop & Input
###############################################
services.xserver.windowManager.fvwm2.gestures = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# power managment
services.power-profiles-daemon.enable = true;
services.upower = {
# Enable touchpad support (enabled by default in most desktop managers).
services.libinput = {
enable = true;
touchpad = {
tapping = true;
# horizontalScrolling = false;
};
};
#direnv speedup
services.lorri.enable = true;
#services.gnome.gnome-keyring.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
@@ -31,10 +24,10 @@
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
#
services.flatpak.enable = true;
services.automatic-timezoned.enable = true;
###############################################
# Audio / Bluetooth
###############################################
services.pipewire = lib.mkMerge [
(lib.mkIf (systemName == "laptop") {
enable = true;
@@ -61,11 +54,7 @@
"92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 96000;
"default.clock.allowed-rates" = [
44100
48000
96000
];
"default.clock.allowed-rates" = [ 44100 48000 96000 ];
};
};
};
@@ -74,20 +63,105 @@
services.blueman.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.libinput = {
###############################################
# Printing & Files
###############################################
# Enable CUPS to print documents.
services.printing.enable = true;
services.gvfs.enable = true;
services.tumbler.enable = true;
###############################################
# Time & Power
###############################################
services.automatic-timezoned.enable = true;
# Power management
services.power-profiles-daemon.enable = true;
services.upower = {
enable = true;
touchpad = {
tapping = true;
#horizontalScrolling = false;
};
};
# List services that you want to enable:
services.emacs = {
enable = true;
package = pkgs.emacs-pgtk; # replace with emacs-gtk, or a version provided by the community overlay if desired.
};
# Laptop-specific lid and sleep behavior
services.logind = lib.mkIf (systemName == "laptop") {
lidSwitch = "suspend-then-hibernate";
lidSwitchExternalPower = "suspend-then-hibernate";
lidSwitchDocked = "suspend-then-hibernate";
};
systemd.sleep.extraConfig = lib.mkIf (systemName == "laptop") ''
HibernateDelaySec=120min
SuspendState=mem
'';
###############################################
# Developer Tools & Services
###############################################
# direnv speedup
services.lorri.enable = true;
services.emacs = {
enable = true;
# replace with emacs-gtk, or a version provided by the community overlay if desired.
package = pkgs.emacs-pgtk;
};
services.flatpak.enable = true;
# Sunshine (only on PC)
services.sunshine = lib.mkIf (systemName == "pc") {
enable = true;
settings = {
sunshine_name = "nixos";
port = 47989;
output_name = 0;
};
applications = {
apps = [
{
name = "Steam";
env = {
PATH = "$(PATH):/run/current-system/sw/bin";
};
output = "steam.txt";
detached = [
"setsid /run/current-system/sw/bin/steam steam://open/bigpicture"
];
prep-cmd = [
{
"do" = "";
"undo" = "setsid /run/current-system/sw/bin/steam steam://close/bigpicture";
}
];
image-path = "steam.png";
}
];
};
capSysAdmin = false;
openFirewall = true;
};
# Ollama (only on PC)
services.ollama = lib.mkIf (systemName == "pc") {
enable = true;
port = 11434;
host = "0.0.0.0";
acceleration = "rocm";
rocmOverrideGfx = "11.0.0";
environmentVariables = {
OLLAMA_DEBUG = "1";
OLLAMA_MMAP = "0";
OLLAMA_NUM_CTX = "8192";
OLLAMA_NUM_GPU = "20";
# HSA_OVERRIDE_GFX_VERSION = "11.0.0";
# OLLAMA_KV_CACHE_TYPE = "q4";
};
};
###############################################
# Systemd User Services
###############################################
systemd.user.services.steam-run-url-service = {
description = "Service to launch Steam URLs via FIFO";
wantedBy = [ "default.target" ];
@@ -115,56 +189,9 @@
path = [ pkgs.steam ];
};
services.sunshine = lib.mkIf (systemName == "pc") {
enable = true;
settings = {
sunshine_name = "nixos";
port = 47989;
output_name = 0;
};
applications = {
apps = [
{
name = "Steam";
env = {
PATH = "$(PATH):/run/current-system/sw/bin";
};
output = "steam.txt";
detached = [ "setsid /run/current-system/sw/bin/steam steam://open/bigpicture" ];
prep-cmd = [
{
"do" = "";
"undo" = "setsid /run/current-system/sw/bin/steam steam://close/bigpicture";
}
];
image-path = "steam.png";
}
];
};
capSysAdmin = false;
openFirewall = true;
};
services.ollama = lib.mkIf (systemName == "pc") {
enable = true;
port = 11434;
host = "0.0.0.0";
acceleration = "rocm";
rocmOverrideGfx = "11.0.0";
environmentVariables = {
OLLAMA_DEBUG = "1";
OLLAMA_MMAP = "0";
OLLAMA_NUM_CTX="8192";
OLLAMA_NUM_GPU="20";
#HSA_OVERRIDE_GFX_VERSION = "11.0.0";
#OLLAMA_KV_CACHE_TYPE = "q4";
};
};
services.gvfs.enable = true;
services.tumbler.enable = true;
###############################################
# Networking & Remote
###############################################
# services.resolved = {
# enable = true;
# dnssec = "true";
@@ -173,29 +200,25 @@
# dnsovertls = "true";
# };
virtualisation.libvirtd.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# laptop screen lid colose stuff
services.logind = lib.mkIf (systemName == "laptop") {
lidSwitch = "suspend-then-hibernate";
lidSwitchExternalPower = "suspend-then-hibernate";
lidSwitchDocked = "suspend-then-hibernate";
};
#suspend stuff
systemd.sleep.extraConfig = lib.mkIf (systemName == "laptop") ''
HibernateDelaySec=120min
SuspendState=mem
'';
#udev rules
###############################################
# Virtualization
###############################################
virtualisation.libvirtd.enable = true;
###############################################
# Udev Rules
###############################################
services.udev.packages = [
pkgs.platformio-core
pkgs.platformio
pkgs.openocd
pkgs.brave
];
#services.udev.extraRules = ''
# KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess"
#'';
# services.udev.extraRules = ''
# KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess"
# '';
}