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"
|
"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": {
|
"fzgo": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
@ -339,15 +360,15 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730760028,
|
"lastModified": 1702831324,
|
||||||
"narHash": "sha256-xaJjL4oiidBSZDu2PKB9/iq+YMqQWZqPWdT/7IZJXhQ=",
|
"narHash": "sha256-bpDHKBDBcuMO14FFdBCEfsW26hzu2lby6xtfoU0jKW4=",
|
||||||
"owner": "thomasave",
|
"owner": "ahbnr",
|
||||||
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
||||||
"rev": "4adc2939344de0bcf99cb6c6a36dce892474dc99",
|
"rev": "58a01fe62f5a71778bffaeb9929a118b4be0d222",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "thomasave",
|
"owner": "ahbnr",
|
||||||
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
"repo": "nixos-06cb-009a-fingerprint-sensor",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -432,6 +453,22 @@
|
||||||
"type": "github"
|
"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": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730464205,
|
"lastModified": 1730464205,
|
||||||
|
@ -480,7 +517,8 @@
|
||||||
"hyprsplit": "hyprsplit",
|
"hyprsplit": "hyprsplit",
|
||||||
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nur": "nur"
|
"nur": "nur",
|
||||||
|
"worktimer": "worktimer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
@ -513,6 +551,26 @@
|
||||||
"type": "github"
|
"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": {
|
"xdph": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprland-protocols": [
|
"hyprland-protocols": [
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -6,7 +6,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixos-06cb-009a-fingerprint-sensor = {
|
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";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
|
@ -14,12 +14,6 @@
|
||||||
url = "https://github.com/hyprwm/Hyprland";
|
url = "https://github.com/hyprwm/Hyprland";
|
||||||
submodules = true;
|
submodules = true;
|
||||||
};
|
};
|
||||||
# split-monitor-workspaces = {
|
|
||||||
# type = "git";
|
|
||||||
# url = "https://github.com/Duckonaut/split-monitor-workspaces";
|
|
||||||
# inputs.hyprland.follows = "hyprland";
|
|
||||||
# ref = "fix/hyprutils";
|
|
||||||
# };
|
|
||||||
hyprsplit = {
|
hyprsplit = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "https://github.com/shezdy/hyprsplit";
|
url = "https://github.com/shezdy/hyprsplit";
|
||||||
|
@ -28,9 +22,14 @@
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
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
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
@ -115,10 +114,7 @@
|
||||||
Riva = { user = "user"; };
|
Riva = { user = "user"; };
|
||||||
Kell = { user = "user"; };
|
Kell = { user = "user"; };
|
||||||
Aloria = { user = "user"; };
|
Aloria = { user = "user"; };
|
||||||
Arendia = { user = "user"; modules = [
|
Arendia = { user = "user"; };
|
||||||
nixos-06cb-009a-fingerprint-sensor.nixosModules.open-fprintd
|
|
||||||
nixos-06cb-009a-fingerprint-sensor.nixosModules.python-validity
|
|
||||||
];};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
|
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
|
||||||
|
|
|
@ -16,7 +16,11 @@
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = true;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
programs.home-manager.enable = 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 = {
|
home.sessionVariables = {
|
||||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||||
|
|
|
@ -17,7 +17,66 @@ in {
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
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.hostId = "b6c5c9af";
|
||||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
|
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
|
||||||
|
@ -38,17 +97,15 @@ in {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Type = "simple";
|
serviceConfig.Type = "simple";
|
||||||
};
|
};
|
||||||
services.open-fprintd.enable = true;
|
services.fprintd = {
|
||||||
services.python-validity.enable = true;
|
enable = true;
|
||||||
# services.fprintd = {
|
# tod = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# tod = {
|
# driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
|
||||||
# enable = true;
|
# calib-data-file = ./calib-data.bin;
|
||||||
# driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
|
# };
|
||||||
# calib-data-file = ./calib-data.bin;
|
# };
|
||||||
# };
|
};
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
|
|
||||||
# virtualisation
|
# virtualisation
|
||||||
|
@ -70,12 +127,13 @@ in {
|
||||||
CPU_MIN_PERF_ON_AC = 0;
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
CPU_MAX_PERF_ON_AC = 100;
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
CPU_MIN_PERF_ON_BAT = 0;
|
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
|
#Optional helps save long term battery health
|
||||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
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