Compare commits

..

11 Commits

12 changed files with 223 additions and 89 deletions

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@ nix_file.tar.gz
nvim nvim
tmux/plugins tmux/plugins
modules/quickshell/quickshell/.qmlls.ini modules/quickshell/quickshell/.qmlls.ini
result

View File

@@ -95,6 +95,7 @@
alcom alcom
gcr gcr
qbittorrent qbittorrent
intel-gpu-tools
]; ];
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager is pretty good at managing dotfiles. The primary way to manage

View File

@@ -4,60 +4,62 @@ let
in in
{ {
# services.power-profiles-daemon.enable = true; # services.power-profiles-daemon.enable = true;
home.packages = [ pkgs.tlp-pd ]; # services.tlp = {
services.tlp = { # enable = true;
# settings = {
# CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave";
#
# # Wireless power saving
# WIFI_PWR_ON_BAT = "1";
#
# # USB autosuspend
# USB_AUTOSUSPEND = "1";
#
# # SATA drive power management
# SATA_LINKPWR_ON_BAT = "min_power";
#
# # PCI Express Active-State Power Management (ASPM)
# PCIE_ASPM_ON_BAT = "powersave";
#
# # Runtime Power Management for PCI(e) buses/devices
# RUNTIME_PM_ON_BAT = "auto";
#
# # Disable Bluetooth on battery
# # DEVICES_TO_DISABLE_ON_BAT = "bluetooth";
#
# # Restore brightness on battery
# RESTORE_BRIGHTNESS_ON_BAT = "1";
# CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
# # CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
# CPU_ENERGY_PERF_POLICY_ON_SAV = "power";
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# # PCIE_ASPM_ON_BAT = "powersave";
# CPU_SCALING_GOVERNOR_ON_AC = "balanced";
# PCIE_ASPM_ON_AC = "balanced";
# CPU_BOOST_ON_AC = 1;
# CPU_BOOST_ON_BAT = 0;
# CPU_BOOST_ON_SAV = 0;
# DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE = "bluetooth wifi wwan";
# INTEL_GPU_MIN_FREQ_ON_AC = 0;
# INTEL_GPU_MIN_FREQ_ON_BAT = 0;
# INTEL_GPU_MAX_FREQ_ON_AC = 2350;
# INTEL_GPU_MAX_FREQ_ON_BAT = 1100;
# INTEL_GPU_BOOST_FREQ_ON_BAT = 1100;
#
# TLP_DEFAULT_BATTERY_MODE = "SAV";
# CPU_HWP_DYN_BOOST_ON_AC = 1;
# CPU_HWP_DYN_BOOST_ON_BAT = 0;
# CPU_HWP_DYN_BOOST_ON_SAV = 0;
# PLATFORM_PROFILE_ON_AC = "balanced";
# PLATFORM_PROFILE_ON_BAT = "low-power";
# PLATFORM_PROFILE_ON_SAV = "quiet";
# 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; enable = true;
settings = {
CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave";
# Wireless power saving
WIFI_PWR_ON_BAT = "1";
# USB autosuspend
USB_AUTOSUSPEND = "1";
# SATA drive power management
SATA_LINKPWR_ON_BAT = "min_power";
# PCI Express Active-State Power Management (ASPM)
PCIE_ASPM_ON_BAT = "powersave";
# Runtime Power Management for PCI(e) buses/devices
RUNTIME_PM_ON_BAT = "auto";
# Disable Bluetooth on battery
# DEVICES_TO_DISABLE_ON_BAT = "bluetooth";
# Restore brightness on battery
RESTORE_BRIGHTNESS_ON_BAT = "1";
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
# CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_SAV = "power";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# PCIE_ASPM_ON_BAT = "powersave";
CPU_SCALING_GOVERNOR_ON_AC = "balanced";
PCIE_ASPM_ON_AC = "balanced";
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_BOOST_ON_SAV = 0;
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE = "bluetooth wifi wwan";
INTEL_GPU_MIN_FREQ_ON_AC = 0;
INTEL_GPU_MIN_FREQ_ON_BAT = 0;
INTEL_GPU_MAX_FREQ_ON_AC = 2350;
INTEL_GPU_MAX_FREQ_ON_BAT = 1100;
TLP_DEFAULT_BATTERY_MODE = "SAV";
CPU_HWP_DYN_BOOST_ON_AC = 1;
CPU_HWP_DYN_BOOST_ON_BAT = 0;
CPU_HWP_DYN_BOOST_ON_SAV = 0;
PLATFORM_PROFILE_ON_AC = "balanced";
PLATFORM_PROFILE_ON_BAT = "low-power";
PLATFORM_PROFILE_ON_SAV = "quiet";
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.thermald.enable = true;
services.upower = { services.upower = {
enable = true; enable = true;

View File

@@ -144,6 +144,9 @@ in
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git git
wget wget
# tlp-pd
brightnessctl
nvtopPackages.intel
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are

View File

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

View File

@@ -0,0 +1,137 @@
{
config,
lib,
inputs,
pkgs,
home,
system,
...
}:
# system: "base16"
# name: "Gruvbox dark, hard"
# author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)"
# variant: "dark"
let
cfg_hex = {
"01" = "#1d2021"; # base00
"02" = "#3c3836"; # base01
"03" = "#504945"; # base02
"04" = "#665c54"; # base03
"05" = "#bdae93"; # base04
"06" = "#d5c4a1"; # base05
"07" = "#ebdbb2"; # base06
"08" = "#fbf1c7"; # base07
"09" = "#fb4934"; # base08 (red)
"10" = "#fe8019"; # base09 (orange)
"11" = "#fabd2f"; # base0A (yellow)
"12" = "#b8bb26"; # base0B (green)
"13" = "#8ec07c"; # base0C (aqua/cyan)
"14" = "#83a598"; # base0D (blue)
"15" = "#d3869b"; # base0E (purple)
"16" = "#d65d0e"; # base0F (brown)
};
cfg_rgb = {
"01" = {
r = 29;
g = 32;
b = 33;
}; # base00
"02" = {
r = 60;
g = 56;
b = 54;
}; # base01
"03" = {
r = 80;
g = 73;
b = 69;
}; # base02
"04" = {
r = 102;
g = 92;
b = 84;
}; # base03
"05" = {
r = 189;
g = 174;
b = 147;
}; # base04
"06" = {
r = 213;
g = 196;
b = 161;
}; # base05
"07" = {
r = 235;
g = 219;
b = 178;
}; # base06
"08" = {
r = 251;
g = 241;
b = 199;
}; # base07
"09" = {
r = 251;
g = 73;
b = 52;
}; # base08 (red)
"10" = {
r = 254;
g = 128;
b = 25;
}; # base09 (orange)
"11" = {
r = 250;
g = 189;
b = 47;
}; # base0A (yellow)
"12" = {
r = 184;
g = 187;
b = 38;
}; # base0B (green)
"13" = {
r = 142;
g = 192;
b = 124;
}; # base0C (aqua/cyan)
"14" = {
r = 131;
g = 165;
b = 152;
}; # base0D (blue)
"15" = {
r = 211;
g = 134;
b = 155;
}; # base0E (purple)
"16" = {
r = 214;
g = 93;
b = 14;
}; # base0F (brown)
};
in
{
options.modules.base16 = {
hex = lib.mkOption {
type = lib.types.attrs;
description = ''
Hexadecimal color configuration for Gruvbox dark, hard Base16 theme.
'';
default = cfg_hex;
};
rgb = lib.mkOption {
type = lib.types.attrs;
description = ''
RGB color configuration for Gruvbox dark, hard Base16 theme.
'';
default = cfg_rgb;
};
};
config.modules.base16.hex = cfg_hex;
config.modules.base16.rgb = cfg_rgb;
}

View File

@@ -42,12 +42,15 @@ in
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
}; };
programs = { programs = {
hyprlock = {
enable = true;
};
wlogout = { wlogout = {
enable = true; enable = true;
layout = [ layout = [
{ {
"label" = "lock"; "label" = "lock";
"action" = "loginctl lock-session"; "action" = "hyprlock";
"text" = "Lock"; "text" = "Lock";
"keybind" = "l"; "keybind" = "l";
} }

View File

@@ -1,4 +1,12 @@
{ inputs, pkgs, ... }: {
inputs,
pkgs,
config,
...
}:
let
base16 = config.modules.base16;
in
{ {
home.packages = [ home.packages = [
pkgs.hyprcursor pkgs.hyprcursor
@@ -23,7 +31,8 @@
gaps_in = 1; gaps_in = 1;
gaps_out = 1; gaps_out = 1;
border_size = 1; border_size = 1;
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg "col.active_border" =
"rgb(${toString base16.rgb."06".r},${toString base16.rgb."06".g},${toString base16.rgb."06".b})";
# col.inactive_border = rgba(595959aa) # col.inactive_border = rgba(595959aa)
resize_on_border = false; resize_on_border = false;
allow_tearing = true; allow_tearing = true;

View File

@@ -28,7 +28,7 @@ in
config.programs.nixvim = lib.mkIf cfg.enable { config.programs.nixvim = lib.mkIf cfg.enable {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
colorschemes.tokyonight.enable = true; colorschemes.gruvbox-material.enable = true;
performance.byteCompileLua = { performance.byteCompileLua = {
enable = true; enable = true;
plugins = true; plugins = true;
@@ -69,7 +69,12 @@ in
enable = true; enable = true;
# lspServersToEnable = [ "qmlls" ]; # lspServersToEnable = [ "qmlls" ];
}; };
notify.enable = true; notify = {
enable = true;
settings = {
background_color = "#00000000";
};
};
mini-cursorword.enable = true; mini-cursorword.enable = true;
# mini-statusline.enable = true; # mini-statusline.enable = true;
lualine = { lualine = {

View File

@@ -12,6 +12,6 @@ in
enable = lib.mkEnableOption "youtube music"; enable = lib.mkEnableOption "youtube music";
}; };
config.home.packages = with pkgs; [ config.home.packages = with pkgs; [
youtube-music pear-desktop
]; ];
} }

View File

@@ -6,36 +6,6 @@
... ...
}: }:
let let
youtube-music = (
final: prev: {
youtube-music = prev.youtube-music.overrideAttrs (old: rec {
pname = "youtube-music";
version = "3a7d3ff73";
src = prev.fetchFromGitHub {
owner = "pear-devs";
repo = "pear-desktop";
rev = "3a7d3ff73de49fcf7e7051dd1bdf450db4b222bf";
sha256 = "sha256-Q/E37HzQR2Ghxs8vV7WNCXn+DqIhpjhY3SoW3OMITTs=";
};
postPatch =
let
patch = prev.fetchurl {
url = "https://github.com/pear-devs/pear-desktop/commit/25fccc9a62044ca7006f271a6a2520724e5720e1.patch";
hash = "sha256-WAiaqsWlOXyv7FRlvM0LUY17dwCI8BQsQdO1M4zYg7k=";
};
in
''
${prev.git}/bin/git apply -R -p1 < ${patch}
'';
pnpmDeps = prev.pnpm.fetchDeps {
inherit pname version src;
fetcherVersion = 2;
hash = "sha256-9arC2c92U2tILFCBIRcGo9iNaPbNefDDfR9lGaSS88E=";
};
});
}
);
pkgs_gamescope = import inputs.nixpkgs-gamescope { pkgs_gamescope = import inputs.nixpkgs-gamescope {
inherit system; inherit system;
config = { config = {

1
result
View File

@@ -1 +0,0 @@
/nix/store/fmxnvfib50cwy1jkr8l8jqy0z93k82kz-depotdownloader-2.7.4-unstable-2024-12-01