enable nix gc daily
This commit is contained in:
parent
1d539039ae
commit
683bd41f4f
@ -6,6 +6,8 @@
|
|||||||
./git.nix
|
./git.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
|
./librewolf.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
|
./waybar.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ in {
|
|||||||
general {
|
general {
|
||||||
gaps_in = 0
|
gaps_in = 0
|
||||||
gaps_out = -1
|
gaps_out = -1
|
||||||
boarder_size = 0
|
border_size = 0
|
||||||
layout = master
|
layout = master
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,5 +35,6 @@ in {
|
|||||||
|
|
||||||
$SUPER = ${modifier};
|
$SUPER = ${modifier};
|
||||||
bind = $SUPER, Q, exec, kitty
|
bind = $SUPER, Q, exec, kitty
|
||||||
|
bind = $SUPER, F, exec, librewolf
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
"ui.use_activity_cursor" = true;
|
"ui.use_activity_cursor" = true;
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
429
home/waybar.nix
Normal file
429
home/waybar.nix
Normal file
@ -0,0 +1,429 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
xdg.configFile."waybar/config".text = /* json */ ''
|
||||||
|
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "bottom",
|
||||||
|
"height": 35,
|
||||||
|
"spacing": 4,
|
||||||
|
"margin-top": 0,
|
||||||
|
"margin-bottom":0,
|
||||||
|
|
||||||
|
// Choose the order of the modules
|
||||||
|
|
||||||
|
"modules-left":[ "custom/launcher", "wlr/taskbar"],
|
||||||
|
"modules-center":["custom/media"],
|
||||||
|
"modules-right":["backlight", "battery", "battery#bat2", "idle_inhibitor", "custom/updater", "pulseaudio", "custom/snip", "custom/wallpaper", "tray", "clock", "custom/power"],
|
||||||
|
// Modules configuration
|
||||||
|
|
||||||
|
"wlr/taskbar": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"icon-size": 20,
|
||||||
|
"icon-theme": "Star",
|
||||||
|
"tooltip-format": "{title}",
|
||||||
|
"on-click": "activate",
|
||||||
|
"on-click-middle": "close",
|
||||||
|
"on-click-right": "minimize"
|
||||||
|
},
|
||||||
|
"keyboard-state": {
|
||||||
|
"numlock": true,
|
||||||
|
"capslock": true,
|
||||||
|
"format": " {name} {icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"locked": "",
|
||||||
|
"unlocked": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sway/language": {
|
||||||
|
"format": " {}",
|
||||||
|
},
|
||||||
|
"idle_inhibitor": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"activated": "",
|
||||||
|
"deactivated": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 20,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
// "timezone": "America/New_York",
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "{usage}% ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": "{}% "
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
// "thermal-zone": 2,
|
||||||
|
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||||
|
"critical-threshold": 80,
|
||||||
|
// "format-critical": "{temperatureC}°C {icon}",
|
||||||
|
"format": "{temperatureC}°C {icon}",
|
||||||
|
"format-icons": ["", "", ""]
|
||||||
|
},
|
||||||
|
"backlight": {
|
||||||
|
// "device": "acpi_video1",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": ["", ""],
|
||||||
|
"on-click": "bash $HOME/.config/system_scripts/brightness up",
|
||||||
|
"on-click-right": "bash $HOME/.config/system_scripts/brightness down",
|
||||||
|
"on-scroll-up": "",
|
||||||
|
"on-scroll-down": ""
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-charging": "{capacity}% ",
|
||||||
|
"format-plugged": "{capacity}% ",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
// "format-good": "", // An empty format will hide the module
|
||||||
|
// "format-full": "",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"battery#bat2": {
|
||||||
|
"bat": "CMB1"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
"format-ethernet": "Connected ",
|
||||||
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
|
"format-linked": "{ifname} (No IP) ",
|
||||||
|
"format-disconnected": "Disconnected ⚠",
|
||||||
|
"format-alt": "{ifname}: {ipaddr}/{cidr}",
|
||||||
|
"on-click-right": "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-bluetooth": "{volume}% {icon}",
|
||||||
|
"format-bluetooth-muted": "{icon} {format_source}",
|
||||||
|
"format-muted": "{format_source}",
|
||||||
|
"format-source": "",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "bash $HOME/.config/system_scripts/volume up",
|
||||||
|
"on-click-right": "bash $HOME/.config/system_scripts/volume down",
|
||||||
|
"on-scroll-up": "",
|
||||||
|
"on-scroll-down": ""
|
||||||
|
},
|
||||||
|
"custom/media": {
|
||||||
|
"format": "{icon} {}",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 30,
|
||||||
|
"format-icons": {
|
||||||
|
"spotify": " ",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
|
"escape": true,
|
||||||
|
"exec": "$HOME/.config/system_scripts/mediaplayer.py 2> /dev/null",
|
||||||
|
"on-click": "playerctl play-pause"
|
||||||
|
},
|
||||||
|
"custom/launcher":{
|
||||||
|
"format": "",
|
||||||
|
"on-click": "wofi --show drun",
|
||||||
|
"on-click-right": "killall wofi"
|
||||||
|
},
|
||||||
|
"custom/power":{
|
||||||
|
"format": " ",
|
||||||
|
"on-click": "nwg-bar",
|
||||||
|
"on-click-right": "killall nwg-bar"
|
||||||
|
},
|
||||||
|
"custom/updater":{
|
||||||
|
"format": "{} Updates",
|
||||||
|
"exec": "checkupdates | wc -l",
|
||||||
|
"exec-if": "[[ $(checkupdates | wc -l) != 0 ]]",
|
||||||
|
"interval": 15,
|
||||||
|
"on-click": "alacritty -e yay -Syu"
|
||||||
|
},
|
||||||
|
"custom/snip":{
|
||||||
|
"format": "",
|
||||||
|
"on-click": "grimshot --notify save area $HOME/Pictures/$(zenity --entry --text 'Set filename:' --entry-text '.png')"
|
||||||
|
},
|
||||||
|
"custom/wallpaper":{
|
||||||
|
"format": "",
|
||||||
|
"on-click": "bash ~/.config/system_scripts/pkill_bc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
xdg.configFile."waybar/style.css".text = /* css */ ''
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: Material, Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
min-height: 0;
|
||||||
|
/*border-radius: 20px;*/
|
||||||
|
|
||||||
|
}
|
||||||
|
window#waybar {
|
||||||
|
background-image: linear-gradient(to right, #000000 0%, #434343 51%, #000000 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
background: #1f1f1f;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: lightblue;
|
||||||
|
color: black;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background: #1f1f1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused:hover {
|
||||||
|
background: lightblue;
|
||||||
|
color: black;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727D;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-media,
|
||||||
|
#custom-launcher,
|
||||||
|
#custom-power,
|
||||||
|
#custom-wallpaper,
|
||||||
|
#custom-updater,
|
||||||
|
#custom-snip,
|
||||||
|
#taskbar,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #090909;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #26A65B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
color: #ffffff;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:focus {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disk {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
background-color: #90b1b1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media {
|
||||||
|
color: whitesmoke;
|
||||||
|
margin: 5px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media.custom-spotify {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(to right, #434343 0%, #000000 51%, #434343 100%);
|
||||||
|
color: whitesmoke;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media.custom-vlc {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(to right, #434343 0%, #000000 51%, #434343 100%);
|
||||||
|
color: whitesmoke;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-power{
|
||||||
|
background-image: linear-gradient(to left, #000000 0%, #000000 51%, #434343 100%);
|
||||||
|
font-size: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-launcher{
|
||||||
|
background-image: linear-gradient(to right, #000000 0%, #000000 51%, #434343 100%);
|
||||||
|
font-size: 20px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-wallpaper{
|
||||||
|
color: white;
|
||||||
|
font-size:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-updater {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-snip {
|
||||||
|
color: white;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#taskbar{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor {
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
color: #ffffff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
color: #ffffff;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state {
|
||||||
|
background: #97e1ad;
|
||||||
|
color: #000000;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state > label {
|
||||||
|
padding: 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state > label.locked {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
@ -12,5 +12,6 @@
|
|||||||
./system.nix
|
./system.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
./timezone.nix
|
./timezone.nix
|
||||||
|
./waybar.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
{
|
{
|
||||||
nix.settings = {
|
nix = {
|
||||||
|
settings = {
|
||||||
experimental-features = "nix-command flakes"; # enable flakes
|
experimental-features = "nix-command flakes"; # enable flakes
|
||||||
substituters = [ "https://hyprland.cachix.org" ]; # pre compiled hyprland packages
|
substituters = [ "https://hyprland.cachix.org" ]; # pre compiled hyprland packages
|
||||||
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||||
};
|
};
|
||||||
|
gc = {
|
||||||
|
automatic= true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 2d";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
tree
|
tree
|
||||||
|
wget
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
3
modules/waybar.nix
Normal file
3
modules/waybar.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
programs.waybar.enable = true;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user