205 lines
5 KiB
Nix
205 lines
5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [ ./common.nix ];
|
|
|
|
home.username = "digyx";
|
|
home.homeDirectory = "/var/home/digyx";
|
|
|
|
home.file = {
|
|
".config/rofi".source = ../rofi;
|
|
".config/sway".source = ../sway;
|
|
|
|
".config/foot/foot.ini".text = ''
|
|
[colors]
|
|
alpha = 0.95
|
|
'';
|
|
|
|
".config/swaylock/config".text = ''
|
|
image=/var/home/digyx/Pictures/ina_bday_2021_4k.png
|
|
scaling=fill
|
|
|
|
ignore-empty-password
|
|
show-failed-attempts
|
|
indicator-idle-visible
|
|
'';
|
|
|
|
".config/waybar/config.jsonc".text = ''
|
|
// -*- mode: jsonc -*-
|
|
{
|
|
"layer": "top", // Waybar at top layer
|
|
"position": "top",
|
|
"height": 30, // Waybar height (to be removed for auto height)
|
|
// "width": 1280, // Waybar width
|
|
"spacing": 0, // Gaps between modules (4px)
|
|
|
|
"modules-left": [
|
|
"sway/mode",
|
|
"network"
|
|
],
|
|
"modules-center": [
|
|
"sway/workspaces"
|
|
],
|
|
"modules-right": [
|
|
"battery",
|
|
"temperature",
|
|
"cpu",
|
|
"memory",
|
|
"clock",
|
|
],
|
|
|
|
// Modules configuration
|
|
"clock": {
|
|
"interval": 1,
|
|
"timezone": "America/New_York",
|
|
"format": " {:%m/%d %H:%M:%S}",
|
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
|
"format-alt": " {:%Y-%m-%d}"
|
|
},
|
|
"cpu": {
|
|
"format": " {usage}%",
|
|
"tooltip": false,
|
|
"interval": 2,
|
|
},
|
|
"memory": {
|
|
"format": " {}%",
|
|
"format-alt": " {used} GiB",
|
|
"tooltip": false,
|
|
"interval": 2,
|
|
},
|
|
"temperature": {
|
|
"hwmon-path": "/sys/class/hwmon/hwmon8/temp1_input",
|
|
"critical-threshold": 80,
|
|
"interval": 2,
|
|
|
|
"format": "{icon} {temperatureC}°C",
|
|
"format-icons": ["", "", ""],
|
|
"format-critical": "{icon} {temperatureC}°C",
|
|
"tooltip": false,
|
|
},
|
|
"battery": {
|
|
"states": {
|
|
"good": 65,
|
|
"warning": 30,
|
|
"critical": 15
|
|
},
|
|
"full-at": 85,
|
|
|
|
"format": "{icon} {capacity}%",
|
|
"format-full": "{icon}",
|
|
"format-charging": " {capacity}%",
|
|
"format-plugged": " {capacity}%",
|
|
"format-icons": ["", "", "", "", ""]
|
|
},
|
|
"network": {
|
|
"format-wifi": " {essid}",
|
|
"format-ethernet": " Wired",
|
|
"format-disconnected": " Disconnected",
|
|
"format-alt": " {ifname}: {ipaddr}/{cidr}",
|
|
"tooltip": false,
|
|
}
|
|
}
|
|
'';
|
|
|
|
".config/waybar/style.css".text = ''
|
|
/* Gruvbox Colours -- https://github.com/doomemacs/themes/blob/master/themes/doom-gruvbox-theme.el */
|
|
|
|
* {
|
|
border: none;
|
|
font-family: 'Noto Sans Mono', 'Font Awesome 6 Free', 'Font Awesome 6 Brands', monospace;
|
|
font-size: 13px;
|
|
color: rgba(235, 219, 178, 1);
|
|
border-radius: 20px;
|
|
}
|
|
|
|
window#waybar {
|
|
background: rgba(0, 0, 0, 0);
|
|
}
|
|
|
|
/*-----module groups----*/
|
|
.modules-right {
|
|
background-color: rgba(40,40,40,0.85);
|
|
margin: 2px 10px 0 0;
|
|
}
|
|
.modules-center {
|
|
background-color: rgba(40,40,40,0.85);
|
|
margin: 2px 0 0 0;
|
|
}
|
|
.modules-left {
|
|
margin: 2px 0 0 5px;
|
|
background-color: rgba(40,40,40,0.85);
|
|
}
|
|
|
|
/*-----modules indv----*/
|
|
#workspaces button {
|
|
padding: 1px 5px;
|
|
background-color: transparent;
|
|
}
|
|
#workspaces button:hover {
|
|
background-color: rgba(13, 16, 17, 1);
|
|
box-shadow: inherit;
|
|
}
|
|
|
|
#workspaces button.focused {
|
|
background-color: rgba(13, 16, 17, 0.85);
|
|
}
|
|
|
|
#battery,
|
|
#clock,
|
|
#cpu,
|
|
#memory,
|
|
#network,
|
|
#temperature {
|
|
padding: 0 10px;
|
|
}
|
|
|
|
/*-----Indicators----*/
|
|
#battery.charging {
|
|
color: #b8bb26;
|
|
}
|
|
#battery.warning:not(.charging) {
|
|
color: #fabd2f;
|
|
}
|
|
#battery.critical:not(.charging) {
|
|
color: #fb4934;
|
|
}
|
|
|
|
#temperature.critical {
|
|
color: #fb4934;
|
|
}
|
|
'';
|
|
};
|
|
|
|
# Services
|
|
services.syncthing.enable = true;
|
|
|
|
# Borgmatic
|
|
services.borgmatic = {
|
|
enable = true;
|
|
frequency = "*-*-* 08:00:00";
|
|
};
|
|
|
|
programs.borgmatic = {
|
|
enable = true;
|
|
|
|
backups = {
|
|
diana = {
|
|
location = {
|
|
sourceDirectories = [ "/var/home/digyx" ];
|
|
repositories = [ "ssh://tztl5fp2@tztl5fp2.repo.borgbase.com/./repo" ];
|
|
};
|
|
|
|
retention = {
|
|
keepDaily = 7;
|
|
keepWeekly = 4;
|
|
keepMonthly = 12;
|
|
};
|
|
|
|
storage = {
|
|
encryptionPasscommand = "${pkgs.pass}/bin/pass borg-key";
|
|
extraConfig.ssh_command = "/usr/bin/ssh";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|