mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-29 09:58:29 +02:00
initial config
This commit is contained in:
parent
ed093a2784
commit
7e1d2412ef
7 changed files with 60 additions and 11 deletions
|
@ -0,0 +1,46 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# ./hyprpaper.nix
|
||||
./session.nix
|
||||
./waybar.nix
|
||||
];
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
||||
modifier = "Mod4";
|
||||
menu = "${pkgs.fuzzel}/bin/fuzzel";
|
||||
terminal = "${pkgs.foot}/bin/footclient";
|
||||
bars = [ ];
|
||||
gaps = {
|
||||
outer = 5;
|
||||
inner = 12;
|
||||
};
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "dvorak-alt-intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile = {
|
||||
"fuzzel/fuzzel.ini".text = ''
|
||||
[main]
|
||||
icon-theme=${config.gtk.iconTheme.name}
|
||||
show-actions=yes
|
||||
width=80
|
||||
terminal=${pkgs.foot}/bin/foot
|
||||
|
||||
[colors]
|
||||
background=${config.colorScheme.colors.base00}ff
|
||||
text=${config.colorScheme.colors.base05}ff
|
||||
match=${config.colorScheme.colors.base08}ff
|
||||
selection=${config.colorScheme.colors.base02}ff
|
||||
selection-text=${config.colorScheme.colors.base04}ff
|
||||
border=${config.colorScheme.colors.base01}ff
|
||||
'';
|
||||
};
|
||||
}
|
82
users/rouven/modules/sway/session.nix
Normal file
82
users/rouven/modules/sway/session.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swaylock-effects
|
||||
wlogout
|
||||
];
|
||||
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
||||
{ event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
||||
];
|
||||
timeouts = [
|
||||
{ timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"swaylock/config".text = ''
|
||||
indicator-radius=200
|
||||
indicator-thickness=3
|
||||
inside-color=00000000
|
||||
inside-ver-color=${config.colorScheme.colors.base0D}
|
||||
inside-clear-color=${config.colorScheme.colors.base0B}
|
||||
ring-color=${config.colorScheme.colors.base03}
|
||||
ring-wrong-color=${config.colorScheme.colors.base08}
|
||||
screenshot
|
||||
effect-blur=7x5
|
||||
'';
|
||||
|
||||
"wlogout/style.css".text = ''
|
||||
* {
|
||||
background-image: none;
|
||||
}
|
||||
window {
|
||||
background-color: rgba(12, 12, 12, 0);
|
||||
}
|
||||
button {
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
background-color: #${config.colorScheme.colors.base00};
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-radius: 30px;
|
||||
margin: 5px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
}
|
||||
|
||||
button:active, button:hover {
|
||||
background-color: #${config.colorScheme.colors.base03};
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/reboot.png"));
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
203
users/rouven/modules/sway/waybar.nix
Normal file
203
users/rouven/modules/sway/waybar.nix
Normal file
|
@ -0,0 +1,203 @@
|
|||
{ self, config, pkgs, ... }:
|
||||
{
|
||||
# systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin";
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
# package = hyprland.packages.x86_64-linux.waybar-hyprland;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
# modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
|
||||
modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ];
|
||||
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ];
|
||||
network = {
|
||||
format-wifi = " {essid} ({signalStrength}%)";
|
||||
format-ethernet = " {ipaddr}/{cidr}";
|
||||
tooltip-format = " {ifname} via {gwaddr}";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
};
|
||||
"sway/window" = {
|
||||
format = " {}";
|
||||
# separate-outputs = true;
|
||||
};
|
||||
|
||||
"custom/spotifytitle" = {
|
||||
format = " {}";
|
||||
max-length = 80;
|
||||
return-type = "json";
|
||||
exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -p None 2> /dev/null";
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
};
|
||||
temperature = {
|
||||
hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [ "" ];
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source} ";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}% ";
|
||||
format-source-muted = " ";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
headset = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon} ";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
tray = {
|
||||
spacing = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."waybar/style.css".text = ''
|
||||
* {
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif, Iosevka Nerd Font;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: #${config.colorScheme.colors.base04};
|
||||
box-shadow: inset 0 -3px #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#custom-spotifytitle,
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#window,
|
||||
#tray{
|
||||
border-radius: 30px;
|
||||
padding: 0 10px;
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: #${config.colorScheme.colors.base00};
|
||||
}
|
||||
|
||||
|
||||
#clock {
|
||||
background-color: #${config.colorScheme.colors.base00};
|
||||
}
|
||||
|
||||
#custom-spotifytitle {
|
||||
background: #1db954;
|
||||
color: #191414;
|
||||
opacity: 1;
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
|
||||
#custom-spotifytitle.Paused,
|
||||
#custom-spotifytitle.Inactive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #${config.colorScheme.colors.base02};
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
background-color: #${config.colorScheme.colors.base02};
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #${config.colorScheme.colors.base08};
|
||||
color: #${config.colorScheme.colors.base01};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #${config.colorScheme.colors.base06};
|
||||
color: #${config.colorScheme.colors.base01};
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #${config.colorScheme.colors.base07};
|
||||
color: #${config.colorScheme.colors.base01};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #${config.colorScheme.colors.base08};
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #${config.colorScheme.colors.base03};
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #${config.colorScheme.colors.base05};
|
||||
color: #${config.colorScheme.colors.base01};
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #${config.colorScheme.colors.base08};
|
||||
color: #${config.colorScheme.colors.base01};
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #${config.colorScheme.colors.base01};
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
}
|
||||
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue