First Commit

This commit is contained in:
2026-01-05 04:04:36 +01:00
commit c7a17f7772
83 changed files with 3574 additions and 0 deletions

75
configuration.nix Normal file
View File

@@ -0,0 +1,75 @@
# 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).
{ inputs, host, ... }:
{
imports =
[
./hosts/${host}
./options.nix
./system
./modules
];
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "euro";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
inputs.nix-cachyos-kernel.overlays.pinned
];
# 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).
system.stateVersion = "25.11"; # Did you read the comment?
}

1009
flake.lock generated Normal file

File diff suppressed because it is too large Load Diff

95
flake.nix Normal file
View File

@@ -0,0 +1,95 @@
{
description = "LillyOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-25.11";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
dms = {
url = "github:AvengeMedia/DankMaterialShell/stable";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
catppuccin.url = "github:catppuccin/nix";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
openlinkhub.url = "path:./services/openlinkhub";
artemisrgb.url = "path:./services/artemis-rgb";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
aagl = {
url = "github:ezKEa/aagl-gtk-on-nix/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
hyprland,
nix-flatpak,
catppuccin,
...
} @inputs:
let
host = "lillypc";
username = "lilly";
prettyUsername = "Lilly";
email = "lilly@hibana.me";
system = "x86_64-linux";
in
{
nixosConfigurations.lillypc = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
inherit host;
inherit username;
inherit prettyUsername;
};
modules = [
./configuration.nix
nix-flatpak.nixosModules.nix-flatpak
catppuccin.nixosModules.catppuccin
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
backupFileExtension = "backup";
extraSpecialArgs = {
inherit inputs;
inherit host;
inherit username;
inherit prettyUsername;
inherit email;
};
users.${username} = {
imports = [
./home
catppuccin.homeModules.catppuccin
];
home = {
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "25.11";
};
};
};
}
];
};
};
}

31
home/catppuccin.nix Normal file
View File

@@ -0,0 +1,31 @@
{
pkgs,
...
}:
let
variant = "mocha";
accent = "mauve";
in
{
catppuccin = {
enable = true;
accent = "${accent}";
flavor = "${variant}";
vscode.profiles.default.enable = false;
cursors.enable = true;
};
gtk = {
enable = true;
theme = {
name = "Catppuccin-GTK-Dark";
package = pkgs.magnetic-catppuccin-gtk;
};
};
qt = {
enable = true;
platformTheme.name = "ct";
style.name = "kvantum";
};
}

20
home/default.nix Normal file
View File

@@ -0,0 +1,20 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
nixpkgs.config.allowUnfree = true;
}

5
home/easyeffects.nix Normal file
View File

@@ -0,0 +1,5 @@
{
services.easyeffects = {
enable = true;
};
}

5
home/gaming/default.nix Normal file
View File

@@ -0,0 +1,5 @@
_: {
imports = [
./mangohud.nix
];
}

5
home/gaming/mangohud.nix Normal file
View File

@@ -0,0 +1,5 @@
{
programs.mangohud = {
enable = true;
};
}

5
home/gnome-keyring.nix Normal file
View File

@@ -0,0 +1,5 @@
{ pkgs, ...}:
{
services.gnome-keyring.enable = true;
home.packages = [ pkgs.gcr ]; # Provides org.gnome.keyring.SystemPrompter
}

View File

@@ -0,0 +1,41 @@
{
wayland.windowManager.hyprland = {
settings = {
animations = {
enabled = true;
bezier = [
# Curves
"expressiveFastSpatial, 0.42, 1.67, 0.21, 0.90"
"expressiveSlowSpatial, 0.39, 1.29, 0.35, 0.98"
"expressiveDefaultSpatial, 0.38, 1.21, 0.22, 1.00"
"emphasizedDecel, 0.05, 0.7, 0.1, 1"
"emphasizedAccel, 0.3, 0, 0.8, 0.15"
"standardDecel, 0, 0, 0, 1"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.52, 0.03, 0.72, 0.08"
];
animation = [
# Configs
# windows
"windowsIn, 1, 2, emphasizedDecel, popin 80%"
"windowsOut, 1, 3, emphasizedDecel, popin 90%"
"windowsMove, 1, 3, emphasizedDecel, slide"
"border, 1, 10, emphasizedDecel"
# layers
"layersIn, 1, 2.7, emphasizedDecel, popin 93%"
"layersOut, 1, 2.4, menu_accel, popin 94%"
# fade
"fadeLayersIn, 1, 0.5, menu_decel"
"fadeLayersOut, 1, 2.7, menu_accel"
"fade, 1, 2, emphasizedDecel"
# workspaces
"workspaces, 1, 7, menu_decel, slide"
## specialWorkspace
"specialWorkspaceIn, 1, 2.8, emphasizedDecel, slidevert"
"specialWorkspaceOut, 1, 1.2, emphasizedAccel, slidevert"
];
};
};
};
}

29
home/hyprland/default.nix Normal file
View File

@@ -0,0 +1,29 @@
{ inputs, pkgs, ... }:
{
programs.kitty.enable = true; # required for the default Hyprland config
wayland.windowManager.hyprland = {
enable = true;
# set the flake package
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
systemd.enable = true;
};
imports = [
./animations.nix
./execs.nix
./general.nix
./hypridle.nix
./input.nix
./keybinds.nix
./misc.nix
./monitors.nix
./theme.nix
./rules/windows.nix
./rules/workspaces.nix
];
# xdg.configFile."hypr".source = ./hypr;
# home.sessionVariables.NIXOS_OZONE_WL = "1";
}

17
home/hyprland/execs.nix Normal file
View File

@@ -0,0 +1,17 @@
{
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"sleep 2; uwsm-app -- vesktop-portable"
# todo openrgb
"sleep 5; uwsm-app -- spotify"
"uwsm-app -- dms run"
"sleep 5; uwsm-app -- Artemis.UI.Linux --minimized"
"sleep 10; bash /home/lilly/Scripts/rgb-on.sh"
# todo sunshine
# todo arrpc
#todo hyprpolkit
];
};
};
}

45
home/hyprland/general.nix Normal file
View File

@@ -0,0 +1,45 @@
{
wayland.windowManager.hyprland =
{
settings =
{
general = {
no_focus_fallback = true;
allow_tearing = true;
snap = {
enabled = true;
window_gap = 4;
monitor_gap = 5;
respect_gaps = true;
};
};
dwindle = {
preserve_split = true;
smart_split = false;
smart_resizing = true;
# precise_mouse_move = true;
};
render = {
cm_enabled = true;
cm_fs_passthrough = 2;
direct_scanout = 2;
cm_auto_hdr = 1;
};
quirks = {
prefer_hdr = 2;
};
debug = {
disable_logs = false;
};
xwayland = {
force_zero_scaling = true; # Unscale XWayland
};
};
};
}

View File

@@ -0,0 +1,20 @@
{
services.hypridle = {
enable = true;
systemdTarget = "hyprland-session.target";
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300; # 2mins
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}

18
home/hyprland/input.nix Normal file
View File

@@ -0,0 +1,18 @@
{
wayland.windowManager.hyprland = {
settings = {
input = {
kb_layout = "us";
kb_variant = "altgr-intl";
sensitivity = 0.3;
follow_mouse = 1;
accel_profile = "flat";
repeat_delay = 250;
repeat_rate = 35;
off_window_axis_events = 2;
};
};
};
}

158
home/hyprland/keybinds.nix Normal file
View File

@@ -0,0 +1,158 @@
{
wayland.windowManager.hyprland = {
settings = {
"$mod" = "SUPER";
bind = [
"$mod, space, exec, dms ipc call spotlight toggle"
"alt, space, exec, dms ipc call spotlight toggle"
"$mod, Super_L, exec, dms ipc call spotlight toggle"
# Color Picker
"$mod+Shift, C, exec, hyprpicker -a" # Pick color (Hex) >> clipboard
# Screenshots
"Super+Shift, S, exec, hyprshot --freeze --mode region --silent --clipboard-only"
"CTRL+Shift, 4, exec, bash /home/lilly/Scripts/zipline-region.sh"
"CTRL+Shift, 3, exec, /home/lilly/Scripts/zipline-monitor.sh"
"CTRL+Shift, 2, exec, /home/lilly/Scripts/zipline-window.sh"
#bindln = Ctrl,Print,exec,grim - | wl-copy Screenshot >> clipboard & file (clipboard)
#!
##! Window
#/# bind = $mod, ←/↑/→/↓,, # Focus in direction
"$mod, Left, movefocus, l"
"$mod, Right, movefocus, r"
"$mod, Up, movefocus, u"
"$mod, Down, movefocus, d"
"$mod, BracketLeft, movefocus, l"
"$mod, BracketRight, movefocus, r"
#/# bind = $mod+Shift, ←/↑/→/↓,, # Move in direction
"$mod+Shift, Left, movewindow, l"
"$mod+Shift, Right, movewindow, r"
"$mod+Shift, Up, movewindow, u"
"$mod+Shift, Down, movewindow, d"
"Alt, F4, killactive, Close (Windows)"
"$mod, Q, killactive," # Close
"$mod+Shift+Alt, Q, exec, hyprctl kill" # Forcefully zap a window
# Window split ratio
#/# binde = Super, ;/',, # Adjust split ratio
# Positioning mode
"Super+Alt, Space, togglefloating," # Float/Tile
"Super, D, fullscreen, 1" # Maximize
"Super, F, fullscreen, 0" # Fullscreen
"Super+Alt, F, fullscreenstate, 0 3" # Fullscreen spoof
"Super, P, pin" # Pin
#/# bind = Super+Alt, Hash,, # Send to workspace # (1, 2, 3,...)
# We use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
"Super+Alt, code:10, movetoworkspacesilent, 1"
"Super+Alt, code:11, movetoworkspacesilent, 2"
"Super+Alt, code:12, movetoworkspacesilent, 3"
"Super+Alt, code:13, movetoworkspacesilent, 4"
"Super+Alt, code:14, movetoworkspacesilent, 5"
"Super+Alt, code:15, movetoworkspacesilent, 6"
"Super+Alt, code:16, movetoworkspacesilent, 7"
"Super+Alt, code:17, movetoworkspacesilent, 8"
"Super+Alt, code:18, movetoworkspacesilent, 9"
"Super+Alt, code:19, movetoworkspacesilent, 10"
# #/# bind = Super+Shift, Scroll ↑/↓,, # Send to workspace left/right
"Super+Shift, mouse_down, movetoworkspace, r-1"
"Super+Shift, mouse_up, movetoworkspace, r+1"
"Super+Alt, mouse_down, movetoworkspace, -1"
"Super+Alt, mouse_up, movetoworkspace, +1"
#/# bind = Super+Shift, Page_↑/↓,, # Send to workspace left/right
"Super+Alt, Page_Down, movetoworkspace, +1"
"Super+Alt, Page_Up, movetoworkspace, -1"
"Super+Shift, Page_Down, movetoworkspace, r+1 "
"Super+Shift, Page_Up, movetoworkspace, r-1"
"Ctrl+Super+Shift, Right, movetoworkspace, r+1"
"Ctrl+Super+Shift, Left, movetoworkspace, r-1"
"Super+Alt, S, movetoworkspacesilent, special" # Send to scratchpad
"Ctrl+Super, S, togglespecialworkspace,"
##! Workspace
# Switching
#/# bind = Super, Hash,, # Focus workspace # (1, 2, 3,...)
# We use raw keycodes because some keyboard layouts register number keys as different chars. The codes can be verified with `wev`
"Super, code:10, workspace, 1"
"Super, code:11, workspace, 2"
"Super, code:12, workspace, 3"
"Super, code:13, workspace, 4"
"Super, code:14, workspace, 5"
"Super, code:15, workspace, 6"
"Super, code:16, workspace, 7"
"Super, code:17, workspace, 8"
"Super, code:18, workspace, 9"
"Super, code:19, workspace, 10"
#/# bind = Ctrl+Super, ←/→,, # Focus left/right
"Ctrl+Super, Right, workspace, r+1"
"Ctrl+Super, Left, workspace, r-1"
#/# bind = Ctrl+Super+Alt, ←/→,, Focus busy left/right
"Ctrl+Super+Alt, Right, workspace, m+1"
"Ctrl+Super+Alt, Left, workspace, m-1"
#/# bind = Super, Page_↑/↓,, # Focus left/right
"Super, Page_Down, workspace, +1"
"Super, Page_Up, workspace, -1"
"Ctrl+Super, Page_Down, workspace, r+1"
"Ctrl+Super, Page_Up, workspace, r-1"
#/# bind = Super, Scroll ↑/↓,, # Focus left/right
"Super, mouse_up, workspace, +1"
"Super, mouse_down, workspace, -1"
"Ctrl+Super, mouse_up, workspace, r+1"
"Ctrl+Super, mouse_down, workspace, r-1"
## Special
"Ctrl+Super, BracketLeft, workspace, -1"
"Ctrl+Super, BracketRight, workspace, +1"
"Ctrl+Super, Up, workspace, r-5"
"Ctrl+Super, Down, workspace, r+5"
##! Apps
"Super, Return, exec, kitty"
"Ctrl+Alt, T, exec, kitty"
"Ctrl+Super, V, exec, pwvucontrol"
"Ctrl+Shift, Escape, exec, \"command -v btop && kitty fish -c btop\"" # Task manager"
# Cursed stuff
## Make window not amogus large
"Ctrl+Super, Backslash, resizeactive, exact 640 480"
];
bindle = [
# Volume / Brightness control
",XF86MonBrightnessUp, exec, qs -c $qsConfig ipc call brightness increment || brightnessctl s 5%+"
",XF86MonBrightnessDown, exec, qs -c $qsConfig ipc call brightness decrement || brightnessctl s 5%-"
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -l 1.5"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- -l 1.5"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:274, movewindow"
"$mod, mouse:273, resizewindow"
];
binde = [
"Super, Semicolon, splitratio, -0.1"
"Super, Apostrophe, splitratio, +0.1"
];
binds = {
scroll_event_delay = 0;
hide_special_on_workspace_change = true;
};
cursor = {
zoom_factor = 1;
zoom_rigid = false;
hotspot_padding = 1;
};
};
};
}

25
home/hyprland/misc.nix Normal file
View File

@@ -0,0 +1,25 @@
{
wayland.windowManager.hyprland = {
settings = {
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
vrr = 3;
vfr = true;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
animate_manual_resizes = false;
animate_mouse_windowdragging = false;
enable_swallow = false;
swallow_regex = "(foot|kitty|allacritty|Alacritty)";
# new_window_takes_over_fs = 2;
allow_session_lock_restore = true;
session_lock_xray = true;
initial_workspace_tracking = false;
middle_click_paste = false;
focus_on_activate = true;
size_limits_tiled = true;
};
};
};
}

View File

@@ -0,0 +1,62 @@
{
wayland.windowManager.hyprland = {
settings = {
monitor = [
",preferred,auto,1"
];
source = [ "monitors.conf" ];
# monitorv2 = [
# {
# output = "desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS FO32U2 0x01010101";
# mode = "3840x2160@240.0";
# position = "0x0";
# scale = 1.5;
# bitdepth = 10;
# vrr = 3;
# supports_wide_color = 1;
# supports_hdr = 1;
# sdr_min_luminance = 0.000;
# sdr_max_luminance = 1000;
# min_luminance = 0.000;
# max_luminance = 1000;
# max_avg_luminance = 400;
# cm = "hdr";
# }
# {
# output = "desc:Samsung Electric Company LF32TU87 HNTT700129";
# mode = "3840x2160@60.0";
# position = "-2560x0";
# scale = 1.5;
# bitdepth = 10;
# }
# {
# output = "desc:Technical Concepts Ltd Beyond TV 0x00010000";
# disabled = true;
# }
# ];
};
};
}
# monitorv2 {
# output = desc:Technical Concepts Ltd Beyond TV 0x00010000
# mode = 3840x2160@120.00
# position = 2560x270
# scale = 1.5
# bitdepth = 10
# vrr = 1
# supports_wide_color = 1
# supports_hdr = 1
# sdr_min_luminance = 0.0005
# sdr_max_luminance = 2000
# min_luminance = 0.0005
# max_luminance = 2000
# max_avg_luminance = 400
# cm = hdr
# }
# workspace = 21, monitor:desc:Technical Concepts Ltd Beyond TV 0x00010000, default:true
# windowrule = match:class $games, workspace 21, fullscreen on
# # windowrule = fullscreen, class:$games
# windowrule = match:class steam, match:title (Steam Big Picture Mode), workspace 21

View File

@@ -0,0 +1,101 @@
{
wayland.windowManager.hyprland = {
settings = {
"$games" = "^(steam_app_.*|gamescope|starrail.exe|.*\.exe)$";
"$launch_on_second_monitor" = "^(vesktop|spotify)$";
"$utility_workspace" = 10;
windowrule = [
# Windows to launch silently on secondary monitor
"match:class $launch_on_second_monitor, workspace $altscreenworkspace silent"
"match:class steam, match:title Steam, workspace 4 silent, tile on"
# Launch Steam Friends List as floating window on workspace 4
"match:class steam, match:title (Friends List), workspace 4 silent, tile on"
"match:class $games, content game"
"match:class $games, tag +game"
"match:class $games, workspace 3"
# Disable VRR for Where Winds meet
"match:class (steam_app_3564740), no_vrr on"
# Game Stuff
"match:class (starrail\.exe), render_unfocused on"
# Utilities to silently launch on the last workspace
"match:class (com.github.wwmm.easyeffects), workspace $utility_workspace silent"
"match:class (org.openrgb.OpenRGB), workspace $utility_workspace silent"
"match:class (com.core447.StreamController), match:title StreamController, workspace $utility_workspace silent"
"match:class (opendeck), workspace $utility_workspace silent"
"match:class (Artemis.UI.Linux), match:title (Artemis 2.0), workspace $utility_workspace silent"
# Focus popups in the center
# Floating
"match:title ^(Open File)(.*)$, center on"
"match:title ^(Open File)(.*)$, float on"
"match:title ^(Select a File)(.*)$, center on"
"match:title ^(Select folder)(.*)$, float on"
"match:title ^(Select folder)(.*)$, center on"
"match:title ^(Select a File)(.*)$, float on"
"match:title ^(Choose wallpaper)(.*)$, center on"
"match:title ^(Choose wallpaper)(.*)$, float on"
"match:title ^(Choose wallpaper)(.*)$, size 60% 65%"
"match:title ^(Open Folder)(.*)$, center on"
"match:title ^(Open Folder)(.*)$, float on"
"match:title ^(Save As)(.*)$, center on"
"match:title ^(Save As)(.*)$, float on"
"match:title ^(Enter name of file to save to)(.*)$, center on"
"match:title ^(Enter name of file to save to)(.*)$, float on"
"match:title ^(Library)(.*)$, center on"
"match:title ^(Library)(.*)$, float on"
"match:title ^(File Upload)(.*)$, center on"
"match:title ^(File Upload)(.*)$, float on"
"match:title ^(.*)(wants to save)$, center on"
"match:title ^(.*)(wants to save)$, float on"
"match:title ^(.*)(wants to open)$, center on"
"match:title ^(.*)(wants to open)$, float on"
"match:class ^(blueberry\.py)$, float on"
"match:class ^(guifetch)$, float on"
"match:class ^(pwvucontrol)$, float on"
"match:class ^(pwvucontrol)$, size 45%"
"match:class ^(pwvucontrol)$, center on"
"match:class ^(com.saivert.pwvucontrol)$, float on"
"match:class ^(com.saivert.pwvucontrol)$, size 45%"
"match:class ^(com.saivert.pwvucontrol)$, center on"
"match:class .*plasmawindowed.*, float on"
"match:class kcm_.*, float on"
"match:class .*bluedevilwizard, float on"
"match:title .*Welcome, float on"
"match:title .*Shell conflicts.*, float on"
"match:class org.freedesktop.impl.portal.desktop.kde, float on"
"match:class org.freedesktop.impl.portal.desktop.kde, size 60% 65%"
"match:class ^(Zotero)$, float on"
"match:class ^(Zotero)$, size 45%"
# stupid dolphin copy
"match:title ^(Copying Dolphin)$, move 40 80"
# Picture-in-Picture
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on"
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, keep_aspect_ratio on"
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, move 73% 72%"
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, size 25%"
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, pin on"
# --- Tearing ---
"match:class $games, immediate on"
# No shadow for tiled windows (matches windows that are not floating).
"match:float 0, no_shadow on"
# Prevent Idle while fullscreen
"match:class (.*), idle_inhibit fullscreen"
];
};
};
}

View File

@@ -0,0 +1,33 @@
{
wayland.windowManager.hyprland = {
settings = {
"$altscreenworkspace" = "11";
"$mainmonitor" = "GIGA-BYTE TECHNOLOGY CO. LTD. AORUS FO32U2 24210B000546";
workspace = [
"1, monitor:desc:$mainmonitor, default:true"
"2, monitor:desc:$mainmonitor"
"3, monitor:desc:$mainmonitor"
"4, monitor:desc:$mainmonitor"
"5, monitor:desc:$mainmonitor"
"6, monitor:desc:$mainmonitor"
"7, monitor:desc:$mainmonitor"
"8, monitor:desc:$mainmonitor"
"9, monitor:desc:$mainmonitor"
"10, monitor:desc:$mainmonitor"
"$altscreenworkspace, monitor:desc:Samsung Electric Company LF32TU87 HNTT700129, default:true"
"$altscreenworkspace, layoutopt:orientation:bottom"
"21, monitor:desc:Technical Concepts Ltd Beyond TV 0x00010000, default:true"
# ######## Workspace rules ########
"special:special, gapsout:30"
];
# Launchers need to be FAST
layerrule = [ "match:namespace gtk4-layer-shell, no_anim on" ];
};
};
}

50
home/hyprland/theme.nix Normal file
View File

@@ -0,0 +1,50 @@
{
wayland.windowManager.hyprland = {
settings = {
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 0;
#"col.active_border" = "rgba(707070ff)";
#"col.inactive_border" = "rgba(d0d0d0ff)";
layout = "dwindle";
};
decoration = {
rounding = 12;
active_opacity = 1.0;
shadow = {
enabled = true;
range = 30;
render_power = 5;
offset = "0 5";
color = "rgba(00000070)";
};
};
# Opacity for inactive windows
# windowrulev2 = opacity 0.9 0.9, floating:0, focus:0
windowrule = [
# GNOME apps
"match:class ^(org\.gnome\.), rounding 12"
"match:class ^(org\.gnome\.), border_size 0"
# Terminal apps - no borders
"match:class ^(org\.wezfurlong\.wezterm)$, border_size 0"
"match:class ^(Alacritty)$, border_size 0"
"match:class ^(zen)$, border_size 0"
"match:class ^(com\.mitchellh\.ghostty)$, border_size 0"
"match:class ^(kitty)$, border_size 0"
# Floating windows
"match:class ^(gnome-calculator)$, float true"
"match:class ^(blueman-manager)$, float true"
"match:class ^(org\.gnome\.Nautilus)$, float true"
];
# Quickshell animation
layerrule = [ "match:namespace ^(quickshell)$, no_anim on" ];
};
};
}

33
home/spicetify.nix Normal file
View File

@@ -0,0 +1,33 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.spicetify-nix.homeManagerModules.default
];
programs.spicetify =
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
enable = true;
enabledExtensions = with spicePkgs.extensions; [
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
betterGenres
lastfm
adblock
beautifulLyrics
aiBandBlocker
];
enabledCustomApps = with spicePkgs.apps; [
lyricsPlus
betterLibrary
newReleases
];
enabledSnippets = with spicePkgs.snippets; [
pointer
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
}

10
home/terminal/btop.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.btop = {
enable = true;
package = pkgs.btop.override {
cudaSupport = true;
rocmSupport = true;
};
};
}

20
home/terminal/default.nix Normal file
View File

@@ -0,0 +1,20 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
nixpkgs.config.allowUnfree = true;
}

30
home/terminal/eza.nix Normal file
View File

@@ -0,0 +1,30 @@
# Eza is a ls replacement
{
programs.eza = {
enable = true;
icons = "auto";
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
git = true;
extraOptions = [
"--group-directories-first"
"--no-quotes"
"--header" # Show header row
"--git-ignore"
"--icons=always"
# "--time-style=long-iso" # ISO 8601 extended format for time
"--classify" # append indicator (/, *, =, @, |)
"--hyperlink" # make paths clickable in some terminals
];
};
# Aliases to make `ls`, `ll`, `la` use eza
home.shellAliases = {
ls = "eza";
lt = "eza --tree --level=2";
ll = "eza -lh --no-user --long";
la = "eza -lah ";
tree = "eza --tree ";
};
}

25
home/terminal/fish.nix Normal file
View File

@@ -0,0 +1,25 @@
{
pkgs,
host,
...
}: {
programs.fish = {
enable = true;
shellAliases = {
fr = "sudo nixos-rebuild switch --flake ~/LillyOS/#${host}";
};
interactiveShellInit = ''
set fish_greeting # Disable greeting
'';
plugins = [
# Enable a plugin (here grc for colorized command output) from nixpkgs
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
{ name = "tide"; src = pkgs.fishPlugins.tide.src; }
{ name = "done"; src = pkgs.fishPlugins.done.src; }
{ name = "fish-you-should-use"; src = pkgs.fishPlugins.fish-you-should-use.src; }
{ name = "autopair"; src = pkgs.fishPlugins.autopair.src; }
{ name = "fzf-fish"; src = pkgs.fishPlugins.fzf-fish.src; }
{ name = "git-abbr"; src = pkgs.fishPlugins.git-abbr.src; }
];
};
}

22
home/terminal/git.nix Normal file
View File

@@ -0,0 +1,22 @@
{ email, prettyUsername, ... }:
{
programs.git = {
enable = true;
settings = {
user = {
name = "${prettyUsername}";
email = "${email}";
};
# FOSS-friendly settings
push.default = "simple"; # Match modern push behavior
credential.helper = "cache --timeout=7200";
init.defaultBranch = "main"; # Set default new branches to 'main'
log.decorate = "full"; # Show branch/tag info in git log
log.date = "iso"; # ISO 8601 date format
# Conflict resolution style for readable diffs
merge.conflictStyle = "diff3";
};
};
}

97
home/terminal/kitty.nix Normal file
View File

@@ -0,0 +1,97 @@
{
pkgs,
...
}: {
programs.kitty = {
enable = true;
# Upstream test failures resolved; use default kitty package (>= 0.44).
package = pkgs.kitty;
settings = {
font_family = "Maple Mono NF";
font_size = 11;
wheel_scroll_min_lines = 1;
window_padding_width = 4;
confirm_os_window_close = 0;
scrollback_lines = 10000;
enable_audio_bell = false;
mouse_hide_wait = 60;
cursor_trail = 1;
cursor_shape = "beam";
tab_fade = 1;
active_tab_font_style = "bold";
inactive_tab_font_style = "bold";
tab_bar_edge = "top";
tab_bar_margin_width = 0;
tab_bar_style = "powerline";
#tab_bar_style = "fade";
enabled_layouts = "splits";
open_url_with_default = true;
detect_urls = true;
allow_remote_control = true;
shell = "fish";
};
shellIntegration.enableZshIntegration = true;
shellIntegration.enableFishIntegration = true;
shellIntegration.enableBashIntegration = true;
shellIntegration.mode = "enabled";
extraConfig = ''
#open_url_with default
url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty sftp ssh
#detect_urls yes
# Clipboard
#map ctrl+shift+v paste_from_selection
#map shift+insert paste_from_selection
# Scrolling
map ctrl+shift+up scroll_line_up
map ctrl+shift+down scroll_line_down
map ctrl+shift+k scroll_line_up
map ctrl+shift+j scroll_line_down
map ctrl+shift+page_up scroll_page_up
map ctrl+shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end
map ctrl+shift+h show_scrollback
# Window management
map alt+n new_window_with_cwd
#map alt+n new_os_window
map alt+w close_window
map ctrl+shift+enter launch --location=hsplit
map ctrl+shift+s launch --location=vsplit
map ctrl+shift+] next_window
map ctrl+shift+[ previous_window
map ctrl+shift+f move_window_forward
map ctrl+shift+b move_window_backward
map ctrl+shift+` move_window_to_top
map ctrl+shift+1 first_window
map ctrl+shift+2 second_window
map ctrl+shift+3 third_window
map ctrl+shift+4 fourth_window
map ctrl+shift+5 fifth_window
map ctrl+shift+6 sixth_window
map ctrl+shift+7 seventh_window
map ctrl+shift+8 eighth_window
map ctrl+shift+9 ninth_window # Tab management
map ctrl+shift+0 tenth_window
map ctrl+shift+right next_tab
map ctrl+shift+left previous_tab
map ctrl+shift+t new_tab
map ctrl+shift+q close_tab
map ctrl+shift+l next_layout
map ctrl+shift+. move_tab_forward
map ctrl+shift+, move_tab_backward
# Miscellaneous
map ctrl+shift+up increase_font_size
map ctrl+shift+down decrease_font_size
map ctrl+shift+backspace restore_font_size
'';
};
}

12
home/terminal/zoxide.nix Normal file
View File

@@ -0,0 +1,12 @@
_: {
programs = {
zoxide = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
options = [
"--cmd cd"
];
};
};
}

104
home/vesktop.nix Normal file
View File

@@ -0,0 +1,104 @@
{ pkgs, username, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "vesktop-portable" ''
exec /home/${username}/vesktop/vesktop --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true --enable-blink-features=MiddleClickAutoscroll "$@"
'')
];
xdg.desktopEntries.vesktop = {
name = "Vesktop";
genericName = "Discord Client";
exec = "vesktop-portable %U";
icon = "vesktop";
terminal = false;
categories = [ "Network" "InstantMessaging" "Chat" ];
};
programs.vesktop = {
enable = true;
package = pkgs.vesktop.override {
withMiddleClickScroll = true;
};
settings = {
arRPC = true;
tray = true;
minimizeToTray = true;
};
vencord = {
settings = {
plugins = {
AlwaysTrust.enabled = true;
BetterSessions.enabled = true;
BetterSettings.enabled = true;
BiggerStreamPreview.enabled = true;
CallTimer.enabled = true;
ClearURLs.enabled = true;
CopyEmojiMarkdown.enabled = true;
CopyFileContents.enabled = true;
CopyUserURLs.enabled = true;
CrashHandler.enabled = true;
CustomIdle = {
enabled = true;
idleTimeout = 0;
remainInIdle = false;
};
Dearrow.enabled = true;
DisableCallIdle.enabled = true;
ExpressionCloner.enabled = true;
FavoriteEmojiFirst.enabled = true;
FixSpotifyEmbeds.enabled = true;
FixYoutubeEmbeds.enabled = true;
FullSearchContext.enabled = true;
GameActivityToggle.enabled = true;
GifPaste.enabled = true;
ImageZoom.enabled = true;
LoadingQuotes.enabled = true;
MemberCount.enabled = true;
MentionAvatars.enabled = true;
MessageLinkEmbeds.enabled = true;
MessageLogger = {
enabled = true;
inlineEdits = false;
};
NewGuildSettings.enabled = true;
NoF1.enabled = true;
NoOnboardingDelay.enabled = true;
NormalizeMessageLinks.enabled = true;
NoUnblockToJump.enabled = true;
OnePingPerDm.enabled = true;
OpenInApp.enabled = true;
petpet.enabled = true;
ReadAllNotificationsButton.enabled = true;
RelationshipNotifier.enabled = true;
ReverseImageSearch.enabled = true;
ServerInfo.enabled = true;
ServerListIndicators.enabled = false;
ShowHiddenChannels.enabled = true;
ShowHiddenThings.enabled = true;
SpotifyControls.enabled = true;
ThemeAttributes.enabled = true;
TypingIndicator.enabled = true;
TypingTweaks.enabled = true;
UnlockedAvatarZoom.enabled = true;
UnsuppressEmbeds.enabled = true;
UserVoiceShow.enabled = true;
ValidUser.enabled = true;
ViewIcons.enabled = true;
ViewRaw.enabled = true;
VoiceChatDoubleClick.enabled = true;
VoiceDownload.enabled = true;
VoiceMessages.enabled = true;
WebKeybinds.enabled = true;
WebScreenShareFixes.enabled = true;
WhoReacted.enabled = true;
YoutubeAdblock.enabled = true;
DisableDeepLinks.enabled = true;
NoTrack.enabled = true;
Settings.enabled = true;
SupportHelper.enabled = true;
WebContextMenus.enabled = true;
};
};
};
};
}

11
home/vscode.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
profiles.default.extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
catppuccin.catppuccin-vsc-icons
catppuccin.catppuccin-vsc
];
};
}

View File

@@ -0,0 +1,20 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
nixpkgs.config.allowUnfree = true;
}

View File

@@ -0,0 +1,17 @@
{
xdg.configFile."electron-flags.conf".text = ''
--enable-features=WaylandWindowDecorations
--ozone-platform-hint=wayland
--enable-blink-features=MiddleClickAutoscroll
--ozone-platform=wayland
'';
xdg.configFile."code-flags.conf".text = ''
--ozone-platform-hint=wayland
--ozone-platform=wayland
--gtk-version=4
--ignore-gpu-blocklist
--enable-features=TouchpadOverscrollHistoryNavigation
--enable-wayland-ime
--password-store=gnome-libsecret
'';
}

14
home/xdg-config/mime.nix Normal file
View File

@@ -0,0 +1,14 @@
let
gwenview_desktop_file = "org.kde.gwenview.desktop";
in
let
associations = {
"image/jpeg" = "${gwenview_desktop_file}";
};
in
{
xdg.mimeApps = {
associations.added = associations;
defaultApplications = associations;
};
}

View File

@@ -0,0 +1,40 @@
{
xdg.configFile."uwsm/env".text = ''
export GDK_BACKEND=wayland,x11,*
export GDK_SCALE=2 # GDK Scaling Factor (no fractional scaling)
export MOZ_ENABLE_WAYLAND=1
export MOZ_DISABLE_RDD_SANDBOX=1
export OZONE_PLATFORM=wayland
export ELECTRON_OZONE_PLATFORM_HINT=auto
export SDL_VIDEODRIVER=wayland
export CLUTTER_BACKEND=wayland
export QT_QPA_PLATFORM=wayland;xcb
export QT_QPA_PLATFORMTHEME=qt5ct
export XDG_MENU_PREFIX=plasma-
export QT_QPA_PLATFORMTHEME_QT6=qt5ct
export GTK_THEME=Adwaita:dark
export QS_ICON_THEME=Papirus-Dark
export LIBVA_DRIVER_NAME=nvidia
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export XDG_SESSION_DESKTOP=Hyprland
export GBM_BACKEND=nvidia-drm
export TERMINAL=kitty
export __GL_GSYNC_ALLOWED=1
export __GL_VRR_ALLOWED=1
export EDITOR=code
export STLEDITOR=code
export XCURSOR_SIZE=16
'';
xdg.configFile."uwsm/env-hyprland".text = ''
export AQ_DRM_DEVICES=/dev/dri/nvidia-dgpu
'';
}

17
home/xdg.nix Normal file
View File

@@ -0,0 +1,17 @@
{ pkgs, inputs, ...}:
{
xdg = {
enable = true;
mime.enable = true;
mimeApps.enable = true;
portal = {
enable = true;
extraPortals = [
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
configPackages = [inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland];
};
};
}

98
home/zen-browser.nix Normal file
View File

@@ -0,0 +1,98 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.zen-browser.homeModules.beta
];
home.file."catppuccin-zen" = {
target = ".zen/default/chrome/catppuccin-zen";
source = (
fetchTarball {
url = "https://github.com/catppuccin/zen-browser/tarball/c855685442c6040c4dda9c8d3ddc7b708de1cbaa";
sha256 = "sha256:03ky8s5h9vkw4cp3nm86b0bk5qbjmqgyqq9a95xqzard4wppn3p4";
});
};
programs.zen-browser = {
enable = true;
nativeMessagingHosts = [pkgs.firefoxpwa];
policies = {
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
};
profiles.default.settings = {
"zen.view.use-single-toolbar" = false;
"zen.urlbar.replace-newtab" = false;
"identity.fxaccounts.autoconfig.uri" = "https://www.fxa.hibana.me";
"general.autoScroll" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
profiles.default.extensions.packages =
with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
ublock-origin
dearrow
bitwarden
istilldontcareaboutcookies
return-youtube-dislikes
sponsorblock
youtube-nonstop
youtube-high-definition
absolute-enable-right-click
augmented-steam
clearurls
darkreader
karakeep
newtab-adapter
steam-database
unpaywall
violentmonkey
];
profiles.default.userChrome = ''
@import "catppuccin-zen/themes/Mocha/Mauve/userChrome.css";
'';
profiles.default.userContent = ''
@import "catppuccin-zen/themes/Mocha/Mauve/userContent.css";
'';
};
xdg.mimeApps = let
value = let
zen-browser = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.beta; # or twilight
in
zen-browser.meta.desktopFileName;
associations = builtins.listToAttrs (map (name: {
inherit name value;
}) [
"application/x-extension-shtml"
"application/x-extension-xhtml"
"application/x-extension-html"
"application/x-extension-xht"
"application/x-extension-htm"
"x-scheme-handler/unknown"
"x-scheme-handler/mailto"
"x-scheme-handler/chrome"
"x-scheme-handler/about"
"x-scheme-handler/https"
"x-scheme-handler/http"
"application/xhtml+xml"
"application/json"
"text/plain"
"text/html"
]);
in {
associations.added = associations;
defaultApplications = associations;
};
}

23
hosts/lillypc/config.nix Normal file
View File

@@ -0,0 +1,23 @@
{
my = {
gaming.enable = true;
cachyosKernel.enable = true;
desktop = {
enable = true;
sddm = {
enable = true;
autoLogin.enable = true;
};
hyprland.enable = true;
flatpak.enable = true;
};
nvidia.enable = true;
openlinkhub.enable = true;
rgb.enable = true;
};
openlinkhub.enable = true;
}

19
hosts/lillypc/default.nix Normal file
View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
}

View File

@@ -0,0 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "ahci" "thunderbolt" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8ef1b753-7a4a-4062-a906-6a01ce7b6111";
fsType = "btrfs";
options = [ "subvol=@" "rw" "relatime" "compress=zstd:3" "ssd" "discard=async" "space_cache=v2" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/8ef1b753-7a4a-4062-a906-6a01ce7b6111";
fsType = "btrfs";
options = [ "subvol=@home" "rw" "relatime" "compress=zstd:3" "ssd" "discard=async" "space_cache=v2" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/69B8-FDBD";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/5c58c3c4-2ce8-4ad9-8277-ff7503462f88";
fsType = "btrfs";
options = [ "rw" "relatime" "compress=zstd:3" "ssd" "discard=async" "space_cache=v2" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/58267d20-fa23-4874-b619-36a263f8be88"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -0,0 +1,5 @@
{
systemd.tmpfiles.rules = [
"L+ /var/lib/OpenRGB/sizes.ors - - - - ${./openrgb/sizes.ors}"
];
}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
{ pkgs, username, ... }:
#let mount_opts = "x-systemd.automount,user,iocharset=utf8,rw,noauto,nofail,credentials=/etc/nixos/smb-secrets,uid=1000,gid=100";
let mount_opts = "iocharset=utf8,rw,auto,nofail,credentials=/etc/nixos/smb-secrets,uid=1000,gid=100";
in {
environment.systemPackages = [ pkgs.cifs-utils ];
fileSystems."/home/${username}/Shares/NAS" = {
device = "//10.0.10.5/LillyNAS";
fsType = "cifs";
options = [ "${mount_opts}" ];
};
fileSystems."/home/${username}/Shares/3D-Printing" = {
device = "//10.0.10.5/3D-Printing";
fsType = "cifs";
options = [ "${mount_opts}" ];
};
fileSystems."/home/${username}/Shares/Media" = {
device = "//10.0.10.5/Media";
fsType = "cifs";
options = [ "${mount_opts}" ];
};
fileSystems."/home/${username}/Shares/PaperlessConsume" = {
device = "//10.0.10.5/PaperlessConsume";
fsType = "cifs";
options = [ "${mount_opts}" ];
};
fileSystems."/home/${username}/Shares/LillyPhoneSync" = {
device = "//10.0.10.5/LillyPhoneSync";
fsType = "cifs";
options = [ "${mount_opts}" ];
};
}

12
hosts/lillypc/systemd.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
systemd.services.nvidia-undervolt = {
enable = true;
description = "Set NVIDIA GPU undervolt";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.nvidia_oc}/bin/nvidia_oc set --index 0 --freq-offset 250";
};
};
}

6
hosts/lillypc/udev.nix Normal file
View File

@@ -0,0 +1,6 @@
{
services.udev.extraRules = ''
KERNEL=="card*", KERNELS=="0000:6d:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/amd-igpu"
KERNEL=="card*", KERNELS=="0000:01:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/nvidia-dgpu"
'';
}

3
modules/cli/adb.nix Normal file
View File

@@ -0,0 +1,3 @@
{
programs.adb.enable = true;
}

5
modules/cli/btop.nix Normal file
View File

@@ -0,0 +1,5 @@
{
systemd.tmpfiles.rules = [
"Z /sys/class/powercap/intel-rapl:0/energy_uj 0444 root root - -"
];
}

19
modules/cli/default.nix Normal file
View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
}

17
modules/cli/fish.nix Normal file
View File

@@ -0,0 +1,17 @@
{ pkgs, ...}:
{
environment.systemPackages = with pkgs; [
fish
grc
fishPlugins.done
fishPlugins.tide
fishPlugins.sponge
fishPlugins.grc
fishPlugins.fish-you-should-use
fishPlugins.autopair
fishPlugins.async-prompt
fishPlugins.fzf-fish
fishPlugins.git-abbr
];
}

36
modules/cli/packages.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, ...}:
{
environment.systemPackages = with pkgs; [
duf
eza
ffmpeg
htop
killall
libnotify
lm_sensors
lshw
ncdu
pciutils
socat
unrar
unzip
usbutils
v4l-utils
nvtopPackages.full
wget
ytmdl
yt-dlp
python3
python313Packages.pynvml
python313Packages.py3nvml
git
zip
killall
zoxide
fzf
p7zip
curl
jq
];
}

10
modules/corsairLink.nix Normal file
View File

@@ -0,0 +1,10 @@
{ config, inputs, ... }:
let
cfg = config.my.openlinkhub;
in
{
imports = [
inputs.openlinkhub.nixosModules.default
];
openlinkhub.enable = cfg.enable;
}

15
modules/default.nix Normal file
View File

@@ -0,0 +1,15 @@
{
imports = [
./cli
./packages.nix
./desktop
./gaming
./hardware.nix
./network.nix
./services.nix
./fonts.nix
./ld.nix
./nvidia.nix
./corsairLink.nix
];
}

View File

@@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }:
{
config = lib.mkIf config.my.desktop.enable {
catppuccin = {
enable = true;
accent = "mauve";
flavor = "mocha";
};
environment.systemPackages = with pkgs; [
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
catppuccin-kvantum
magnetic-catppuccin-gtk
];
};
}

View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
}

26
modules/desktop/dms.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib, config, inputs, ... }:
let
cfg = config.my.desktop;
in
{
imports = [
inputs.dms.nixosModules.dankMaterialShell
];
programs.dankMaterialShell = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
enable = true;
systemd = {
enable = false; # Systemd service for auto-start
restartIfChanged = false; # Auto-restart dms.service when dankMaterialShell changes
};
# Core features
enableSystemMonitoring = true; # System monitoring widgets (dgop)
enableClipboard = true; # Clipboard history manager
enableVPN = true; # VPN management widget
enableDynamicTheming = true; # Wallpaper-based theming (matugen)
enableAudioWavelength = true; # Audio visualizer (cava)
enableCalendarEvents = true; # Calendar integration (khal)
};
}

View File

@@ -0,0 +1,3 @@
{
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View File

@@ -0,0 +1,14 @@
{ config, lib, ... }:
{
services = {
flatpak = lib.mkIf config.my.desktop.flatpak.enable {
enable = true;
packages = [
"com.github.tchx84.Flatseal"
"org.jellyfin.JellyfinDesktop"
];
update.onActivation = true;
};
};
}

View File

@@ -0,0 +1,12 @@
# Glib Schemas Fix
# https://github.com/thomX75/nixos-modules
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ gsettings-desktop-schemas ];
environment.variables = {
GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
};
}

View File

@@ -0,0 +1,11 @@
{ inputs, pkgs, ...}:
{
programs.hyprland = {
enable = true;
# set the flake package
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
}

View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.obs-studio = {
enable = true;
enableVirtualCamera = true;
plugins = [
pkgs.obs-studio-plugins.obs-vkcapture
pkgs.obs-studio-plugins.obs-tuna
pkgs.obs-studio-plugins.obs-pipewire-audio-capture
pkgs.obs-studio-plugins.droidcam-obs
];
};
}

View File

@@ -0,0 +1,50 @@
{ pkgs, ...}:
{
environment.systemPackages = with pkgs; [
kitty
thunderbird
bitwarden-desktop
pwvucontrol
firefox
gedit
wl-clipboard
tuigreet
brightnessctl
spotify
hyprshot
mpv
#jellyfin-media-player
gedit
nixfmt
nixd
xfce.thunar
xfce.thunar-archive-plugin
xfce.thunar-media-tags-plugin
droidcam
rustdesk
mailspring
rquickshare
btrfs-assistant
ungoogled-chromium
gparted
veracrypt
lshw
syncplay
tigervnc
solaar
logitech-udev-rules
yubioath-flutter
kdePackages.gwenview
gsettings-desktop-schemas
gnome-tweaks
appimage-run
];
programs.seahorse.enable = true;
programs.streamcontroller.enable = true;
programs.appimage = {
enable = true;
binfmt = true;
};
programs.yubikey-manager.enable = true;
}

14
modules/desktop/rgb.nix Normal file
View File

@@ -0,0 +1,14 @@
{ lib, config, inputs, pkgs, ... }:
let
cfg = config.my.rgb;
in
{
config = lib.mkIf cfg.enable {
services.hardware.openrgb = {
enable = true;
};
environment.systemPackages = [
inputs.artemisrgb.packages.${pkgs.stdenv.hostPlatform.system}.default
];
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

30
modules/desktop/sddm.nix Normal file
View File

@@ -0,0 +1,30 @@
{ pkgs, lib, username, config, ... }:
let
cfg = config.my.desktop;
in
{
services.displayManager.sddm = {
enable = cfg.sddm.enable;
theme = "catppuccin-mocha-mauve";
package = pkgs.kdePackages.sddm;
wayland.enable = true;
settings = {
Autologin = lib.optionalAttrs cfg.sddm.autoLogin.enable {
User = "${username}";
Session = cfg.sddm.autoLogin.session;
};
};
};
environment.systemPackages =
lib.optionals cfg.sddm.enable [(
pkgs.catppuccin-sddm.override {
flavor = "mocha";
accent = "mauve";
font = "Noto Sans";
fontSize = "9";
background = "${./sddm-background/wallpaper.png}";
loginBackground = true;
}
)];
}

16
modules/desktop/xdg.nix Normal file
View File

@@ -0,0 +1,16 @@
{ pkgs, inputs, ...}:
{
xdg = {
mime.enable = true;
menus.enable = true;
portal = {
enable = true;
extraPortals = [
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
configPackages = [inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland];
};
};
}

31
modules/fonts.nix Normal file
View File

@@ -0,0 +1,31 @@
{pkgs, ...}: {
fonts = {
packages = with pkgs; [
dejavu_fonts
fira-code
fira-code-symbols
font-awesome
hackgen-nf-font
ibm-plex
inter
jetbrains-mono
material-icons
maple-mono.NF
minecraftia
nerd-fonts.im-writing
nerd-fonts.blex-mono
noto-fonts
noto-fonts-color-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-monochrome-emoji
powerline-fonts
roboto
roboto-mono
symbola
terminus_font
corefonts
vista-fonts
];
};
}

View File

@@ -0,0 +1,13 @@
{ lib, config, inputs, ... }:
let
cfg = config.my.gaming;
in
{
imports = [
inputs.aagl.nixosModules.default
];
config = lib.mkIf cfg.enable {
programs.honkers-railway-launcher.enable = true;
programs.sleepy-launcher.enable = true;
};
}

View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
}

View File

@@ -0,0 +1,14 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
heroic
vulkan-hdr-layer-kwin6
lsfg-vk
lsfg-vk-ui
gamescope
gamescope-wsi
moonlight-qt
bs-manager
wine
];
}

25
modules/gaming/steam.nix Normal file
View File

@@ -0,0 +1,25 @@
{ pkgs, ... }:
{
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
gamescopeSession.enable = false;
extraPackages = with pkgs; [
steamtinkerlaunch
];
extraCompatPackages = with pkgs; [
steamtinkerlaunch
];
};
gamescope = {
enable = true;
capSysNice = true;
};
};
environment.systemPackages = with pkgs; [
steamtinkerlaunch
protonup-qt
];
}

21
modules/gaming/wivrn.nix Normal file
View File

@@ -0,0 +1,21 @@
{ pkgs, ... }:
{
services.wivrn = {
enable = true;
openFirewall = true;
# Write information to /etc/xdg/openxr/1/active_runtime.json, VR applications
# will automatically read this and work with WiVRn (Note: This does not currently
# apply for games run in Valve's Proton)
defaultRuntime = true;
# Run WiVRn as a systemd service on startup
autoStart = true;
# If you're running this with an nVidia GPU and want to use GPU Encoding (and don't otherwise have CUDA enabled system wide), you need to override the cudaSupport variable.
package = (pkgs.wivrn.override { cudaSupport = true; });
# You should use the default configuration (which is no configuration), as that works the best out of the box.
# However, if you need to configure something see https://github.com/WiVRn/WiVRn/blob/master/docs/configuration.md for configuration options and https://mynixos.com/nixpkgs/option/services.wivrn.config.json for an example configuration.
};
}

20
modules/hardware.nix Normal file
View File

@@ -0,0 +1,20 @@
{pkgs, ...}: {
hardware = {
sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
disabledDefaultBackends = ["escl"];
};
logitech.wireless.enable = true;
logitech.wireless.enableGraphical = true;
graphics = {
enable = true;
enable32Bit = true;
};
amdgpu.opencl.enable = true;
enableRedistributableFirmware = true;
keyboard.qmk.enable = true;
bluetooth.enable = true;
bluetooth.powerOnBoot = true;
};
}

35
modules/ld.nix Normal file
View File

@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc
glibc
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
wayland
libGL
libdrm
alsa-lib
pulseaudio
glib
nspr.out
nss.out
dbus.lib
at-spi2-atk
cups.lib
cairo.out
gtk3.out
pango.out
libxcomposite.out
libxdamage.out
libxext.out
libxfixes.out
libgbm.out
expat.out
libxcb.out
libxkbcommon.out
];
}

30
modules/network.nix Normal file
View File

@@ -0,0 +1,30 @@
{
options,
...
}:
{
networking = {
hostName = "LillyPC";
networkmanager.enable = true;
timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"];
firewall = {
enable = false;
allowedTCPPorts = [
22
80
443
59010
59011
8080
];
allowedUDPPorts = [
59010
59011
];
};
};
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
};
}

32
modules/nvidia.nix Normal file
View File

@@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.my;
in
{
config = lib.mkIf cfg.nvidia.enable {
services.xserver.videoDrivers = lib.optionals cfg.nvidia.enable ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = cfg.desktop.enable;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
hardware.nvidia-container-toolkit.enable = config.virtualisation.docker.enable;
environment.systemPackages = with pkgs; [
nvidia_oc
nvidia-vaapi-driver
]
++ lib.optionals config.virtualisation.docker.enable [
nvidia-docker
nvidia-container-toolkit
];
};
}

12
modules/packages.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, ...}:
{
environment.systemPackages = with pkgs; [
firefoxpwa
hyprpolkitagent
hypridle
hyprpicker
lsb-release
papirus-icon-theme
];
}

56
modules/services.nix Normal file
View File

@@ -0,0 +1,56 @@
{
# Services to start
services = {
upower.enable = true; # noctalia shell battery
libinput.enable = true; # Input Handling
fstrim.enable = true; # SSD Optimizer
gvfs.enable = true; # For Mounting USB & More
power-profiles-daemon.enable = true;
openssh = {
enable = true; # Enable SSH
settings = {
PermitRootLogin = "no"; # Prevent root from SSH login
PasswordAuthentication = true; #Users can SSH using kb and password
KbdInteractiveAuthentication = true;
};
ports = [22];
};
blueman.enable = true; # Bluetooth Support
tumbler.enable = true; # Image/video preview
gnome.gnome-keyring.enable = true;
smartd = {
enable = true;
autodetect = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 256;
"default.clock.min-quantum" = 256;
"default.clock.max-quantum" = 256;
};
};
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "256/48000";
pulse.default.req = "256/48000";
pulse.max.req = "256/48000";
pulse.min.quantum = "256/48000";
pulse.max.quantum = "256/48000";
};
}
];
};
};
};
}

46
options.nix Normal file
View File

@@ -0,0 +1,46 @@
{ lib, ... }:
{
options.my = {
gaming.enable = lib.mkEnableOption "Gaming";
cachyosKernel.enable = lib.mkEnableOption "CachyOS Kernel";
nvidia = {
enable = lib.mkEnableOption "Has NVIDIA GPU";
};
openlinkhub.enable = lib.mkEnableOption "Has Corsair Link Hardware";
rgb.enable = lib.mkEnableOption "Has RGB";
desktop = {
enable = lib.mkEnableOption "Is a Desktop System";
sddm = {
enable = lib.mkEnableOption "SDDM";
autoLogin = {
enable = lib.mkEnableOption "SDDM AutoLogin";
session = lib.mkOption {
type = lib.types.str;
default = "hyprland-uwsm.desktop";
example = "hyprland-uwsm.desktop";
description = "Name of the autologin session desktop file";
};
};
};
hyprland = {
enable = lib.mkEnableOption "Hyprland";
};
kdePlasma = {
enable = lib.mkEnableOption "Hyprland";
};
flatpak = {
enable = lib.mkEnableOption "Flatpak Support";
};
};
};
}

View File

@@ -0,0 +1,98 @@
{
description = "Artemis RGB (Avalonia + SkiaSharp, NixOS compatible)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};
outputs = { nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
artemis = pkgs.stdenvNoCC.mkDerivation rec {
pname = "artemis-rgb";
version = "latest-master";
src = pkgs.fetchurl {
url = "https://updating.artemis-rgb.com/api/artifacts/latest/master/linux";
sha256 = "sha256-YzgkzfVZbxSesrVTZTvUXWm8K2TBA6pQbiN9ErDGzeA=";
};
nativeBuildInputs = [
pkgs.unzip
pkgs.makeWrapper
];
buildInputs = [
# .NET runtime deps
pkgs.icu
pkgs.zlib
pkgs.openssl
# Skia / fonts
pkgs.fontconfig
pkgs.freetype
# X11 (required even on Wayland for Avalonia)
pkgs.xorg.libX11
pkgs.xorg.libXcursor
pkgs.xorg.libXrandr
pkgs.xorg.libXi
pkgs.xorg.libXinerama
pkgs.xorg.libxcb
pkgs.xorg.libICE
pkgs.xorg.libSM
# Graphics / display
pkgs.mesa
pkgs.wayland
];
unpackPhase = ''
unzip $src
'';
installPhase = ''
mkdir -p $out/lib/artemis
cp -r ./* $out/lib/artemis
chmod +x $out/lib/artemis/Artemis.UI.Linux
mkdir -p $out/bin
makeWrapper $out/lib/artemis/Artemis.UI.Linux \
$out/bin/Artemis.UI.Linux \
--set LD_LIBRARY_PATH "${pkgs.lib.makeLibraryPath buildInputs}"
mkdir -p $out/share/applications
cat > $out/share/applications/artemis.desktop <<EOF
[Desktop Entry]
Name=Artemis
Exec=Artemis.UI.Linux
Icon=artemis
Terminal=false
Type=Application
Categories=Utility;
EOF
if [ -d $out/lib/artemis/Icons ]; then
mkdir -p $out/share/icons/hicolor
cp -r $out/lib/artemis/Icons/* $out/share/icons/hicolor/
fi
'';
meta = with pkgs.lib; {
description = "Artemis RGB lighting controller";
homepage = "https://artemis-rgb.com";
license = licenses.unfreeRedistributable;
platforms = [ "x86_64-linux" ];
};
};
in {
packages.${system}.default = artemis;
};
}

View File

@@ -0,0 +1,132 @@
{
description = "NixOS flake for OpenLinkHub";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
outputs = { nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
openlinkhubPkg = pkgs.buildGoModule rec {
pname = "openlinkhub";
version = "0.7.4";
src = pkgs.fetchFromGitHub {
owner = "jurkovic-nikola";
repo = "OpenLinkHub";
tag = version;
sha256 = "sha256-isUi3GDGmZ5BwOrLkxlPRzfZZyPlTZNhwq/dCKVfsXo=";
};
# REQUIRED for Go deps
vendorHash = "sha256-wLoDbaLfSP2VLbl5yzJSSA7cvsv5tXnfb5+jsy0BjGA=";
buildInputs = [
pkgs.udev
];
subPackages = [ "." ];
postInstall = ''
# Udev rules (correct NixOS way)
mkdir -p $out/lib/udev/rules.d
cp 99-openlinkhub.rules $out/lib/udev/rules.d/
'';
meta = with pkgs.lib; {
description = "Open source interface for iCUE LINK Hub & Corsair devices";
homepage = "https://github.com/jurkovic-nikola/OpenLinkHub";
license = licenses.gpl3;
platforms = platforms.linux;
};
};
module = { config, lib, ... }: {
options.openlinkhub.enable =
lib.mkEnableOption "Enable OpenLinkHub service";
config = lib.mkIf config.openlinkhub.enable {
environment.systemPackages = [ openlinkhubPkg ];
users.groups.openlinkhub = {};
users.users.openlinkhub = {
isSystemUser = true;
group = "openlinkhub";
description = "OpenLinkHub service user";
home = "/var/lib/openlinkhub";
createHome = true;
};
services.udev.packages = [ openlinkhubPkg ];
systemd.services.openlinkhub = {
description = "OpenLinkHub service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "udev.service" ];
# On first service start, populate working dir
preStart = ''
# Create working directory if missing
mkdir -p /var/lib/openlinkhub
cd /var/lib/openlinkhub
# Copy database if missing
if [ ! -d database ]; then
cp -r ${openlinkhubPkg.src}/database .
fi
rm -r static || true
# Copy static assets if missing
if [ ! -d static ]; then
cp -r ${openlinkhubPkg.src}/static .
fi
rm -r static || true
# Copy web UI if missing
if [ ! -d web ]; then
cp -r ${openlinkhubPkg.src}/web .
fi
rm -r api || true
# Copy api docs if missing
if [ ! -d api ]; then
cp -r ${openlinkhubPkg.src}/api .
fi
# Ensure ownership
chown -R openlinkhub:openlinkhub /var/lib/openlinkhub
chmod u+w /var/lib/openlinkhub -R
'';
serviceConfig = {
ExecStart = "${openlinkhubPkg}/bin/OpenLinkHub";
StateDirectory = "openlinkhub";
WorkingDirectory = "/var/lib/openlinkhub";
User = "openlinkhub";
Group = "openlinkhub";
Restart = "on-failure";
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = true;
};
};
};
};
in
{
packages.${system}.default = openlinkhubPkg;
nixosModules.default = module;
nixosModules.openlinkhub = module;
};
}

53
system/core.nix Normal file
View File

@@ -0,0 +1,53 @@
{ pkgs, config, ... }:
let
cfg = config.my.cachyosKernel;
in
{
nix = {
settings = {
download-buffer-size = 200000000;
auto-optimise-store = true;
substituters = [
"https://hyprland.cachix.org"
"https://attic.xuyh0120.win/lantian"
"https://nix-community.cachix.org"
"https://ezkea.cachix.org"
];
trusted-substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
];
experimental-features = [ "nix-command" "flakes" "pipe-operators" ];
};
};
# Boot/Kernel Stuff
boot = {
kernelPackages =
(
if cfg.enable
then pkgs.cachyosKernels.linuxPackages-cachyos-latest-zen4
else pkgs.linuxPackages_latest
);
kernelModules = ["v4l2loopback" "kvm-amd"];
extraModulePackages = [config.boot.kernelPackages.v4l2loopback];
kernel.sysctl = {"vm.max_map_count" = 2147483642;};
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
# Appimage Support
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
plymouth.enable = true;
};
}

19
system/default.nix Normal file
View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
b = builtins;
module_files =
b.readDir ./. |>
lib.filterAttrs (name: type:
( (lib.strings.hasSuffix ".nix" name
&& name != "default.nix"
&& type == "regular" )
|| ( type == "directory"
&& b.pathExists ./${name}/default.nix))
) |>
b.attrNames |>
b.map (f: ./${f});
in
{
imports = module_files;
}

24
system/user.nix Normal file
View File

@@ -0,0 +1,24 @@
{
pkgs,
username,
prettyUsername,
...
}: {
users.mutableUsers = true;
users.users.${username} = {
isNormalUser = true;
description = "${prettyUsername}";
extraGroups = [
"adbusers"
"docker" #access to docker as non-root
"libvirtd" #Virt manager/QEMU access
# "lp"
"networkmanager"
"scanner"
"wheel" #sudo access
];
shell = pkgs.bash;
# ignoreShellProgramCheck = true;
};
nix.settings.allowed-users = [ "${username}" ];
}