Add worktimer and throttled config
This commit is contained in:
parent
89ce0321bb
commit
2d8ea0f39c
70
flake.lock
70
flake.lock
|
@ -89,6 +89,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"worktimer",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
|
@ -339,15 +360,15 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730760028,
|
||||
"narHash": "sha256-xaJjL4oiidBSZDu2PKB9/iq+YMqQWZqPWdT/7IZJXhQ=",
|
||||
"owner": "thomasave",
|
||||
"lastModified": 1702831324,
|
||||
"narHash": "sha256-bpDHKBDBcuMO14FFdBCEfsW26hzu2lby6xtfoU0jKW4=",
|
||||
"owner": "ahbnr",
|
||||
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
||||
"rev": "4adc2939344de0bcf99cb6c6a36dce892474dc99",
|
||||
"rev": "58a01fe62f5a71778bffaeb9929a118b4be0d222",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "thomasave",
|
||||
"owner": "ahbnr",
|
||||
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -432,6 +453,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1730200266,
|
||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1730464205,
|
||||
|
@ -480,7 +517,8 @@
|
|||
"hyprsplit": "hyprsplit",
|
||||
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nur": "nur"
|
||||
"nur": "nur",
|
||||
"worktimer": "worktimer"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -513,6 +551,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"worktimer": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730850710,
|
||||
"narHash": "sha256-+KFMM9qG8mTPqUd7Z/NV2/QYCuXPQQ93XPT/d8qA/4w=",
|
||||
"ref": "cli",
|
||||
"rev": "88138dc783289443c6723852fb921d4a41edb097",
|
||||
"revCount": 3,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
},
|
||||
"original": {
|
||||
"ref": "cli",
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -6,7 +6,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-06cb-009a-fingerprint-sensor = {
|
||||
url = "github:thomasave/nixos-06cb-009a-fingerprint-sensor";
|
||||
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland = {
|
||||
|
@ -14,12 +14,6 @@
|
|||
url = "https://github.com/hyprwm/Hyprland";
|
||||
submodules = true;
|
||||
};
|
||||
# split-monitor-workspaces = {
|
||||
# type = "git";
|
||||
# url = "https://github.com/Duckonaut/split-monitor-workspaces";
|
||||
# inputs.hyprland.follows = "hyprland";
|
||||
# ref = "fix/hyprutils";
|
||||
# };
|
||||
hyprsplit = {
|
||||
type = "git";
|
||||
url = "https://github.com/shezdy/hyprsplit";
|
||||
|
@ -28,9 +22,14 @@
|
|||
nur.url = "github:nix-community/NUR";
|
||||
ags.url = "github:Aylur/ags";
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
worktimer = {
|
||||
type = "git";
|
||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||
ref = "cli";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, nur, nixos-06cb-009a-fingerprint-sensor, ... }@inputs:
|
||||
outputs = { nixpkgs, home-manager, nur, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
@ -115,10 +114,7 @@
|
|||
Riva = { user = "user"; };
|
||||
Kell = { user = "user"; };
|
||||
Aloria = { user = "user"; };
|
||||
Arendia = { user = "user"; modules = [
|
||||
nixos-06cb-009a-fingerprint-sensor.nixosModules.open-fprintd
|
||||
nixos-06cb-009a-fingerprint-sensor.nixosModules.python-validity
|
||||
];};
|
||||
Arendia = { user = "user"; };
|
||||
};
|
||||
in
|
||||
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
targets.genericLinux.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [ htop waypipe ];
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
waypipe
|
||||
inputs.worktimer.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||
|
|
|
@ -17,7 +17,66 @@ in {
|
|||
zramSwap.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
||||
services.throttled.enable = true;
|
||||
services.throttled = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
[GENERAL]
|
||||
# Enable or disable the script execution
|
||||
Enabled: True
|
||||
# SYSFS path for checking if the system is running on AC power
|
||||
Sysfs_Power_Path: /sys/class/power_supply/AC*/online
|
||||
# Auto reload config on changes
|
||||
Autoreload: True
|
||||
|
||||
## Settings to apply while connected to Battery power
|
||||
[BATTERY]
|
||||
# Update the registers every this many seconds
|
||||
Update_Rate_s: 30
|
||||
# Max package power for time window #1
|
||||
PL1_Tdp_W: 29
|
||||
# Time window #1 duration
|
||||
PL1_Duration_s: 28
|
||||
# Max package power for time window #2
|
||||
PL2_Tdp_W: 44
|
||||
# Time window #2 duration
|
||||
PL2_Duration_S: 0.002
|
||||
# Max allowed temperature before throttling
|
||||
Trip_Temp_C: 85
|
||||
# Set cTDP to normal=0, down=1 or up=2 (EXPERIMENTAL)
|
||||
cTDP: 0
|
||||
# Disable BDPROCHOT (EXPERIMENTAL)
|
||||
Disable_BDPROCHOT: False
|
||||
|
||||
## Settings to apply while connected to AC power
|
||||
[AC]
|
||||
# Update the registers every this many seconds
|
||||
Update_Rate_s: 5
|
||||
# Max package power for time window #1
|
||||
PL1_Tdp_W: 44
|
||||
# Time window #1 duration
|
||||
PL1_Duration_s: 28
|
||||
# Max package power for time window #2
|
||||
PL2_Tdp_W: 44
|
||||
# Time window #2 duration
|
||||
PL2_Duration_S: 0.002
|
||||
# Max allowed temperature before throttling
|
||||
Trip_Temp_C: 95
|
||||
# Set HWP energy performance hints to 'performance' on high load (EXPERIMENTAL)
|
||||
# Uncomment only if you really want to use it
|
||||
# HWP_Mode: False
|
||||
# Set cTDP to normal=0, down=1 or up=2 (EXPERIMENTAL)
|
||||
cTDP: 0
|
||||
# Disable BDPROCHOT (EXPERIMENTAL)
|
||||
Disable_BDPROCHOT: False
|
||||
|
||||
[UNDERVOLT]
|
||||
CORE: -105
|
||||
GPU: -85
|
||||
CACHE: -105
|
||||
UNCORE: -85
|
||||
ANALOGIO: 0
|
||||
'';
|
||||
};
|
||||
|
||||
networking.hostId = "b6c5c9af";
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
|
||||
|
@ -38,17 +97,15 @@ in {
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "simple";
|
||||
};
|
||||
services.open-fprintd.enable = true;
|
||||
services.python-validity.enable = true;
|
||||
# services.fprintd = {
|
||||
# enable = true;
|
||||
# tod = {
|
||||
# enable = true;
|
||||
# driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
|
||||
# calib-data-file = ./calib-data.bin;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
# tod = {
|
||||
# enable = true;
|
||||
# driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
|
||||
# calib-data-file = ./calib-data.bin;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
|
||||
# virtualisation
|
||||
|
@ -70,12 +127,13 @@ in {
|
|||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
CPU_MAX_PERF_ON_BAT = 40;
|
||||
|
||||
#Optional helps save long term battery health
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
|
||||
START_CHARGE_THRESH_BAT1 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT1 = 80; # 80 and above it stops charging
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue