try to use watt (and quickshell)
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -638,6 +638,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"quickshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758273351,
|
||||||
|
"narHash": "sha256-wOv1guIi9THD1NjOtBU2Xh/Avg9xv7nIjsfFSkr1NeQ=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "e9a574d919a89602d2868621576b2ccae54a5cb0",
|
||||||
|
"revCount": 675,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
@@ -645,6 +665,7 @@
|
|||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"quickshell": "quickshell",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"watt": "watt",
|
"watt": "watt",
|
||||||
|
12
flake.nix
12
flake.nix
@@ -27,14 +27,23 @@
|
|||||||
# secrets
|
# secrets
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# quickshell
|
||||||
|
quickshell = {
|
||||||
|
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
home-manager,
|
home-manager,
|
||||||
stylix,
|
stylix,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
|
quickshell,
|
||||||
...
|
...
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
let
|
let
|
||||||
@@ -50,7 +59,6 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./hosts/spectre-x360-2018
|
./hosts/spectre-x360-2018
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
inputs.watt.nixosModules.default
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
@@ -73,7 +81,6 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./hosts/mobile-usb
|
./hosts/mobile-usb
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
inputs.watt.nixosModules.default
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
@@ -97,7 +104,6 @@
|
|||||||
./hosts/yoga-7-pro
|
./hosts/yoga-7-pro
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
inputs.watt.nixosModules.default
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
36
modules/home-manager/quickshell/default.nix
Normal file
36
modules/home-manager/quickshell/default.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
builtins,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.nix-config.quickshell;
|
||||||
|
qs = inputs.quickshell.packages.x86_64-linux.default;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.nix-config.quickshell.enable = lib.mkEnableOption {
|
||||||
|
name = "quickshell";
|
||||||
|
description = "Whether to enable quickshell.";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = [
|
||||||
|
qs
|
||||||
|
pkgs.qt6.qtimageformats
|
||||||
|
pkgs.qt6.qt5compat
|
||||||
|
pkgs.qt6.qtmultimedia
|
||||||
|
pkgs.qt6.qtdeclarative
|
||||||
|
pkgs.qt6.qtsvg
|
||||||
|
pkgs.qt6.qtwayland
|
||||||
|
pkgs.qt6.qtbase
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
# add the quickshell config (whole directory) to XDG_CONFIG_HOME
|
||||||
|
# home.file.".config/quickshell/config".source = ./config;
|
||||||
|
};
|
||||||
|
}
|
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -15,44 +16,50 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.watt.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
services.tlp = {
|
# services.tlp = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
settings = {
|
# settings = {
|
||||||
# processor chooses frequencies itself but respects the limits set by the user
|
# # processor chooses frequencies itself but respects the limits set by the user
|
||||||
CPU_DRIVER_OPMODE_ON_AC = "guided";
|
# CPU_DRIVER_OPMODE_ON_AC = "guided";
|
||||||
CPU_DRIVER_OPMODE_ON_BAT = "guided";
|
# CPU_DRIVER_OPMODE_ON_BAT = "guided";
|
||||||
|
|
||||||
# governor dictates global behavior of the CPU
|
# # governor dictates global behavior of the CPU
|
||||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
|
||||||
# energy performance policy (EPP) sets the energy/performance balance
|
# # energy performance policy (EPP) sets the energy/performance balance
|
||||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
# CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
|
||||||
|
|
||||||
# clock speeds reported by `sudo tlp-stat`
|
# # clock speeds reported by `sudo tlp-stat`
|
||||||
# 623377 [kHz] and 5090910 [kHz]
|
# # 623377 [kHz] and 5090910 [kHz]
|
||||||
# CPU_SCALING_MIN_FREQ_ON_AC = 623377;
|
# # CPU_SCALING_MIN_FREQ_ON_AC = 623377;
|
||||||
# CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
|
# # CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
|
||||||
# CPU_SCALING_MIN_FREQ_ON_BAT = 0;
|
# # CPU_SCALING_MIN_FREQ_ON_BAT = 0;
|
||||||
# # reduce max frequency on battery to save power
|
# # # reduce max frequency on battery to save power
|
||||||
# CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
|
# # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
|
||||||
|
|
||||||
# Allow the CPU to boost
|
# # Allow the CPU to boost
|
||||||
CPU_BOOST_ON_AC = 1;
|
# CPU_BOOST_ON_AC = 1;
|
||||||
CPU_BOOST_ON_BAT = 1;
|
# CPU_BOOST_ON_BAT = 1;
|
||||||
|
|
||||||
|
|
||||||
RADEON_DPM_PERF_LEVEL_ON_AC = "high";
|
# RADEON_DPM_PERF_LEVEL_ON_AC = "high";
|
||||||
WIFI_PWR_ON_BAT = "off";
|
# WIFI_PWR_ON_BAT = "off";
|
||||||
|
|
||||||
|
# # enable battery charge thresholds on the default battery
|
||||||
|
# STOP_CHARGE_THRESH_BAT0 = 1;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# enable battery charge thresholds on the default battery
|
|
||||||
STOP_CHARGE_THRESH_BAT0 = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
systemd.sleep.extraConfig = ''
|
systemd.sleep.extraConfig = ''
|
||||||
@@ -61,6 +68,28 @@
|
|||||||
AllowHybridSleep=yes
|
AllowHybridSleep=yes
|
||||||
AllowSuspendThenHibernate=yes
|
AllowSuspendThenHibernate=yes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
services.watt = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
battery_charge_thresholds = [
|
||||||
|
40
|
||||||
|
80
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# write the watt-config under /etc/watt.toml
|
||||||
|
|
||||||
|
|
||||||
|
services.irqbalance = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.thermald = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, nixpkgs, nixpkgs-unstable, lib, ... }:
|
||||||
with lib.hm.gvariant;
|
with lib.hm.gvariant;
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
@@ -9,6 +9,9 @@ with lib.hm.gvariant;
|
|||||||
scale = "1.6";
|
scale = "1.6";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
quickshell = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -31,6 +34,7 @@ with lib.hm.gvariant;
|
|||||||
../../modules/home-manager/notifications.nix
|
../../modules/home-manager/notifications.nix
|
||||||
../../modules/home-manager/obsidian.nix
|
../../modules/home-manager/obsidian.nix
|
||||||
../../modules/home-manager/owncloud-client.nix
|
../../modules/home-manager/owncloud-client.nix
|
||||||
|
../../modules/home-manager/quickshell
|
||||||
../../modules/home-manager/ssh.nix
|
../../modules/home-manager/ssh.nix
|
||||||
../../modules/home-manager/stylix.nix
|
../../modules/home-manager/stylix.nix
|
||||||
../../modules/home-manager/thunderbird.nix
|
../../modules/home-manager/thunderbird.nix
|
||||||
|
Reference in New Issue
Block a user