mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 17:28:33 +02:00
feat: update flake.lock, add eye-protection.nix
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.11";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.11";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
./ssh.nix
|
||||
./wallpaper.nix
|
||||
./xdg.nix
|
||||
./eye-protection.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
41
home/linux/desktop/eye-protection.nix
Normal file
41
home/linux/desktop/eye-protection.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
# Adjust the color temperature(& brightness) of your screen according to
|
||||
# your surroundings. This may help your eyes hurt less if you are
|
||||
# working in front of the screen at night.
|
||||
#
|
||||
# works fine with both x11 & wayland(hyprland)
|
||||
#
|
||||
# https://gitlab.com/chinstrap/gammastep
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
# add a gammastep icon in the system tray
|
||||
# has problem with wayland, so disable it
|
||||
tray = false;
|
||||
temperature = {
|
||||
day = 5700;
|
||||
night = 4000;
|
||||
};
|
||||
# https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample?ref_type=heads
|
||||
settings = {
|
||||
general = {
|
||||
fade = "1"; # gradually apply the new screen temperature/brightness over a couple of seconds.
|
||||
# it is a fake brightness adjustment obtained by manipulating the gamma ramps,
|
||||
# which means that it does not reduce the backlight of the screen.
|
||||
# Preferably only use it if your normal backlight adjustment is too coarse-grained.
|
||||
brightness-day = "1.0";
|
||||
brightness-night = "0.8";
|
||||
location-provider = "manual";
|
||||
|
||||
# by default, Redshift will use the current elevation of the sun
|
||||
# to determine whether it is daytime, night or in transition (dawn/dusk).
|
||||
# dawn-time = "6:00-8:45";
|
||||
# dusk-time = "18:35-20:15";
|
||||
};
|
||||
manual = {
|
||||
# China, Shenzhen
|
||||
lat = "22.5"; # latitude
|
||||
lon = "114.1"; # longitude
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"modules-left": [
|
||||
"custom/launcher",
|
||||
"temperature",
|
||||
"backlight",
|
||||
"wlr/workspaces"
|
||||
],
|
||||
"modules-center": [
|
||||
@@ -13,11 +14,11 @@
|
||||
"modules-right": [
|
||||
"mpd",
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"memory",
|
||||
"cpu",
|
||||
"network",
|
||||
"clock",
|
||||
"idle_inhibitor",
|
||||
"custom/powermenu",
|
||||
"tray"
|
||||
],
|
||||
@@ -50,7 +51,9 @@
|
||||
},
|
||||
"cpu": {
|
||||
"format": "\udb80\udf5b {usage}%",
|
||||
"interval": 1
|
||||
"interval": 1,
|
||||
"on-click-middle": "kitty btop",
|
||||
"on-click-right": "kitty btop"
|
||||
},
|
||||
"custom/launcher": {
|
||||
"format": "\uf313 ",
|
||||
@@ -122,8 +125,10 @@
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "睊 Disconnected",
|
||||
"format-disabled": "睊 Disabled",
|
||||
"format-alt": " {bandwidthUpBits} | {bandwidthDownBits}",
|
||||
"format-alt": " {bandwidthUpBytes} | {bandwidthDownBytes}",
|
||||
"tooltip-format": " {ifname} via {gwaddr}",
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "kitty nmtui"
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"format": "{volume}% {icon} {format_source}",
|
||||
@@ -156,6 +161,20 @@
|
||||
"format": "\uf2c9 {temperatureC}\u00b0C",
|
||||
"tooltip": false
|
||||
},
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
commandLineArgs = [
|
||||
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
|
||||
# (only supported by chromium/chrome at this time, not electron)
|
||||
"--gtk-version=4"
|
||||
"--gtk-version=5"
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
# "--enable-wayland-ime"
|
||||
"--enable-wayland-ime"
|
||||
|
||||
# enable hardware acceleration - vulkan api
|
||||
# "--enable-features=Vulkan"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.11";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
|
||||
Reference in New Issue
Block a user