initial commit for module-refactor
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/desktop
|
||||
./modules
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
@@ -89,6 +90,7 @@
|
||||
};
|
||||
modules = [
|
||||
./hosts/laptop
|
||||
./modules
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
@@ -102,6 +104,7 @@
|
||||
};
|
||||
modules = [
|
||||
./hosts/server
|
||||
./modules
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
nur.nixosModules.nur
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [ ./hardware.nix ];
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
host,
|
||||
inputs,
|
||||
username,
|
||||
nur,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./../../modules/sys/configuration.nix
|
||||
./hardware.nix
|
||||
./settings.nix
|
||||
];
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
}
|
||||
36
hosts/laptop/config.nix
Normal file
36
hosts/laptop/config.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{pkgs, config, ...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
powerProfiles.enable = true;
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
host,
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./../../modules/sys/configuration.nix
|
||||
./hardware.nix
|
||||
./boot.nix
|
||||
./services.nix
|
||||
./environment.nix
|
||||
./settings.nix
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment = {
|
||||
variables = {
|
||||
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||
};
|
||||
shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
# 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,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-nix";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-ESP";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-partlabel/disk-main-home";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{...}: {
|
||||
services = {
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
settings.main = {
|
||||
capslock = "esc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageLow = 20;
|
||||
percentageCritical = 5;
|
||||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "performance";
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC = 500;
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT = 500;
|
||||
# INTEL_GPU_MAX_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
|
||||
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{...}: {
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
}
|
||||
31
modules/default.nix
Normal file
31
modules/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./sys/hardware
|
||||
./sys/software
|
||||
./sys/environment
|
||||
./home/home-manager.nix
|
||||
];
|
||||
|
||||
networkModule.enable = lib.mkDefault true;
|
||||
nixSettings.enable = lib.mkDefault true;
|
||||
bootLoader.enable = lib.mkDefault true;
|
||||
issue.enable = lib.mkDefault true;
|
||||
sddmOpts.enable = lib.mkDefault true;
|
||||
stylixOpts.enable = lib.mkDefault true;
|
||||
gamingPkgs.enable = lib.mkDefault true;
|
||||
steamOpts.enable = lib.mkDefault true;
|
||||
sysPkgs.enable = lib.mkDefault true;
|
||||
sysProgs.enable = lib.mkDefault true;
|
||||
sysServices.enable = lib.mkDefault true;
|
||||
virtOpts.enable = lib.mkDefault true;
|
||||
powerProfiles.enable = lib.mkDefault false;
|
||||
}
|
||||
@@ -9,14 +9,15 @@
|
||||
home-manager,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[(import ./gtk.nix)]
|
||||
++ [(import ./spicetify.nix)]
|
||||
++ [(import ./stylix.nix)]
|
||||
++ [(import ./starship.nix)]
|
||||
++ [(import ./userpkgs.nix)]
|
||||
++ [(import ./zshell.nix)]
|
||||
++ [(import ./swaync.nix)]
|
||||
++ [(import ./waybar)]
|
||||
++ [(import ./hyprland)];
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./spicetify.nix
|
||||
./stylix.nix
|
||||
./starship.nix
|
||||
./userpkgs.nix
|
||||
./zshell.nix
|
||||
./swaync.nix
|
||||
./hyprland.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
{lib, config, pkgs, ... }: {
|
||||
options = {
|
||||
gtkOpts.enable = lib.mkEnableOption "enable my gtk options";
|
||||
};
|
||||
config = lib.mkIf config.gtkOpts.enable {
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
@@ -32,4 +32,5 @@
|
||||
# package = pkgs.nerdfonts.override {fonts = ["Iosevka"];};
|
||||
#};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
242
modules/home/environment/hyprland.nix
Normal file
242
modules/home/environment/hyprland.nix
Normal file
@@ -0,0 +1,242 @@
|
||||
{inputs, pkgs, lib, config, username, host, ... }: let
|
||||
desktop = host == "oganesson";
|
||||
screenshot_bind =
|
||||
if desktop
|
||||
then [
|
||||
# My laptop does not have a printscreen button
|
||||
"super, print, exec, grimblast copy area"
|
||||
]
|
||||
else [
|
||||
"super, insert, exec, grimblast copy area"
|
||||
];
|
||||
in {
|
||||
options = {
|
||||
hyprlandConfig.enable = lib.mkEnableOption "enables my hyprland config";
|
||||
};
|
||||
config = lib.mkIf config.hyprlandConfig.enable {
|
||||
home.packages = with pkgs; [
|
||||
swaybg
|
||||
inputs.hypr-contrib.packages.${pkgs.system}.grimblast
|
||||
hyprpicker
|
||||
grim
|
||||
slurp
|
||||
wl-clip-persist
|
||||
wf-recorder
|
||||
glib
|
||||
wayland
|
||||
direnv
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = ["xdg-desktop-autostart.target"];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = true;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor =
|
||||
if (host == "oganesson")
|
||||
then [
|
||||
"DP-1, 1920x1080@144, 1920x0, 1"
|
||||
"HDMI-A-1, 1920x1080, 0x0, 1"
|
||||
]
|
||||
else [
|
||||
"eDP-1, 1600x900, 0x0, 1"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
"swaync &"
|
||||
"wl-paste --type text --watch cliphist store &"
|
||||
"wl-paste --type image --watch cliphist store &"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"systemctl --user import-environment &"
|
||||
"hash dbus-update-activation-environment 2>/dev/null &"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
"aplay /home/${username}/sound/sys/login.wav &"
|
||||
];
|
||||
|
||||
workspace =
|
||||
if desktop
|
||||
then [
|
||||
"1,persistent=true,monitor:HDMI-A-1"
|
||||
"2,persistent=true,monitor:HDMI-A-1"
|
||||
"3,persistent=true,monitor:HDMI-A-1"
|
||||
"4,persistent=true,monitor:DP-1"
|
||||
"5,persistent=true,monitor:DP-1"
|
||||
"6,persistent=true,monitor:DP-1"
|
||||
]
|
||||
else [
|
||||
"1,persistent=true,monitor:eDP-1"
|
||||
"2,persistent=true,monitor:eDP-1"
|
||||
"3,persistent=true,monitor:eDP-1"
|
||||
"4,persistent=true,monitor:eDP-1"
|
||||
];
|
||||
|
||||
env = [
|
||||
"XDG_CONFIG_HOME,$HOME/.config"
|
||||
"XDG_DATA_HOME,$HOME/.local/share"
|
||||
"XDG_CACHE_HOME,$HOME/.cache"
|
||||
];
|
||||
layerrule = [
|
||||
"blur,waybar"
|
||||
"ignorezero,waybar"
|
||||
"blur,launcher"
|
||||
];
|
||||
windowrule = [
|
||||
"opacity 0.8,nemo"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
force_no_accel = 1;
|
||||
sensitivity = 0;
|
||||
};
|
||||
general = {
|
||||
"$mainMod" = "super";
|
||||
layout = "dwindle";
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
#"col.inactive_border" = "0xff${scheme.base01}";
|
||||
#"col.active_border" = "0xff${scheme.base0F}";
|
||||
border_part_of_window = false;
|
||||
no_border_on_floating = false;
|
||||
};
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
no_gaps_when_only = false;
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
use_active_for_splits = true;
|
||||
pseudotile = "yes";
|
||||
preserve_split = "yes";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
special_scale_factor = 1;
|
||||
no_gaps_when_only = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 7;
|
||||
# active_opacity = 0.90;
|
||||
# inactive_opacity = 0.90;
|
||||
# fullscreen_opacity = 1.0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
# size = 1;
|
||||
# passes = 1;
|
||||
size = 4;
|
||||
passes = 1;
|
||||
brightness = 1;
|
||||
contrast = 1.400;
|
||||
ignore_opacity = true;
|
||||
popups = true;
|
||||
noise = 0;
|
||||
new_optimizations = true;
|
||||
xray = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
|
||||
shadow_ignore_window = true;
|
||||
shadow_offset = "0 2";
|
||||
shadow_range = 20;
|
||||
shadow_render_power = 3;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||
"easeinoutsine, 0.37, 0, 0.63, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
# Windows
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
|
||||
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
|
||||
|
||||
# Fade
|
||||
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
|
||||
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
|
||||
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
|
||||
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
|
||||
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
|
||||
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
|
||||
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
|
||||
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
|
||||
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
|
||||
"super, t, exec, swaync-client -t -sw"
|
||||
"super, a, exec, firefox"
|
||||
"super, q, exec, kitty --title Kitty"
|
||||
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty"
|
||||
"super, c, killactive,"
|
||||
"super, e, exec, nemo"
|
||||
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
|
||||
"super shift, m, exit,"
|
||||
"super, m, exec, fuzzel"
|
||||
"super, r, exec, neovide"
|
||||
"super, b, togglesplit, # dwindle"
|
||||
"super, f, togglefloating"
|
||||
"super, g, fullscreen"
|
||||
"super, h, movefocus, l"
|
||||
"super, l, movefocus, r"
|
||||
"super, k, movefocus, u"
|
||||
"super, j, movefocus, d"
|
||||
"super shift, h, movewindow, l"
|
||||
"super shift, l, movewindow, r"
|
||||
"super shift, k, movewindow, u"
|
||||
"super shift, j, movewindow, d"
|
||||
"super, d, exec, switchmon"
|
||||
"super, 1, exec, hyprctl 'dispatch workspace 1'"
|
||||
"super, 2, exec, hyprctl 'dispatch workspace 2'"
|
||||
"super, 3, exec, hyprctl 'dispatch workspace 3'"
|
||||
"super, 4, exec, hyprctl 'dispatch workspace 4'"
|
||||
"super, 5, exec, hyprctl 'dispatch workspace 5'"
|
||||
"super, 6, exec, hyprctl 'dispatch workspace 6'"
|
||||
"super shift, 1, movetoworkspace, 1"
|
||||
"super shift, 2, movetoworkspace, 2"
|
||||
"super shift, 3, movetoworkspace, 3"
|
||||
"super shift, 4, movetoworkspace, 4"
|
||||
"super shift, 5, movetoworkspace, 5"
|
||||
"super shift, 6, movetoworkspace, 6"
|
||||
"super, s, togglespecialworkspace, magic"
|
||||
"super shift, s, movetoworkspace, special:magic"
|
||||
]
|
||||
++ screenshot_bind;
|
||||
bindm = [
|
||||
"super, mouse:272, movewindow"
|
||||
"super, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,221 +0,0 @@
|
||||
{
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
desktop = host == "oganesson";
|
||||
screenshot_bind =
|
||||
if desktop
|
||||
then [
|
||||
# My laptop does not have a printscreen button
|
||||
"super, print, exec, grimblast copy area"
|
||||
]
|
||||
else [
|
||||
"super, insert, exec, grimblast copy area"
|
||||
];
|
||||
in {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor =
|
||||
if (host == "oganesson")
|
||||
then [
|
||||
"DP-1, 1920x1080@144, 1920x0, 1"
|
||||
"HDMI-A-1, 1920x1080, 0x0, 1"
|
||||
]
|
||||
else [
|
||||
"eDP-1, 1600x900, 0x0, 1"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
"swaync &"
|
||||
"wl-paste --type text --watch cliphist store &"
|
||||
"wl-paste --type image --watch cliphist store &"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"systemctl --user import-environment &"
|
||||
"hash dbus-update-activation-environment 2>/dev/null &"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
"aplay /home/${username}/sound/sys/login.wav &"
|
||||
];
|
||||
|
||||
workspace =
|
||||
if desktop
|
||||
then [
|
||||
"1,persistent=true,monitor:HDMI-A-1"
|
||||
"2,persistent=true,monitor:HDMI-A-1"
|
||||
"3,persistent=true,monitor:HDMI-A-1"
|
||||
"4,persistent=true,monitor:DP-1"
|
||||
"5,persistent=true,monitor:DP-1"
|
||||
"6,persistent=true,monitor:DP-1"
|
||||
]
|
||||
else [
|
||||
"1,persistent=true,monitor:eDP-1"
|
||||
"2,persistent=true,monitor:eDP-1"
|
||||
"3,persistent=true,monitor:eDP-1"
|
||||
"4,persistent=true,monitor:eDP-1"
|
||||
];
|
||||
|
||||
env = [
|
||||
"XDG_CONFIG_HOME,$HOME/.config"
|
||||
"XDG_DATA_HOME,$HOME/.local/share"
|
||||
"XDG_CACHE_HOME,$HOME/.cache"
|
||||
];
|
||||
layerrule = [
|
||||
"blur,waybar"
|
||||
"ignorezero,waybar"
|
||||
"blur,launcher"
|
||||
];
|
||||
windowrule = [
|
||||
"opacity 0.8,nemo"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
force_no_accel = 1;
|
||||
sensitivity = 0;
|
||||
};
|
||||
general = {
|
||||
"$mainMod" = "super";
|
||||
layout = "dwindle";
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
#"col.inactive_border" = "0xff${scheme.base01}";
|
||||
#"col.active_border" = "0xff${scheme.base0F}";
|
||||
border_part_of_window = false;
|
||||
no_border_on_floating = false;
|
||||
};
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
no_gaps_when_only = false;
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
use_active_for_splits = true;
|
||||
pseudotile = "yes";
|
||||
preserve_split = "yes";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
special_scale_factor = 1;
|
||||
no_gaps_when_only = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 7;
|
||||
# active_opacity = 0.90;
|
||||
# inactive_opacity = 0.90;
|
||||
# fullscreen_opacity = 1.0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
# size = 1;
|
||||
# passes = 1;
|
||||
size = 4;
|
||||
passes = 1;
|
||||
brightness = 1;
|
||||
contrast = 1.400;
|
||||
ignore_opacity = true;
|
||||
popups = true;
|
||||
noise = 0;
|
||||
new_optimizations = true;
|
||||
xray = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
|
||||
shadow_ignore_window = true;
|
||||
shadow_offset = "0 2";
|
||||
shadow_range = 20;
|
||||
shadow_render_power = 3;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||
"easeinoutsine, 0.37, 0, 0.63, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
# Windows
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
|
||||
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
|
||||
|
||||
# Fade
|
||||
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
|
||||
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
|
||||
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
|
||||
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
|
||||
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
|
||||
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
|
||||
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
|
||||
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
|
||||
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
|
||||
"super, t, exec, swaync-client -t -sw"
|
||||
"super, a, exec, firefox"
|
||||
"super, q, exec, kitty --title Kitty"
|
||||
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty --title Kitty"
|
||||
"super, c, killactive,"
|
||||
"super, e, exec, nemo"
|
||||
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
|
||||
"super shift, m, exit,"
|
||||
"super, m, exec, fuzzel"
|
||||
"super, r, exec, neovide"
|
||||
"super, b, togglesplit, # dwindle"
|
||||
"super, f, togglefloating"
|
||||
"super, g, fullscreen"
|
||||
"super, h, movefocus, l"
|
||||
"super, l, movefocus, r"
|
||||
"super, k, movefocus, u"
|
||||
"super, j, movefocus, d"
|
||||
"super shift, h, movewindow, l"
|
||||
"super shift, l, movewindow, r"
|
||||
"super shift, k, movewindow, u"
|
||||
"super shift, j, movewindow, d"
|
||||
"super, d, exec, switchmon"
|
||||
"super, 1, exec, hyprctl 'dispatch workspace 1'"
|
||||
"super, 2, exec, hyprctl 'dispatch workspace 2'"
|
||||
"super, 3, exec, hyprctl 'dispatch workspace 3'"
|
||||
"super, 4, exec, hyprctl 'dispatch workspace 4'"
|
||||
"super, 5, exec, hyprctl 'dispatch workspace 5'"
|
||||
"super, 6, exec, hyprctl 'dispatch workspace 6'"
|
||||
"super shift, 1, movetoworkspace, 1"
|
||||
"super shift, 2, movetoworkspace, 2"
|
||||
"super shift, 3, movetoworkspace, 3"
|
||||
"super shift, 4, movetoworkspace, 4"
|
||||
"super shift, 5, movetoworkspace, 5"
|
||||
"super shift, 6, movetoworkspace, 6"
|
||||
"super, s, togglespecialworkspace, magic"
|
||||
"super shift, s, movetoworkspace, special:magic"
|
||||
]
|
||||
++ screenshot_bind;
|
||||
bindm = [
|
||||
"super, mouse:272, movewindow"
|
||||
"super, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[(import ./hyprland.nix)]
|
||||
++ [(import ./config.nix)];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
swaybg
|
||||
inputs.hypr-contrib.packages.${pkgs.system}.grimblast
|
||||
hyprpicker
|
||||
grim
|
||||
slurp
|
||||
wl-clip-persist
|
||||
wf-recorder
|
||||
glib
|
||||
wayland
|
||||
direnv
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = ["xdg-desktop-autostart.target"];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,19 +1,15 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
scheme,
|
||||
...
|
||||
}: let
|
||||
{lib, config, pkgs, inputs, scheme, ... }: let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in {
|
||||
options = {
|
||||
spicetifyOpts.enable = lib.mkEnableOption "enable my spicetify options";
|
||||
};
|
||||
config = lib.mkIf config.spicetifyOpts.enable {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"spotify"
|
||||
];
|
||||
|
||||
imports = [inputs.spicetify-nix.homeManagerModules.default];
|
||||
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
@@ -40,4 +36,5 @@ in {
|
||||
# misc = scheme.base0F;
|
||||
#};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
{config, lib, inputs, ... }: {
|
||||
options = {
|
||||
starshipConfig.enable = lib.mkEnableOption "enables my starship configuration";
|
||||
};
|
||||
config = lib.mkIf config.starshipConfig.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
@@ -56,4 +56,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
scheme,
|
||||
wallpaper,
|
||||
...
|
||||
}: {
|
||||
{lib, config, pkgs, scheme, wallpaper, ... }: {
|
||||
options = {
|
||||
stylixHomeOpts.enable = lib.mkEnableOption "enables my stylix Home-Manager options";
|
||||
};
|
||||
config = lib.mkIf config.stylixHomeOpts.enable {
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
@@ -15,4 +14,5 @@
|
||||
btop.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
{lib, config, pkgs, ...}: {
|
||||
options = {
|
||||
swayncConfig.enable = lib.mkEnableOption "enables my swaync configuration";
|
||||
};
|
||||
config = lib.mkIf config.swayncConfig.enable {
|
||||
home.packages = with pkgs; [swaynotificationcenter];
|
||||
xdg.configFile."swaync/style.css".text = ''
|
||||
@define-color shadow rgba(0, 0, 0, 0.25);
|
||||
@@ -740,4 +744,5 @@
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
{lib, config, pkgs, host, ... }: let
|
||||
desktop = host == "oganesson";
|
||||
extraFigletFonts = pkgs.fetchFromGitHub {
|
||||
owner = "xero";
|
||||
@@ -32,6 +28,10 @@
|
||||
]
|
||||
else [];
|
||||
in {
|
||||
options = {
|
||||
userPkgs.enable = lib.mkEnableOption "enables my default user packages";
|
||||
};
|
||||
config = lib.mkIf config.userPkgs.enable {
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
chafa
|
||||
@@ -63,4 +63,5 @@ in {
|
||||
python3
|
||||
]
|
||||
++ desktop_pkgs;
|
||||
};
|
||||
}
|
||||
|
||||
518
modules/home/environment/waybar.nix
Normal file
518
modules/home/environment/waybar.nix
Normal file
@@ -0,0 +1,518 @@
|
||||
{pkgs, scheme, host, lib, config, ...}:
|
||||
|
||||
let
|
||||
desktop = host == "oganesson";
|
||||
workspaces = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
};
|
||||
persistent-workspaces =
|
||||
if desktop
|
||||
then {
|
||||
"HDMI-A-1" = [1 2 3];
|
||||
"DP-1" = [4 5 6];
|
||||
}
|
||||
else {
|
||||
"eDP-1" = [1 2 3 4];
|
||||
};
|
||||
};
|
||||
bg = {
|
||||
darkester = scheme.base00;
|
||||
darkest = scheme.base01;
|
||||
darker = scheme.base02;
|
||||
dark = scheme.base03;
|
||||
};
|
||||
fg = {
|
||||
lightester = scheme.base07;
|
||||
lightest = scheme.base06;
|
||||
lighter = scheme.base05;
|
||||
light = scheme.base04;
|
||||
};
|
||||
colors = {
|
||||
color0 = scheme.base08;
|
||||
color1 = scheme.base09;
|
||||
color2 = scheme.base0A;
|
||||
color3 = scheme.base0B;
|
||||
color4 = scheme.base0C;
|
||||
color5 = scheme.base0D;
|
||||
color6 = scheme.base0E;
|
||||
color7 = scheme.base0F;
|
||||
};
|
||||
monitors =
|
||||
if desktop
|
||||
then [
|
||||
"DP-1"
|
||||
"HDMI-A-1"
|
||||
]
|
||||
else [
|
||||
"eDP-1"
|
||||
];
|
||||
in {
|
||||
options = {
|
||||
waybarConfig.enable = lib.mkEnableOption "enables my waybar configuration";
|
||||
};
|
||||
config = {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];
|
||||
});
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "bottom";
|
||||
output = builtins.elemAt monitors 0;
|
||||
position = "top";
|
||||
name = "mainBar";
|
||||
margin-left = 8;
|
||||
margin-top = 5;
|
||||
margin-right =
|
||||
if desktop
|
||||
then 8
|
||||
else 5;
|
||||
mode = "dock";
|
||||
"gtk-layer-shell" = true;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"cava"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"group/hardware"
|
||||
"clock"
|
||||
"group/powerbtns"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = workspaces;
|
||||
|
||||
cava = {
|
||||
framerate = 30;
|
||||
autosens = 1;
|
||||
sensitivity = 1;
|
||||
bars = 14;
|
||||
lower_cutoff_freq = 50;
|
||||
higher_cutoff_freq = 10000;
|
||||
method = "pulse";
|
||||
source = "auto";
|
||||
hide_on_silence = true;
|
||||
stereo = true;
|
||||
reverse = true;
|
||||
bar_delimiter = 0;
|
||||
monstercat = false;
|
||||
waves = false;
|
||||
noise_reduction = 0.77;
|
||||
input_delay = 2;
|
||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/disk-icon"
|
||||
"memory"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
|
||||
"custom/disk-icon" = {
|
||||
exec = ''
|
||||
df /dev/disk/by-partlabel/disk-main-home /dev/disk/by-partlabel/disk-main-nix | awk '
|
||||
function format(size) {
|
||||
if (size >= 1024) return sprintf("%.1fTB", size / 1024)
|
||||
else return sprintf("%.1fGB", size)
|
||||
}
|
||||
$6 == "/home" {
|
||||
home_usage = $3 / 1024 / 1024
|
||||
home_total = $2 / 1024 / 1024
|
||||
home_percent = $5
|
||||
sub(/%/,"",home_percent)
|
||||
}
|
||||
$6 == "/nix" {
|
||||
nix_usage = $3 / 1024 / 1024
|
||||
nix_total = $2 / 1024 / 1024
|
||||
nix_percent = $5
|
||||
}
|
||||
END {
|
||||
printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %s / %s\\n/nix: %s / %s\", \"percentage\": \"%s\"}\n",
|
||||
format(home_usage), format(home_total), format(nix_usage), format(nix_total), home_percent
|
||||
}' | jq --unbuffered --compact-output
|
||||
'';
|
||||
interval = 60;
|
||||
return-type = "json";
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
max-length = 10;
|
||||
tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format = "CPU: {usage:0.1f}%";
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
on-click = "shutdown now";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/logout" = {
|
||||
on-click = "hyprctl dispatch exit";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/reboot" = {
|
||||
on-click = "reboot";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"group/powerbtns" = {
|
||||
orientation = "horizontal";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
children-class = "power-drawer";
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"custom/power"
|
||||
"custom/logout"
|
||||
"custom/reboot"
|
||||
];
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
sideBar = {
|
||||
layer = "bottom";
|
||||
output =
|
||||
if desktop
|
||||
then builtins.elemAt monitors 1
|
||||
else builtins.elemAt monitors 0;
|
||||
position = "right";
|
||||
margin-top = 8;
|
||||
margin-right = 5;
|
||||
margin-bottom = 8;
|
||||
name = "sideBar";
|
||||
mode = "dock";
|
||||
"gtk-layer-shell" = true;
|
||||
|
||||
modules-left =
|
||||
if desktop
|
||||
then [
|
||||
"hyprland/workspaces"
|
||||
]
|
||||
else [
|
||||
"group/brightness"
|
||||
"battery"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"network"
|
||||
"group/audio"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = workspaces;
|
||||
|
||||
"pulseaudio/slider" = {
|
||||
orientation = "vertical";
|
||||
};
|
||||
|
||||
"group/audio" = {
|
||||
orientation = "vertical";
|
||||
modules = [
|
||||
"pulseaudio/slider"
|
||||
"pulseaudio"
|
||||
];
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-muted = " ";
|
||||
format-icons = {
|
||||
default = [
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
on-click-right = "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'";
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 30;
|
||||
format-wifi = " ";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
format-ethernet = " ";
|
||||
tooltip-format-ethernet = "{ifname}";
|
||||
format-disconnected = " ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'";
|
||||
};
|
||||
|
||||
battery = {
|
||||
bat = "BAT1";
|
||||
interval = 1;
|
||||
tooltip-format = "{capacity}%\nTil empty: {time}";
|
||||
tooltip-format-charging = "{capacity}%\nTil full: {time}";
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-charging = "";
|
||||
};
|
||||
|
||||
"group/brightness" = {
|
||||
orientation = "vertical";
|
||||
modules = [
|
||||
"backlight"
|
||||
"backlight/slider"
|
||||
];
|
||||
};
|
||||
backlight = {
|
||||
format = "";
|
||||
tooltip = "{percentage}%";
|
||||
};
|
||||
"backlight/slider" = {
|
||||
min = 10;
|
||||
max = 100;
|
||||
orientation = "vertical";
|
||||
rotate = 180;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
font-family: "JetBrains Mono Nerd Font";
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-radius: 20px;
|
||||
border: 3px solid #${colors.color7};
|
||||
background: rgba(46,52,64,0.15);
|
||||
margin: 20px;
|
||||
}
|
||||
window#waybar.empty #window {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${fg.lightester};
|
||||
border-radius: 20px;
|
||||
color: #${bg.darkest};
|
||||
}
|
||||
|
||||
#cava {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px 3px 3px 6px;
|
||||
padding: 0px 15px 0px 15px;
|
||||
color: #${colors.color6};
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
padding: 0 15px 0 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#hardware {
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#custom-disk-icon, #cpu, #memory {
|
||||
margin-bottom: 4px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-disk-icon {
|
||||
color: #${colors.color4};
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #${colors.color1};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #${colors.color3};
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#powerbtns {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: #${colors.color0};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-logout {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-reboot {
|
||||
color: #${colors.color2};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#audio {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 10px 0;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#backlight-slider slider,
|
||||
#pulseaudio-slider slider {
|
||||
background: #${colors.color4};
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#backlight-slider trough,
|
||||
#pulseaudio-slider trough {
|
||||
min-width: 9px;
|
||||
min-height: 90px;
|
||||
border-radius: 8px;
|
||||
background: #343434;
|
||||
}
|
||||
|
||||
#backlight-slider highlight,
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: #2096C0;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #${colors.color3};
|
||||
font-size: 20px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 5px 6px;
|
||||
}
|
||||
|
||||
#brightness {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 10px 0px 5px 0;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #${colors.color2};
|
||||
font-size: 18px;
|
||||
padding: 0 4px 0 0;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #${colors.color4};
|
||||
font-size: 20px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 5px 0px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{...}: {
|
||||
imports =
|
||||
[(import ./waybar.nix)]
|
||||
++ [(import ./settings.nix)]
|
||||
++ [(import ./style.nix)];
|
||||
}
|
||||
@@ -1,323 +0,0 @@
|
||||
{host, ...}:
|
||||
# Grocery list:
|
||||
# Clock
|
||||
# CPU/MEM meters
|
||||
# Home folder and Nix store storage tracking?
|
||||
# Workspaces (per monitor would be nice)
|
||||
# A separate bar for both monitors
|
||||
# secondary monitor will have a vertical bar on the left side
|
||||
# Can contain more info with two bars
|
||||
let
|
||||
desktop = host == "oganesson";
|
||||
workspaces = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
};
|
||||
persistent-workspaces =
|
||||
if desktop
|
||||
then {
|
||||
"HDMI-A-1" = [1 2 3];
|
||||
"DP-1" = [4 5 6];
|
||||
}
|
||||
else {
|
||||
"eDP-1" = [1 2 3 4];
|
||||
};
|
||||
};
|
||||
monitors =
|
||||
if desktop
|
||||
then [
|
||||
"DP-1"
|
||||
"HDMI-A-1"
|
||||
]
|
||||
else [
|
||||
"eDP-1"
|
||||
];
|
||||
in {
|
||||
programs.waybar.settings.mainBar = {
|
||||
layer = "bottom";
|
||||
output = builtins.elemAt monitors 0;
|
||||
position = "top";
|
||||
name = "mainBar";
|
||||
margin-left = 8;
|
||||
margin-top = 5;
|
||||
margin-right =
|
||||
if desktop
|
||||
then 8
|
||||
else 5;
|
||||
mode = "dock";
|
||||
"gtk-layer-shell" = true;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"cava"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"group/hardware"
|
||||
"clock"
|
||||
"group/powerbtns"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = workspaces;
|
||||
|
||||
cava = {
|
||||
framerate = 30;
|
||||
autosens = 1;
|
||||
sensitivity = 1;
|
||||
bars = 14;
|
||||
lower_cutoff_freq = 50;
|
||||
higher_cutoff_freq = 10000;
|
||||
method = "pulse";
|
||||
source = "auto";
|
||||
hide_on_silence = true;
|
||||
stereo = true;
|
||||
reverse = true;
|
||||
bar_delimiter = 0;
|
||||
monstercat = false;
|
||||
waves = false;
|
||||
noise_reduction = 0.77;
|
||||
input_delay = 2;
|
||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/disk-icon"
|
||||
"memory"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
|
||||
"custom/disk-icon" = {
|
||||
exec = ''
|
||||
df /dev/disk/by-partlabel/disk-main-home /dev/disk/by-partlabel/disk-main-nix | awk '
|
||||
function format(size) {
|
||||
if (size >= 1024) return sprintf("%.1fTB", size / 1024)
|
||||
else return sprintf("%.1fGB", size)
|
||||
}
|
||||
$6 == "/home" {
|
||||
home_usage = $3 / 1024 / 1024
|
||||
home_total = $2 / 1024 / 1024
|
||||
home_percent = $5
|
||||
sub(/%/,"",home_percent)
|
||||
}
|
||||
$6 == "/nix" {
|
||||
nix_usage = $3 / 1024 / 1024
|
||||
nix_total = $2 / 1024 / 1024
|
||||
nix_percent = $5
|
||||
}
|
||||
END {
|
||||
printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %s / %s\\n/nix: %s / %s\", \"percentage\": \"%s\"}\n",
|
||||
format(home_usage), format(home_total), format(nix_usage), format(nix_total), home_percent
|
||||
}' | jq --unbuffered --compact-output
|
||||
'';
|
||||
interval = 60;
|
||||
return-type = "json";
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
max-length = 10;
|
||||
tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format = "CPU: {usage:0.1f}%";
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
on-click = "shutdown now";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/logout" = {
|
||||
on-click = "hyprctl dispatch exit";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/reboot" = {
|
||||
on-click = "reboot";
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"group/powerbtns" = {
|
||||
orientation = "horizontal";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
children-class = "power-drawer";
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"custom/power"
|
||||
"custom/logout"
|
||||
"custom/reboot"
|
||||
];
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
programs.waybar.settings.sideBar = {
|
||||
layer = "bottom";
|
||||
output =
|
||||
if desktop
|
||||
then builtins.elemAt monitors 1
|
||||
else builtins.elemAt monitors 0;
|
||||
position = "right";
|
||||
margin-top = 8;
|
||||
margin-right = 5;
|
||||
margin-bottom = 8;
|
||||
name = "sideBar";
|
||||
mode = "dock";
|
||||
"gtk-layer-shell" = true;
|
||||
|
||||
modules-left =
|
||||
if desktop
|
||||
then [
|
||||
"hyprland/workspaces"
|
||||
]
|
||||
else [
|
||||
"group/brightness"
|
||||
"battery"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"network"
|
||||
"group/audio"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = workspaces;
|
||||
|
||||
"pulseaudio/slider" = {
|
||||
orientation = "vertical";
|
||||
};
|
||||
|
||||
"group/audio" = {
|
||||
orientation = "vertical";
|
||||
modules = [
|
||||
"pulseaudio/slider"
|
||||
"pulseaudio"
|
||||
];
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-muted = " ";
|
||||
format-icons = {
|
||||
default = [
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
on-click-right = "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'";
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 30;
|
||||
format-wifi = " ";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
format-ethernet = " ";
|
||||
tooltip-format-ethernet = "{ifname}";
|
||||
format-disconnected = " ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'";
|
||||
};
|
||||
|
||||
battery = {
|
||||
bat = "BAT1";
|
||||
interval = 1;
|
||||
tooltip-format = "{capacity}%\nTil empty: {time}";
|
||||
tooltip-format-charging = "{capacity}%\nTil full: {time}";
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-charging = "";
|
||||
};
|
||||
|
||||
"group/brightness" = {
|
||||
orientation = "vertical";
|
||||
modules = [
|
||||
"backlight"
|
||||
"backlight/slider"
|
||||
];
|
||||
};
|
||||
backlight = {
|
||||
format = "";
|
||||
tooltip = "{percentage}%";
|
||||
};
|
||||
"backlight/slider" = {
|
||||
min = 10;
|
||||
max = 100;
|
||||
orientation = "vertical";
|
||||
rotate = 180;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
{scheme, ...}: let
|
||||
bg = {
|
||||
darkester = scheme.base00;
|
||||
darkest = scheme.base01;
|
||||
darker = scheme.base02;
|
||||
dark = scheme.base03;
|
||||
};
|
||||
fg = {
|
||||
lightester = scheme.base07;
|
||||
lightest = scheme.base06;
|
||||
lighter = scheme.base05;
|
||||
light = scheme.base04;
|
||||
};
|
||||
colors = {
|
||||
color0 = scheme.base08;
|
||||
color1 = scheme.base09;
|
||||
color2 = scheme.base0A;
|
||||
color3 = scheme.base0B;
|
||||
color4 = scheme.base0C;
|
||||
color5 = scheme.base0D;
|
||||
color6 = scheme.base0E;
|
||||
color7 = scheme.base0F;
|
||||
};
|
||||
in {
|
||||
programs.waybar.style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
font-family: "JetBrains Mono Nerd Font";
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-radius: 20px;
|
||||
border: 3px solid #${colors.color7};
|
||||
background: rgba(46,52,64,0.15);
|
||||
margin: 20px;
|
||||
}
|
||||
window#waybar.empty #window {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${fg.lightester};
|
||||
border-radius: 20px;
|
||||
color: #${bg.darkest};
|
||||
}
|
||||
|
||||
#cava {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px 3px 3px 6px;
|
||||
padding: 0px 15px 0px 15px;
|
||||
color: #${colors.color6};
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 3px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
padding: 0 15px 0 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#hardware {
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#custom-disk-icon, #cpu, #memory {
|
||||
margin-bottom: 4px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-disk-icon {
|
||||
color: #${colors.color4};
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #${colors.color1};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #${colors.color3};
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 10px 0 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#powerbtns {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 0 5px 0 10px;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: #${colors.color0};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-logout {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#custom-reboot {
|
||||
color: #${colors.color2};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#audio {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 10px 0;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #${colors.color4};
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#backlight-slider slider,
|
||||
#pulseaudio-slider slider {
|
||||
background: #${colors.color4};
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#backlight-slider trough,
|
||||
#pulseaudio-slider trough {
|
||||
min-width: 9px;
|
||||
min-height: 90px;
|
||||
border-radius: 8px;
|
||||
background: #343434;
|
||||
}
|
||||
|
||||
#backlight-slider highlight,
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: #2096C0;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #${colors.color3};
|
||||
font-size: 20px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 5px 6px;
|
||||
}
|
||||
|
||||
#brightness {
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 10px 0px 5px 0;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #${colors.color2};
|
||||
font-size: 18px;
|
||||
padding: 0 4px 0 0;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #${colors.color4};
|
||||
font-size: 20px;
|
||||
background: #${bg.dark};
|
||||
border-radius: 20px;
|
||||
margin: 3px;
|
||||
padding: 5px 0 5px 0px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
{self, ...}: {
|
||||
{lib, config, self, ...}: {
|
||||
options = {
|
||||
zshConfig.enable = lib.mkEnableOption "enables my zsh configuration";
|
||||
};
|
||||
config = lib.mkIf config.zshConfig.enable {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
@@ -184,4 +188,5 @@
|
||||
[ ! -f $FLAKEPATH/flake.nix ] && echo "WARNING: flake.nix not found at \$FLAKEPATH. Shell aliases for editing config files won't work correctly!" && echo "Edit the FLAKEPATH session variable in zshell.nix to point to the path where you saved the system configuration flake."
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{self, ...}: {
|
||||
{lib, config, self, ...}: {
|
||||
options = {
|
||||
homeFiles.enable = lib.mkEnableOption "enables declared custom files";
|
||||
};
|
||||
config = lib.mkIf config.homeFiles.enable {
|
||||
home.file.".config/neofetch/config.conf".text = ''
|
||||
username=$(whoami)
|
||||
name_length=''${#username}
|
||||
@@ -106,4 +110,5 @@
|
||||
|
||||
stdout="off"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
58
modules/home/hm-modules.nix
Normal file
58
modules/home/hm-modules.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
config,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./programs
|
||||
./environment
|
||||
./scripts
|
||||
./files.nix
|
||||
];
|
||||
|
||||
hyprlandConfig.enable = lib.mkDefault true;
|
||||
autojumpOpts.enable = lib.mkDefault true;
|
||||
stylixHomeOpts.enable = lib.mkDefault true;
|
||||
waybarConfig.enable = lib.mkDefault true;
|
||||
gtkOpts.enable = lib.mkDefault true;
|
||||
spicetifyOpts.enable = lib.mkDefault true;
|
||||
starshipConfig.enable = lib.mkDefault true;
|
||||
btopConfig.enable = lib.mkDefault true;
|
||||
swayncConfig.enable = lib.mkDefault true;
|
||||
userPkgs.enable = lib.mkDefault true;
|
||||
cavaOpts.enable = lib.mkDefault true;
|
||||
ezaOpts.enable = lib.mkDefault true;
|
||||
firefoxConfig.enable = lib.mkDefault true;
|
||||
fuzzelConfig.enable = lib.mkDefault true;
|
||||
fzfOpts.enable = lib.mkDefault true;
|
||||
gitConfig.enable = lib.mkDefault true;
|
||||
kittyConfig.enable = lib.mkDefault true;
|
||||
yaziConfig.enable = lib.mkDefault true;
|
||||
zshConfig.enable = lib.mkDefault true;
|
||||
homeFiles.enable = lib.mkDefault true;
|
||||
passConfig.enable = lib.mkDefault true;
|
||||
batOpts.enable = lib.mkDefault true;
|
||||
|
||||
pagedmovScripts.enable = lib.mkDefault true;
|
||||
pagedmovScripts.commandScripts.invoke.enable = lib.mkDefault true;
|
||||
pagedmovScripts.commandScripts.runbg.enable = lib.mkDefault true;
|
||||
pagedmovScripts.commandScripts.splash.enable = lib.mkDefault true;
|
||||
pagedmovScripts.commandScripts.toolbelt.enable = lib.mkDefault true;
|
||||
pagedmovScripts.commandScripts.viconf.enable = lib.mkDefault true;
|
||||
|
||||
pagedmovScripts.hyprlandControls.chpaper.enable = lib.mkDefault true;
|
||||
pagedmovScripts.hyprlandControls.scheck.enable = lib.mkDefault true;
|
||||
pagedmovScripts.hyprlandControls.chscheme.enable = lib.mkDefault true;
|
||||
pagedmovScripts.hyprlandControls.keyring.enable = lib.mkDefault true;
|
||||
pagedmovScripts.hyprlandControls.moveonscreen.enable = lib.mkDefault true;
|
||||
pagedmovScripts.hyprlandControls.switchmon.enable = lib.mkDefault true;
|
||||
|
||||
pagedmovScripts.nixShortcuts.garbage-collect.enable = lib.mkDefault true;
|
||||
pagedmovScripts.nixShortcuts.nsp.enable = lib.mkDefault true;
|
||||
pagedmovScripts.nixShortcuts.rebuild.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -27,10 +27,8 @@ in {
|
||||
} else {};
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
./programs
|
||||
./environment
|
||||
./scripts
|
||||
./files.nix
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
./hm-modules.nix
|
||||
];
|
||||
home = {
|
||||
username = "${username}";
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
autojumpOpts.enable = lib.mkEnableOption "enables my autojump options";
|
||||
};
|
||||
config = lib.mkIf config.autojumpOpts.enable {
|
||||
programs.autojump = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
{inputs, ...}: {
|
||||
{lib, config, inputs, ...}: {
|
||||
options = {
|
||||
batOpts.enable = lib.mkEnableOption "enables my bat options";
|
||||
};
|
||||
config = lib.mkIf config.batOpts.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
{lib, config, pkgs, ...}: {
|
||||
options = {
|
||||
btopConfig.enable = lib.mkEnableOption "enables my btop config";
|
||||
};
|
||||
config = lib.mkIf config.btopConfig.enable {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
|
||||
@@ -16,4 +20,5 @@
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [nvtopPackages.intel];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{lib, config, inputs, pkgs, ... }: {
|
||||
options = {
|
||||
cavaOpts.enable = lib.mkEnableOption "enables my cava settings";
|
||||
};
|
||||
config = lib.mkIf config.cavaOpts.enable {
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
ezaOpts.enable = lib.mkEnableOption "enables my eza options";
|
||||
};
|
||||
config = lib.mkIf config.ezaOpts.enable {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
@@ -6,4 +10,5 @@
|
||||
icons = "auto";
|
||||
git = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
nur,
|
||||
username,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
{lib, config, nur, username, self, ... }: {
|
||||
options = {
|
||||
firefoxConfig.enable = lib.mkEnableOption "enables my firefox configuration";
|
||||
};
|
||||
config = lib.mkIf config.firefoxConfig.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
@@ -124,4 +123,5 @@
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{lib, ...}: {
|
||||
{config, lib, ...}: {
|
||||
options = {
|
||||
fuzzelConfig.enable = lib.mkEnableOption "enables my fuzzel configuration";
|
||||
};
|
||||
config = lib.mkIf config.fuzzelConfig.enable {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -20,4 +24,5 @@
|
||||
colors.background = lib.mkForce "2e344080";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
fzfOpts.enable = lib.mkEnableOption "enables my fzf options";
|
||||
};
|
||||
config = lib.mkIf config.fzfOpts.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
{username, ...}: {
|
||||
{lib, config, username, ...}: {
|
||||
options = {
|
||||
gitConfig.enable = lib.mkEnableOption "enables my git configuration";
|
||||
};
|
||||
config = lib.mkIf config.gitConfig.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "${username}@gmail.com";
|
||||
userName = "${username}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
scheme,
|
||||
...
|
||||
}: {
|
||||
{lib, config, pkgs, scheme, ... }: {
|
||||
options = {
|
||||
kittyConfig.enable = lib.mkEnableOption "enables my kitty configuration";
|
||||
};
|
||||
config = lib.mkIf config.kittyConfig.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
@@ -70,4 +70,5 @@
|
||||
color15 #${scheme.base07}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
{username, ...}: let
|
||||
{lib, config, username, ...}: let
|
||||
home = "/home/${username}";
|
||||
in {
|
||||
options = {
|
||||
passConfig.enable = lib.mkEnableOption "enables my pass config";
|
||||
};
|
||||
config = lib.mkIf config.passConfig.enable {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PASSWORD_STORE_DIR = "${home}/.password-store";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
yaziConfig.enable = lib.mkEnableOption "enables my yazi config";
|
||||
};
|
||||
config = lib.mkIf config.yaziConfig.enable {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
host,
|
||||
lib,
|
||||
config,
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
@@ -16,10 +18,6 @@
|
||||
self = self;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
scheck = import ./commands/s_check.nix {
|
||||
self = self;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
runbg = import ./commands/runbg.nix {
|
||||
self = self;
|
||||
pkgs = pkgs;
|
||||
@@ -32,6 +30,7 @@
|
||||
self = self;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
scheck = import ./wm-controls/s_check.nix { self = self; pkgs = pkgs;};
|
||||
switchmon = import ./wm-controls/switchmon.nix {
|
||||
self = self;
|
||||
pkgs = pkgs;
|
||||
@@ -51,20 +50,56 @@
|
||||
};
|
||||
chpaper = import ./wm-controls/chpaper.nix {pkgs = pkgs;};
|
||||
in {
|
||||
home.packages = [
|
||||
chpaper
|
||||
chscheme
|
||||
keyring
|
||||
garbage-collect
|
||||
invoke
|
||||
rebuild
|
||||
nsp
|
||||
runbg
|
||||
scheck
|
||||
splash
|
||||
switchmon
|
||||
moveonscreen
|
||||
toolbelt
|
||||
viconf
|
||||
];
|
||||
options = {
|
||||
pagedmovScripts.enable = lib.mkEnableOption "enables pagedmov's scripts";
|
||||
|
||||
pagedmovScripts.commandScripts.invoke.enable =
|
||||
lib.mkEnableOption "enables the invoke command";
|
||||
pagedmovScripts.commandScripts.runbg.enable =
|
||||
lib.mkEnableOption "enables the runbg command - written by FrostPhoenix";
|
||||
pagedmovScripts.commandScripts.splash.enable =
|
||||
lib.mkEnableOption "enables the splash screen when opening a terminal";
|
||||
pagedmovScripts.commandScripts.toolbelt.enable =
|
||||
lib.mkEnableOption "enables the toolbelt command";
|
||||
pagedmovScripts.commandScripts.viconf.enable =
|
||||
lib.mkEnableOption "enables the viconf command";
|
||||
|
||||
pagedmovScripts.hyprlandControls.chpaper.enable =
|
||||
lib.mkEnableOption "enables the chpaper command";
|
||||
pagedmovScripts.hyprlandControls.scheck.enable =
|
||||
lib.mkEnableOption "enables the chpaper command";
|
||||
pagedmovScripts.hyprlandControls.chscheme.enable =
|
||||
lib.mkEnableOption "enables the chscheme command";
|
||||
pagedmovScripts.hyprlandControls.keyring.enable =
|
||||
lib.mkEnableOption "enables the keyring command";
|
||||
pagedmovScripts.hyprlandControls.moveonscreen.enable =
|
||||
lib.mkEnableOption "enables the moveonscreen command, makes sure that the edges of floating windows are always on screen";
|
||||
pagedmovScripts.hyprlandControls.switchmon.enable =
|
||||
lib.mkEnableOption "moves your cursor to the center of your second monitor; currently only supports two monitors";
|
||||
|
||||
pagedmovScripts.nixShortcuts.garbage-collect.enable =
|
||||
lib.mkEnableOption "enables the garbage-collect script, runs nixos garbage collection and empties the gtrash bin";
|
||||
pagedmovScripts.nixShortcuts.nsp.enable =
|
||||
lib.mkEnableOption "enables nsp, essentially an alias for 'nix-shell -p'";
|
||||
pagedmovScripts.nixShortcuts.rebuild.enable =
|
||||
lib.mkEnableOption "enables rebuild, an alias for 'sudo nixos-rebuild switch --flake $FLAKEPATH#$(hostname)'";
|
||||
};
|
||||
config = lib.mkIf config.pagedmovScripts.enable {
|
||||
home.packages = lib.optionals config.pagedmovScripts.commandScripts.invoke.enable [ invoke ]
|
||||
++ lib.optionals config.pagedmovScripts.commandScripts.runbg.enable [ runbg ]
|
||||
++ lib.optionals config.pagedmovScripts.commandScripts.splash.enable [ splash ]
|
||||
++ lib.optionals config.pagedmovScripts.commandScripts.toolbelt.enable [ toolbelt ]
|
||||
++ lib.optionals config.pagedmovScripts.commandScripts.viconf.enable [ viconf ]
|
||||
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.chpaper.enable [ chpaper ]
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.chpaper.enable [ scheck ]
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.chscheme.enable [ chscheme ]
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.keyring.enable [ keyring ]
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.moveonscreen.enable [ moveonscreen ]
|
||||
++ lib.optionals config.pagedmovScripts.hyprlandControls.switchmon.enable [ switchmon ]
|
||||
|
||||
++ lib.optionals config.pagedmovScripts.nixShortcuts.garbage-collect.enable [ garbage-collect ]
|
||||
++ lib.optionals config.pagedmovScripts.nixShortcuts.nsp.enable [ nsp ]
|
||||
++ lib.optionals config.pagedmovScripts.nixShortcuts.rebuild.enable [ rebuild ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
issue.enable = lib.mkEnableOption "enables custom /etc/issue splash screen for the tty";
|
||||
};
|
||||
config = lib.mkIf config.issue.enable {
|
||||
environment.etc."issue".text = ''
|
||||
|
||||
\e[38;5;27m▓▓▓▓ \e[38;5;81m▒▒▒▒ ▒▒▒▒
|
||||
@@ -26,4 +30,5 @@
|
||||
Run '\e[1;35mnixos-help\e[0m' for the NixOS manual.
|
||||
Run '\e[1;35mHyprland\e[0m' to enter the desktop environment.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
21
modules/sys/environment/nix.nix
Normal file
21
modules/sys/environment/nix.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{lib, config, ... }: {
|
||||
options = {
|
||||
nixSettings.enable = lib.mkEnableOption "enables my nixos settings";
|
||||
};
|
||||
config = lib.mkIf config.nixSettings.enable {
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
sddmOpts.enable = lib.mkEnableOption "enables custom sddm configuration";
|
||||
};
|
||||
config = lib.mkIf config.sddmOpts.enable {
|
||||
environment.systemPackages = [
|
||||
(
|
||||
pkgs.catppuccin-sddm.override {
|
||||
@@ -21,4 +26,5 @@
|
||||
theme = "catppuccin-mocha";
|
||||
package = pkgs.kdePackages.sddm;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,8 +2,14 @@
|
||||
pkgs,
|
||||
scheme,
|
||||
wallpaper,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
stylixOpts.enable = lib.mkEnableOption "enables custom stylix options";
|
||||
};
|
||||
config = lib.mkIf config.stylixOpts.enable {
|
||||
stylix = {
|
||||
enable = true;
|
||||
base16Scheme = scheme;
|
||||
@@ -43,4 +49,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, lib, config, ...}: {
|
||||
options = {
|
||||
# make this enabled by default!!!
|
||||
bootLoader.enable = lib.mkEnableOption "enables bootloader config";
|
||||
};
|
||||
config = lib.mkIf config.bootLoader.enable {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot.configurationLimit = 10;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
}: {
|
||||
imports =
|
||||
[(import ./bootloader.nix)]
|
||||
++ [(import ./network.nix)];
|
||||
++ [(import ./network.nix)]
|
||||
++ [(import ./powerprofiles.nix)];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{host, ...}: let
|
||||
{host, lib, config, ...}: let
|
||||
desktop = host == "oganesson";
|
||||
in {
|
||||
options = {
|
||||
networkModule.enable = lib.mkEnableOption "enables network configuration";
|
||||
};
|
||||
config = lib.mkIf config.networkModule.enable {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName =
|
||||
@@ -8,13 +12,13 @@ in {
|
||||
then "oganesson"
|
||||
else "mercury";
|
||||
hosts = {
|
||||
"192.168.1.201" = ["glasshaus"];
|
||||
"192.168.1.201" = ["xenon"];
|
||||
"192.168.1.111" = ["argon"];
|
||||
"192.168.1.223" = ["mercury"];
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [30000];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
51
modules/sys/hardware/powerprofiles.nix
Normal file
51
modules/sys/hardware/powerprofiles.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{lib, config, ... }: {
|
||||
options = {
|
||||
powerProfiles.enable = lib.mkEnableOption "enables power profiles";
|
||||
};
|
||||
config = lib.mkIf config.powerProfiles.enable {
|
||||
services = {
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["*"];
|
||||
settings.main = {
|
||||
capslock = "esc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageLow = 20;
|
||||
percentageCritical = 5;
|
||||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "performance";
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC = 500;
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT = 500;
|
||||
# INTEL_GPU_MAX_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
|
||||
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -18,5 +18,6 @@ in {
|
||||
++ [(import ./programs.nix)]
|
||||
++ [(import ./services.nix)]
|
||||
++ [(import ./nixvim)]
|
||||
++ [(import ./module-test.nix)]
|
||||
++ desktop_modules;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{pkgs, ...}: {
|
||||
{lib, config, pkgs, ...}: {
|
||||
options = {
|
||||
gamingPkgs.enable = lib.mkEnableOption "enables gaming packages";
|
||||
};
|
||||
config = lib.mkIf config.gamingPkgs.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
snes9x-gtk
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
steamOpts.enable = lib.mkEnableOption "enables steam configuration";
|
||||
};
|
||||
config = lib.mkIf config.steamOpts.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
11
modules/sys/software/module-test.nix
Normal file
11
modules/sys/software/module-test.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
testmodule.enable = lib.mkEnableOption "enables test module";
|
||||
};
|
||||
config = lib.mkIf config.testmodule.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
hello
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
{lib, config, pkgs, inputs, ... }: {
|
||||
options = {
|
||||
sysPkgs.enable = lib.mkEnableOption "enables default system packages";
|
||||
};
|
||||
config = lib.mkIf config.sysPkgs.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
alejandra
|
||||
alsa-lib
|
||||
@@ -22,7 +22,6 @@
|
||||
gnumake
|
||||
gst_all_1.gstreamer
|
||||
htop
|
||||
hyprland
|
||||
hyprland-workspaces
|
||||
hyprpicker
|
||||
imagemagick
|
||||
@@ -76,4 +75,5 @@
|
||||
file
|
||||
libvirt-glib
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
{lib, config, pkgs, ...}: {
|
||||
options = {
|
||||
sysProgs.enable = lib.mkEnableOption "enables default system programs";
|
||||
};
|
||||
config = lib.mkIf config.sysProgs.enable {
|
||||
programs = {
|
||||
hyprland.enable = true;
|
||||
zsh.enable = true;
|
||||
@@ -14,4 +18,5 @@
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{...}: {
|
||||
{lib, config, ...}: {
|
||||
options = {
|
||||
sysServices.enable = lib.mkEnableOption "enables default system services";
|
||||
};
|
||||
config = lib.mkIf config.sysServices.enable {
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
@@ -16,4 +20,5 @@
|
||||
allowSFTP = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{username, ...}: {
|
||||
{lib, config, username, ...}: {
|
||||
options = {
|
||||
virtOpts.enable = lib.mkEnableOption "enables virtualization";
|
||||
};
|
||||
config = lib.mkIf config.virtOpts.enable {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user