Squash merge modularization into main

This commit is contained in:
2025-12-28 00:14:33 +00:00
parent 8a3678428b
commit 88be74cf74
17 changed files with 270 additions and 141 deletions

View File

@@ -1,14 +1,25 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"vmd"
"nvme"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];

View File

@@ -6,39 +6,27 @@
... ...
}: }:
{ {
# imports = [
# ../../modules/hyprland/home.nix
# ../../modules/quickshell/home.nix
# ../../modules/chromium/home.nix
# #./modules/neovim/home.nix
# ../../modules/stylix/home.nix
# ../../modules/nixvim/home.nix
# ../../modules/tmux/home.nix
# ../../modules/theme/home.nix
# # ./modules/spicetify/home.nix
# ../../modules/obs/home.nix
# ../../modules/blender/home.nix
# ../../modules/fish/home.nix
# ../../modules/ytm/home.nix
# ../../overlays.nix
# ];
modules = { modules = {
Hyprland.enable = true; Hyprland.enable = true;
quickshell.enable = true; quickshell.enable = true;
# chromium.enable = true; # chromium.enable = true;
wivrn.enable = true; wivrn.enable = false;
helium.enable = true; helium.enable = true;
nixvim.enable = true; nixvim.enable = true;
kitty.enable = true;
helix.enable = false; helix.enable = false;
stylix.enable = true; stylix.enable = true;
tmux.enable = true; tmux.enable = true;
theme.enable = true; theme.enable = true;
obs.enable = true; obs = {
blender.enable = true; enable = true;
bottles.enable = true; autostart = false;
};
blender.enable = false;
bottles.enable = false;
fish.enable = true; fish.enable = true;
youtube-music.enable = true; youtube-music.enable = true;
unityhub.enable = true; unityhub.enable = false;
direnv.enable = true; direnv.enable = true;
git.enable = true; git.enable = true;
rsRPC.enable = true; rsRPC.enable = true;
@@ -61,6 +49,16 @@
}; };
}; };
xdg.mimeApps.enable = true; xdg.mimeApps.enable = true;
wayland.windowManager.hyprland.settings = {
monitor = [
"eDP-1, 2880x1800@120, 0x0, 2"
];
input = {
kb_layout = "gb";
follow_mouse = 2;
sensitivity = 0;
};
};
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release
@@ -78,9 +76,6 @@
vim vim
telegram-desktop telegram-desktop
vesktop vesktop
# (pkgs.discord.override { withVencord = true; })
# webcord-vencord
# spotify
pavucontrol pavucontrol
lazygit lazygit
btop btop

View File

@@ -0,0 +1,38 @@
{ pkgs, lib, ... }:
let
in
{
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
PCIE_ASPM_ON_BAT = "powersave";
CPU_SCALING_GOVERNOR_ON_AC = "balanced";
PCIE_ASPM_ON_AC = "balanced";
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
# services.tuned.enable = true;
services.thermald.enable = true;
services.upower = {
enable = true;
};
# boot.kernelParams = [ "mem_sleep_default=deep" ];
services.logind.settings.Login = {
HandleLidSwitch = "suspend-then-hibernate";
HandleLidSwitchExternalPower = "ignore";
HandleLidSwitchDocked = "ignore";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30min
SuspendEstimationSec=120
'';
# one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate", "lock"
powerManagement = {
enable = true;
powertop.enable = true;
};
}

View File

@@ -16,6 +16,7 @@ in
{ {
imports = [ imports = [
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./laptop.nix
]; ];
modules = { modules = {
fish.enable = true; fish.enable = true;
@@ -24,11 +25,12 @@ in
steam.enable = false; steam.enable = false;
Hyprland.enable = true; Hyprland.enable = true;
wivrn.enable = false; wivrn.enable = false;
fonts.enable = true;
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_6_12; # Hibernate works on 6.12 but not on latest
networking.hostName = "doloro-nixos-laptop"; # Define your hostname. networking.hostName = "doloro-nixos-laptop"; # Define your hostname.
security.rtkit.enable = true; security.rtkit.enable = true;
@@ -37,7 +39,8 @@ in
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/London"; # time.timeZone = "Europe/London";
services.automatic-timezoned.enable = true;
nix.settings = { nix.settings = {
substituters = [ substituters = [
@@ -59,6 +62,11 @@ in
}; };
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [
intel-media-driver # VA-API (iHD) userspace
# vpl-gpu-rt # oneVPL (QSV) runtime
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
];
}; };
services.openssh = { services.openssh = {
enable = true; enable = true;
@@ -70,9 +78,6 @@ in
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7"
]; ];
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties. # Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8"; # i18n.defaultLocale = "en_US.UTF-8";
@@ -85,17 +90,6 @@ in
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# services.pulseaudio.enable = true;
# OR
sops = { sops = {
defaultSopsFile = builtins.toPath "${nix-meow.flakeRoot}/secrets/users.yaml"; defaultSopsFile = builtins.toPath "${nix-meow.flakeRoot}/secrets/users.yaml";
secrets = { secrets = {
@@ -107,6 +101,7 @@ in
}; };
}; };
}; };
services.pipewire = { services.pipewire = {
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
@@ -122,9 +117,13 @@ in
packages = with pkgs; [ packages = with pkgs; [
tree tree
]; ];
# initialPassword = "sex";
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path; hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" # pc public key
];
# initialPassword = "sex";
}; };
users.mutableUsers = false;
# programs.firefox.enable = true; # programs.firefox.enable = true;

View File

@@ -23,7 +23,10 @@
# ../../overlays.nix # ../../overlays.nix
# ]; # ];
modules = { modules = {
Hyprland.enable = true; Hyprland = {
enable = true;
suspend-on-hibernate = true;
};
quickshell.enable = true; quickshell.enable = true;
# chromium.enable = true; # chromium.enable = true;
wivrn.enable = true; wivrn.enable = true;
@@ -31,9 +34,13 @@
nixvim.enable = true; nixvim.enable = true;
helix.enable = false; helix.enable = false;
stylix.enable = true; stylix.enable = true;
kitty.enable = true;
tmux.enable = true; tmux.enable = true;
theme.enable = true; theme.enable = true;
obs.enable = true; obs = {
enable = true;
autostart = true;
};
blender.enable = true; blender.enable = true;
bottles.enable = true; bottles.enable = true;
fish.enable = true; fish.enable = true;
@@ -48,6 +55,24 @@
home.username = "doloro"; home.username = "doloro";
home.homeDirectory = "/home/doloro"; home.homeDirectory = "/home/doloro";
wayland.windowManager.hyprland.settings = {
monitor = [
"HDMI-A-1, 1920x1080@60, 0x0, 1"
"DP-3, 1920x1080@144, 1920x0, 1"
];
exec-once = [
"hyprctl dispatch workspace 2" # shit solution to get quickshell on the right monitor
];
workspace = [
"name:2, monitor:DP-3"
];
input = {
kb_layout = "gb";
follow_mouse = 2;
sensitivity = -0.5;
};
};
services = { services = {
gpg-agent = { gpg-agent = {
enable = true; enable = true;
@@ -89,39 +114,6 @@
gcr gcr
qbittorrent qbittorrent
]; ];
# sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt";
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
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
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. 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/doloro/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
}; };
@@ -130,8 +122,8 @@
enable = true; enable = true;
}; };
}; };
xdg.configFile."mimeapps.list".force = true; xdg.configFile."mimeapps.list".force = true;
# Let Home Manager install and manage itself.
programs = { programs = {
ssh = { ssh = {

View File

@@ -24,6 +24,7 @@ in
steam.enable = true; steam.enable = true;
Hyprland.enable = true; Hyprland.enable = true;
wivrn.enable = true; wivrn.enable = true;
fonts.enable = true;
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@@ -174,29 +175,29 @@ in
package = config.boot.kernelPackages.nvidiaPackages.latest; package = config.boot.kernelPackages.nvidiaPackages.latest;
}; };
fonts = { # fonts = {
enableDefaultPackages = true; # enableDefaultPackages = true;
packages = # packages =
with pkgs; # with pkgs;
[ # [
nerd-fonts.jetbrains-mono # nerd-fonts.jetbrains-mono
material-design-icons # material-design-icons
material-symbols # material-symbols
googlesans-code # googlesans-code
nerd-fonts.caskaydia-cove # nerd-fonts.caskaydia-cove
nerd-fonts.noto # nerd-fonts.noto
noto-fonts-cjk-sans # noto-fonts-cjk-sans
noto-fonts-cjk-serif # noto-fonts-cjk-serif
] # ]
++ [ # ++ [
(inputs.font-patcher.lib.patchFont { # (inputs.font-patcher.lib.patchFont {
font = "${pkgs.googlesans-code}/share/fonts/googlesans-code/GoogleSansCode[wght].ttf"; # font = "${pkgs.googlesans-code}/share/fonts/googlesans-code/GoogleSansCode[wght].ttf";
name = "Google Sans Code Nerd Font"; # name = "Google Sans Code Nerd Font";
inherit system; # inherit system;
}) # })
]; # ];
fontDir.enable = true; # fontDir.enable = true;
}; # };
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [ programs.nix-ld.libraries = with pkgs; [

View File

@@ -0,0 +1,4 @@
_: {
# home = ./home.nix;
nixos = ./nixos.nix;
}

38
modules/fonts/nixos.nix Normal file
View File

@@ -0,0 +1,38 @@
{
inputs,
pkgs,
lib,
config,
...
}:
let
cfg = config.modules.fonts;
in
{
options.modules.fonts = {
enable = lib.mkEnableOption "fonts";
};
config.fonts = lib.mkIf cfg.enable {
enableDefaultPackages = true;
packages =
with pkgs;
[
nerd-fonts.jetbrains-mono
material-design-icons
material-symbols
googlesans-code
nerd-fonts.caskaydia-cove
nerd-fonts.noto
noto-fonts-cjk-sans
noto-fonts-cjk-serif
]
++ [
(inputs.font-patcher.lib.patchFont {
font = "${pkgs.googlesans-code}/share/fonts/googlesans-code/GoogleSansCode[wght].ttf";
name = "Google Sans Code Nerd Font";
inherit system;
})
];
fontDir.enable = true;
};
}

View File

@@ -28,6 +28,7 @@ in
]; ];
options.modules.Hyprland = { options.modules.Hyprland = {
enable = lib.mkEnableOption "Hyprland"; enable = lib.mkEnableOption "Hyprland";
suspend-on-hibernate = lib.mkEnableOption "soh";
}; };
# TODO, split this into its own module; # TODO, split this into its own module;
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@@ -44,22 +45,8 @@ in
wlogout = { wlogout = {
enable = true; enable = true;
}; };
foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "Google Sans Code Nerd Font:size=11";
};
mouse = {
hide-when-typing = "yes";
};
};
};
}; };
systemd.user.services."hyprland_suspend" = { systemd.user.services."hyprland_suspend" = lib.mkIf cfg.suspend-on-hibernate {
Unit = { Unit = {
Description = "Suspend hyprland"; Description = "Suspend hyprland";
Before = [ Before = [

View File

@@ -1,15 +1,20 @@
{ inputs, pkgs, ... }: { inputs, pkgs, ... }:
{ {
home.packages = [ home.packages = [
pkgs.walker pkgs.hyprlauncher
]; ];
systemd.user.services.walker-deamon = { wayland.windowManager.hyprland.settings = {
bind = [
"$mainMod, R, exec, hyprlauncher"
];
};
systemd.user.services.hyprlauncher-deamon = {
Install = { Install = {
WantedBy = [ "hyprland-session.target" ]; WantedBy = [ "hyprland-session.target" ];
}; };
Service = { Service = {
ExecStart = "${pkgs.writeShellScript "watch-store" '' ExecStart = "${pkgs.writeShellScript "watch-store" ''
walker --gapplication-service hyprlauncher -d
''}"; ''}";
}; };
}; };

View File

@@ -8,5 +8,6 @@ in
wayfreeze wayfreeze
grim grim
slurp slurp
killall
]; ];
} }

View File

@@ -11,13 +11,6 @@
hyprcursor.enable = true; hyprcursor.enable = true;
}; };
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
monitor = [
"HDMI-A-1, 1920x1080@60, 0x0, 1"
"DP-3, 1920x1080@144, 1920x0, 1"
];
exec-once = [
"hyprctl dispatch workspace 2" # shit solution to get quickshell on the right monitor
];
env = [ env = [
"XCURSOR_THEME,BreezeX-RosePine-Linux" "XCURSOR_THEME,BreezeX-RosePine-Linux"
"XCURSOR_SIZE,24" "XCURSOR_SIZE,24"
@@ -47,7 +40,10 @@
}; };
blur = { blur = {
enabled = false; enabled = true;
passes = 1;
new_optimizations = true;
ignore_opacity = false;
}; };
}; };
animations = { animations = {
@@ -92,11 +88,6 @@
enable_anr_dialog = false; enable_anr_dialog = false;
vfr = true; vfr = true;
}; };
input = {
kb_layout = "gb";
follow_mouse = 2;
sensitivity = -0.5;
};
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
bind = [ bind = [
"$mainMod, Q, exec, foot" "$mainMod, Q, exec, foot"
@@ -104,7 +95,6 @@
"$mainMod, M, exit" "$mainMod, M, exit"
"$mainMod, E, exec, $fileManager" "$mainMod, E, exec, $fileManager"
"$mainMod, V, togglefloating," "$mainMod, V, togglefloating,"
"$mainMod, R, exec, walker"
"$mainMod, P, pseudo, # dwindle" "$mainMod, P, pseudo, # dwindle"
"$mainMod, J, togglesplit, # dwindle" "$mainMod, J, togglesplit, # dwindle"
"$mainMod, left, movefocus, l" "$mainMod, left, movefocus, l"
@@ -141,9 +131,6 @@
"$mainMod, mouse:272, movewindow" "$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow" "$mainMod, mouse:273, resizewindow"
]; ];
workspace = [
"name:2, monitor:DP-3"
];
windowrule = [ windowrule = [
"match:class .*, suppress_event maximize" "match:class .*, suppress_event maximize"
"match:class ^(gamescope)$, workspace 5" "match:class ^(gamescope)$, workspace 5"

View File

@@ -0,0 +1,4 @@
_: {
nixos = ./nixos.nix;
home = ./home.nix;
}

46
modules/kitty/home.nix Normal file
View File

@@ -0,0 +1,46 @@
{
config,
lib,
inputs,
pkgs,
home,
system,
...
}:
let
cfg = config.modules.kitty;
in
{
options.modules.kitty = {
enable = lib.mkEnableOption "kitty configuration module";
};
config = lib.mkIf cfg.enable {
programs.kitty = {
enable = true;
font = {
name = "Google Sans Code Nerd Font";
size = 11;
};
settings = {
sync_to_monitor = "yes";
background_opacity = 0.6;
cursor_trail = 1;
### Blur is handled in hyprland config ###
# enable_background_blur = "true";
# background_blur = 1;
};
};
## i could use picom but i just used hyprland blur lol
# services.picom = {
# # for cool gpu accelerated kitty effiect like blurred bg
# enable = true;
# backend = "glx";
# activeOpacity = 0.5;
# };
wayland.windowManager.hyprland.settings = {
bind = [
"$mainMod, q, exec, kitty"
];
};
};
}

19
modules/kitty/nixos.nix Normal file
View File

@@ -0,0 +1,19 @@
{
config,
lib,
inputs,
pkgs,
home,
system,
...
}:
let
cfg = config.modules.kitty;
in
{
options.modules.kitty = {
enable = lib.mkEnableOption "kitty configuration module";
};
config = lib.mkIf cfg.enable {
};
}

View File

@@ -39,6 +39,7 @@ in
plugins = { plugins = {
todo-comments.enable = true; todo-comments.enable = true;
lsp-status.enable = true; lsp-status.enable = true;
transparent.enable = true;
lsp = { lsp = {
enable = true; enable = true;
servers = { servers = {

View File

@@ -11,6 +11,7 @@ in
{ {
options.modules.obs = { options.modules.obs = {
enable = lib.mkEnableOption "obs"; enable = lib.mkEnableOption "obs";
autostart = lib.mkEnableOption "autostart with reply";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs = { programs = {
@@ -49,7 +50,7 @@ in
''}"; ''}";
}; };
}; };
systemd.user.services.obs-autostart = lib.mkIf cfg.enable { systemd.user.services.obs-autostart = lib.mkIf cfg.autostart {
Unit = { Unit = {
Description = "OBS daemon"; Description = "OBS daemon";
After = [ "hyprland-session.target" ]; After = [ "hyprland-session.target" ];