2020-02-17 17:00:59 +04:00
|
|
|
{ pkgs, config, lib, ... }:
|
2021-06-10 19:58:51 +04:00
|
|
|
with lib; with pkgs.my-lib;
|
2020-02-17 17:00:59 +04:00
|
|
|
let scripts = import ./scripts pkgs config;
|
|
|
|
in {
|
2021-01-11 18:09:34 +04:00
|
|
|
secrets.wage = {
|
|
|
|
owner = "balsoft:users";
|
|
|
|
services = [ ];
|
|
|
|
};
|
|
|
|
|
2021-01-26 23:19:54 +04:00
|
|
|
secrets.email = {
|
|
|
|
owner = "balsoft:users";
|
|
|
|
services = [ ];
|
2021-06-16 02:09:59 +04:00
|
|
|
encrypted = "${config.environment.sessionVariables.PASSWORD_STORE_DIR}/email/balsoft@balsoft.ru.gpg";
|
2021-01-26 23:19:54 +04:00
|
|
|
};
|
|
|
|
|
2020-08-06 12:31:36 +04:00
|
|
|
home-manager.users.balsoft = {
|
|
|
|
wayland.windowManager.sway.config.bars = [{
|
|
|
|
id = "default";
|
2022-05-23 16:47:39 +04:00
|
|
|
trayOutput = "none";
|
2020-08-06 12:31:36 +04:00
|
|
|
command = "true";
|
|
|
|
colors = let
|
2021-12-23 22:23:03 +04:00
|
|
|
thm = pkgs.my-lib.thmHash config.themes.colors;
|
2020-08-06 12:31:36 +04:00
|
|
|
default = {
|
2021-06-10 19:58:51 +04:00
|
|
|
background = thm.base00;
|
|
|
|
border = thm.base00;
|
2020-08-06 12:31:36 +04:00
|
|
|
};
|
|
|
|
in {
|
2021-06-10 19:58:51 +04:00
|
|
|
background = thm.base00;
|
|
|
|
statusline = thm.base05;
|
|
|
|
separator = thm.base02;
|
|
|
|
focusedWorkspace = default // { text = thm.base08; };
|
|
|
|
activeWorkspace = default // { text = thm.base0B; };
|
|
|
|
inactiveWorkspace = default // { text = thm.base05; };
|
|
|
|
urgentWorkspace = default // { text = thm.base09; };
|
|
|
|
bindingMode = default // { text = thm.base0A; };
|
2020-06-13 00:12:36 +04:00
|
|
|
};
|
2020-08-06 12:31:36 +04:00
|
|
|
statusCommand = "${pkgs.i3blocks}/bin/i3blocks";
|
2021-05-10 04:04:18 +04:00
|
|
|
fonts = {
|
2021-06-10 19:58:51 +04:00
|
|
|
names = [ "${config.themes.fonts.main.family}" "Material Icons" "Roboto Mono" ];
|
2021-05-10 04:04:18 +04:00
|
|
|
style = "Regular";
|
|
|
|
size = 12.0;
|
|
|
|
};
|
2020-08-06 12:31:36 +04:00
|
|
|
mode = "hide";
|
|
|
|
position = "bottom";
|
2020-10-02 01:48:27 +04:00
|
|
|
workspaceNumbers = false;
|
2020-08-06 12:31:36 +04:00
|
|
|
}];
|
|
|
|
xdg.configFile."i3blocks/config".text = let
|
|
|
|
scr = x: {
|
|
|
|
name = x;
|
|
|
|
command = scripts.${x};
|
|
|
|
};
|
|
|
|
scrint = x: interval: (scr x) // { inherit interval; };
|
|
|
|
in ''
|
|
|
|
interval=60
|
|
|
|
markup=pango
|
2021-05-25 15:04:21 +04:00
|
|
|
'' + pkgs.my-lib.genIniOrdered ([ (scr "email") ]
|
2022-05-30 14:12:15 +04:00
|
|
|
++ [ (scrint "weather" 600) (scr "nixos") ]
|
2021-10-29 20:18:29 +04:00
|
|
|
++ [ (scrint "music" 3) (scrint "sound" 1) ]
|
2021-05-10 04:04:18 +04:00
|
|
|
++ [
|
2020-10-02 01:48:27 +04:00
|
|
|
(scrint "cpu" 5)
|
|
|
|
(scrint "freq" 10)
|
|
|
|
(scr "temperature")
|
|
|
|
(scrint "free" 10)
|
|
|
|
(scr "battery")
|
2021-09-26 16:27:02 +04:00
|
|
|
] ++ optionals config.deviceSpecific.isLaptop [
|
2020-10-02 01:48:27 +04:00
|
|
|
(scrint "brightness" 5)
|
|
|
|
] ++ optional (config.deviceSpecific.devInfo ? bigScreen)
|
|
|
|
(scrint "network" 1) ++ [
|
|
|
|
(scrint "bluetooth" 3)
|
|
|
|
(scrint "connections" 3)
|
|
|
|
(scr "df")
|
|
|
|
(scr "date")
|
|
|
|
(scrint "time" 1)
|
|
|
|
]);
|
2020-08-06 12:31:36 +04:00
|
|
|
systemd.user.services.swaybar = {
|
2021-01-26 23:19:54 +04:00
|
|
|
Unit = {
|
|
|
|
Description = "Start default bar";
|
|
|
|
X-RestartIfChanged = true;
|
|
|
|
};
|
2020-08-06 12:31:36 +04:00
|
|
|
|
|
|
|
Install.WantedBy = [ "sway-session.target" ];
|
|
|
|
|
2020-10-02 01:48:27 +04:00
|
|
|
Service = { ExecStart = "${pkgs.sway}/bin/swaybar -b default"; };
|
2020-08-06 12:31:36 +04:00
|
|
|
};
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|