Added sway and broke and then fixed sway so uh thats nice I think thats pretty cool

main
Johannes Hendrik Gerard van der Weide 2023-11-20 17:26:58 +01:00
parent a580a46aba
commit 3faca9fa8d
6 changed files with 188 additions and 1 deletions

View File

@ -5,7 +5,8 @@
{ {
# Set hostname # Set hostname
networking.hostName = "puter"; networking.hostName = "puter";
security.polkit.enable = true;
services.xserver.displayManager.sessionPackages = [ pkgs.sway ];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View File

@ -19,6 +19,7 @@
gnome.gnome-control-center gnome.gnome-control-center
gnome.nautilus gnome.nautilus
gnome.file-roller gnome.file-roller
swaybg
alacritty alacritty
gnome-text-editor gnome-text-editor
warp warp

View File

@ -33,6 +33,7 @@
bottom bottom
curl curl
wget wget
git
gitui gitui
lynx lynx
]; ];

9
Users/Hertog/dconf.nix Executable file
View File

@ -0,0 +1,9 @@
{ config, ... }:
{
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
}

View File

@ -55,6 +55,8 @@
imports = [ imports = [
# Home-manager configured program files # Home-manager configured program files
./dconf.nix
./sway.nix
./neovim.nix ./neovim.nix
./helix.nix ./helix.nix
./obs.nix ./obs.nix

173
Users/Hertog/sway.nix Executable file
View File

@ -0,0 +1,173 @@
{ config, pkgs, ... }:
{
# Wofi
programs.wofi = {
enable = true;
settings = {
gtk_dark = true;
location = "left";
allow_markup = true;
width = 250;
};
style = ''
* {
font-family: monospace;
}
window {
background-color: #242424;
}
#input {
margin: 5px;
border: none;
color: #ffffff;
background-color: #b30000;
}
#text {
margin: 5px;
border: none;
color: #ffffff;
}
#entry {
border: none;
}
#entry:focus {
border: none;
}
#entry:selected {
background-color: #b30000;
border-radius: 5px;
border: none;
}
'';
};
# Waybar
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 20;
modules-left = [ "sway/workspaces" "sway/mode" ];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
modules-center = [ "clock" ];
"clock" = {
interval = 1;
format = "{:%H:%M:%S}";
format-alt = "{ %A, %d %B, %Y}";
tooltip-format = "<big>{:%d %B, %Y}</big>\n<tt><small>{calendar}</small></tt>";
};
modules-right = [ "network" "battery" ];
"network" = {
format-wifi = "W{signalStrength} ";
format-ethernet = "E{signalStrength} ";
format-disconnected = "Offline";
tooltip-format = "{ifname}: {ipaddr}";
tooltip-format-wifi = "{essid} ({signalStrength}%): {ipaddr}";
};
"battery" = {
states = {
warning = 30;
critical = 15;
};
format = "B{capacity}% ";
format-alt = "{time} {icon}";
};
};
};
style = ''
* {
border: none;
border-radius: 0;
font-family: monospace;
}
window#waybar {
background: #242424;
color: #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: #1e1e1e;
color: #ffffff;
}
#workspaces button:hover {
background: #303030;
color: #ffffff;
}
#workspaces button.focused {
background: #b30000;
color: #ffffff;
}
'';
};
# Sway itself
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
config = rec {
modifier = "Mod4";
terminal = "alacritty";
menu = "wofi --show drun";
startup = [
{command = "export QT_QPA_PLATFORM=wayland";}
{command = "swaybg -i Pictures/AchterGronden/blobcat_hertog.svg";}
{command = "keepassxc";}
];
colors = {
background = "#242424";
focused = {
indicator = "#b30000";
background = "#b30000";
border = "#b30000";
childBorder = "#b30000";
text = "#ffffff";
};
focusedInactive = {
indicator = "#303030";
background = "#303030";
border = "#303030";
childBorder = "#303030";
text = "#ffffff";
};
unfocused = {
indicator = "#1e1e1e";
background = "#1e1e1e";
border = "#1e1e1e";
childBorder = "#1e1e1e";
text = "#ffffff";
};
};
bars = [
{
command = "waybar";
}
];
window = {
titlebar = false;
};
output= {
eDP-1 = {
scale = "1";
};
};
};
};
}