- Commented out portainer.nix in configuration.nix for future use.
- Created portainer.nix for container management configuration. - Added 120hz.sh and 60hz.sh scripts for display refresh rate switching. - Enhanced plasma/home.nix with power management settings.
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
./zsh.nix
|
||||
./neovim.nix
|
||||
./packages.nix
|
||||
#./portainer.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
|
||||
@ -54,6 +54,7 @@
|
||||
sqlite
|
||||
|
||||
#Desktop Applications
|
||||
drawio
|
||||
jetbrains.datagrip
|
||||
ryubing
|
||||
vlc
|
||||
|
||||
32
modules/portainer.nix
Normal file
32
modules/portainer.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
containers.portainer = {
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
|
||||
config = { pkgs, ... }: {
|
||||
services.docker.enable = true;
|
||||
|
||||
systemd.services.portainer = {
|
||||
description = "Portainer Container Manager";
|
||||
after = [ "docker.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.docker}/bin/docker run \
|
||||
-d \
|
||||
--name portainer \
|
||||
-p 9000:9000 \
|
||||
-p 9443:9443 \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v portainer_data:/data \
|
||||
portainer/portainer-ce:latest
|
||||
'';
|
||||
ExecStop = "${pkgs.docker}/bin/docker stop portainer";
|
||||
Restart = "unless-stopped";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9000 9443 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
2
other/120hz.sh
Executable file
2
other/120hz.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
kscreen-doctor output.1.mode.1
|
||||
2
other/60hz.sh
Executable file
2
other/60hz.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
kscreen-doctor output.1.mode.2
|
||||
@ -52,6 +52,72 @@
|
||||
}
|
||||
];
|
||||
|
||||
powerdevil = {
|
||||
# On AC power (plugged in): Minimal power saving
|
||||
AC = {
|
||||
powerProfile = "performance";
|
||||
#turnOffDisplay.idleTimeout = 900; # 15 min idle
|
||||
autoSuspend = {
|
||||
action = "nothing";
|
||||
};
|
||||
dimDisplay.enable = false;
|
||||
turnOffDisplay.idleTimeout = "never";
|
||||
};
|
||||
|
||||
# Normal battery: Balanced saving
|
||||
battery = {
|
||||
powerProfile = "balanced";
|
||||
#turnOffDisplay.idleTimeout = 300; # 5 min
|
||||
autoSuspend = {
|
||||
action = "nothing";
|
||||
};
|
||||
whenLaptopLidClosed = "sleep";
|
||||
dimDisplay.enable = false;
|
||||
turnOffDisplay.idleTimeout = "never";
|
||||
};
|
||||
|
||||
# Low battery (e.g., <10%): Critical actions
|
||||
lowBattery = {
|
||||
powerProfile = "powerSaving";
|
||||
autoSuspend = {
|
||||
action = "sleep";
|
||||
idleTimeout = 300; # 5 min idle
|
||||
};
|
||||
whenLaptopLidClosed = "shutDown";
|
||||
dimDisplay = {
|
||||
idleTimeout = 60;
|
||||
};
|
||||
displayBrightness = 30; #Go to 30% display Brightness
|
||||
turnOffDisplay.idleTimeout = 120;
|
||||
};
|
||||
|
||||
# Thresholds for "lowBattery" state
|
||||
batteryLevels = {
|
||||
lowLevel = 10;
|
||||
criticalLevel = 5;
|
||||
criticalAction = "sleep";
|
||||
};
|
||||
};
|
||||
|
||||
workspace = {
|
||||
theme = "WhiteSur-dark";
|
||||
colorScheme = "BreezeDark";
|
||||
cursor = {
|
||||
theme = "Breeze_Light";
|
||||
size = 24;
|
||||
};
|
||||
wallpaper = /home/${username}/NixOS/other/wallpaper2.png;
|
||||
soundTheme = "freedesktop";
|
||||
iconTheme = "Breeze-LaCapitaine-apps";
|
||||
splashScreen = {
|
||||
theme = "a2n.kuro";
|
||||
};
|
||||
windowDecorations = {
|
||||
library = "org.kde.kwin.aurorae";
|
||||
theme = "__aurorae__svg__Nordic";
|
||||
};
|
||||
};
|
||||
|
||||
shortcuts = {
|
||||
# ActivityManager.switch-to-activity-0f8d8349-5b1b-4b77-bfa5-22829bfaf459 = [ ];
|
||||
# ActivityManager.switch-to-activity-7dbb43d7-7e06-4b20-907c-a1dbf4afe6c7 = [ ];
|
||||
@ -301,24 +367,7 @@
|
||||
# wacomtablet."Toggle touch tool" = "Meta+Ctrl+T";
|
||||
yakuake.toggle-window-state = "Meta+F12";
|
||||
};
|
||||
workspace = {
|
||||
theme = "WhiteSur-dark";
|
||||
colorScheme = "BreezeDark";
|
||||
cursor = {
|
||||
theme = "Breeze_Light";
|
||||
size = 24;
|
||||
};
|
||||
wallpaper = /home/${username}/NixOS/other/wallpaper2.png;
|
||||
soundTheme = "freedesktop";
|
||||
iconTheme = "Breeze-LaCapitaine-apps";
|
||||
splashScreen = {
|
||||
theme = "a2n.kuro";
|
||||
};
|
||||
windowDecorations = {
|
||||
library = "org.kde.kwin.aurorae";
|
||||
theme = "__aurorae__svg__Nordic";
|
||||
};
|
||||
};
|
||||
|
||||
configFile = {
|
||||
# baloofilerc.General.dbVersion = 2;
|
||||
# baloofilerc.General."exclude filters" = "*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.tfstate*,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.terraform,.venv,venv,core-dumps,lost+found";
|
||||
|
||||
Reference in New Issue
Block a user