Compare commits

..

No commits in common. "781d06f3de807449c8e37dc9bcca0c76bc7e290f" and "f08c343ddf39de25df29a66b917080815ffce4e3" have entirely different histories.

8 changed files with 60 additions and 431 deletions

View File

@ -20,13 +20,13 @@
webis.enable = true;
impermanence.enable = true;
};
programs.river.enable = true;
programs.hyprland.enable = false;
programs.hyprland = {
enable = true;
monitors.DP-3.scale = "auto";
};
programs.exercism.enable = true;
};
users.users.moritz.packages = [ pkgs.poetry ];
# BOOT
boot = {
supportedFilesystems = [ "zfs" ];

View File

@ -255,11 +255,10 @@ in
fonts = {
enableDefaultPackages = true;
packages = [
(pkgs.nerdfonts.override {
packages = with pkgs; [
(nerdfonts.override {
fonts = [ "FiraCode" ];
})
pkgs.master.intel-one-mono
];
};

View File

@ -236,10 +236,6 @@ in
bindl=,switch:on:Lid Switch,exec,monitors="$(hyprctl monitors | grep -c '^Monitor')" && hyprctl keyword monitor "eDP-1, disable" && [ "$monitors" = 1 ] && loginctl lock-session
bindl=,switch:off:Lid Switch,exec, hyprctl keyword monitor "eDP-1, preferred, auto"
# Lock Screen
bind=$mainMod ALT, L, exec, loginctl lock-session
# Extra Config
${cfg.extraConfig}
''

View File

@ -233,16 +233,17 @@ in
alsa.support32Bit = true;
pulse.enable = true;
};
displayManager = {
xserver = {
enable = true;
autoLogin = {
enable = true;
user = "moritz";
displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true;
user = "moritz";
};
defaultSession = "hyprland";
};
defaultSession = "hyprland";
};
xserver.enable = true;
xserver.displayManager.lightdm.enable = true;
};
security.rtkit.enable = true;

View File

@ -22,14 +22,13 @@ in
window_padding_width = 3;
confirm_os_window_close = 0;
background_opacity = "0.9";
font_features = "IntelOneMono-Regular +ss01";
};
keybindings = {
"ctrl+plus" = "change_font_size all +2.0";
"ctrl+minus" = "change_font_size all -2.0";
};
font = {
name = "Intel One Mono";
name = "FiraCode Nerd Font";
size = 10;
};
};

View File

@ -44,41 +44,5 @@ in
{ plugin = pkgs.vimPlugins.nvim-treesitter; }
];
}
{
plugin = pkgs.vimPlugins.zen-mode-nvim;
keys = [
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
];
conf = /* lua */ ''
require("zen-mode").setup({
plugins = {
tmux = {
enabled = true,
},
},
})
'';
dependencies = [
{
plugin = pkgs.vimPlugins.twilight-nvim;
keys = [
{ key = "<leader>tZ"; cmd = "<cmd>Twilight<cr>"; desc = "Twilight mode"; }
];
conf = /* lua */ ''
require("twilight").setup({
context = 20,
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
"function",
"function_definition",
"if_statement",
"method",
"method_definition",
"table",
},
})
'';
}
];
}
];
}

View File

@ -1,13 +1,12 @@
{ config
, lib
, pkgs
, inputs
, ...
}:
} @ args:
with lib;
let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.my.programs.river;
in
{
@ -16,7 +15,7 @@ in
keyboardLayouts = mkOption {
type = types.listOf types.str;
description = "list of keyboard layouts";
default = [ "us" ];
default = [ "de" "us" ];
};
nvidiaSupport = mkEnableOption "nvidiaSupport";
};
@ -26,7 +25,7 @@ in
my = {
programs = {
wallpaper.enable = true;
kitty.enable = true;
foot.enable = true;
tofi.enable = true;
};
wallpapers.enable = true;
@ -50,6 +49,22 @@ in
};
wayland.windowManager.river = {
enable = true;
package = pkgs.river.overrideAttrs (old: {
src = inputs.river;
version = lib.my.mkVersionInput inputs.river;
# HACK: to change wlroots to 0.17.x
buildInputs = with pkgs; [
libGL
libevdev
libinput
libxkbcommon
pixman
udev
wayland-protocols
wlroots_0_17
xorg.libX11
];
});
settings = {
border-width = 2;
declare-mode = [
@ -60,7 +75,8 @@ in
map = {
normal = {
"Super Q" = "close";
"Super Return" = "spawn kitty";
"Super Return" = ''spawn "systemctl --user is-active --quiet foot && footclient --no-wait || foot"'';
"Super+Shift Return" = "spawn foot";
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
"Super W" = ''spawn "pkill -USR1 waybar"'';
"Super+Shift R" = "spawn ~/.config/river/init";
@ -84,13 +100,11 @@ in
# bump in layout stack
"Super Z" = "zoom";
# lock screen
"Super+Alt L" = ''spawn "loginctl lock-session"'';
} //
# tags
(
let
numbers = lib.range 1 9;
numbers = range 1 9;
toTag = num: "$((1 << (${toString num} - 1)))";
mkMappings = num:
@ -100,14 +114,14 @@ in
in
[
# Super+Control+[1-9] to toggle focus of tag [0-8]
{ name = "Super ${numStr}"; value = "set-focused-tags ${tag}"; }
{ name = "Super ${numStr}"; value = "toggle-focused-tags ${tag}"; }
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
{ name = "Super+Shift ${numStr}"; value = "toggle-view-tags ${tag}"; }
];
mappings = lib.flatten (map mkMappings numbers);
mappings = flatten (map mkMappings numbers);
in
lib.listToAttrs mappings
listToAttrs mappings
);
};
map-pointer = {
@ -125,7 +139,6 @@ in
when-typing = "enabled";
};
set-cursor-warp = "on-focus-change";
keyboard-layout = "-options grp:win_space_toggle,caps:escape ${lib.concatStringsSep "," cfg.keyboardLayouts}";
};
extraConfig = /* bash */ ''
rivercarro_pid="$(pidof rivercarro)"
@ -138,14 +151,6 @@ in
# add waybar as a status bar
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
(pkgs.fetchpatch {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/waybar/-/raw/0306af03fcb6de6aee1e288f42b0bf1b223513bd/a544f4b2cdcf632f1a4424b89f6e3d85ef5aaa85.patch";
sha256 = "sha256-S/1oUj9Aj6BElNTsDY8CTcKtS1j7Gl54JFgCywH05pg=";
})
];
});
# start using systemd service
systemd = {
@ -164,7 +169,11 @@ in
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
};
};
style = lib.readFile ./style.css;
style = ''
#tags button.focused {
color: #ffffff
}
'';
};
# lock screen after timeout
@ -179,11 +188,11 @@ in
events = [
{
event = "before-sleep";
command = "${lib.getExe pkgs.swaylock} -fF";
command = "${getExe pkgs.swaylock} -fF";
}
{
event = "lock";
command = "${lib.getExe pkgs.swaylock} -fF";
command = "${getExe pkgs.swaylock} -fF";
}
];
timeouts =
@ -230,7 +239,7 @@ in
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct";
_JAVA_AWT_WM_NONEREPARENTING = "1";
} // (lib.optionalAttrs cfg.nvidiaSupport
} // (optionalAttrs cfg.nvidiaSupport
{
GBM_BACKEND = "nvidia-drm";
GDK_BACKEND = "wayland";
@ -254,16 +263,16 @@ in
alsa.support32Bit = true;
pulse.enable = true;
};
displayManager = {
autoLogin = {
enable = true;
user = "moritz";
};
defaultSession = "river";
};
xserver = {
enable = true;
displayManager.lightdm.enable = true;
displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true;
user = "moritz";
};
defaultSession = "river";
};
};
};
security.rtkit.enable = true;
@ -278,7 +287,7 @@ in
};
};
in
lib.genAttrs units mkAfter;
genAttrs units mkAfter;
systemd.user.services =
let
@ -288,6 +297,6 @@ in
wants = [ "river-session.target" ];
};
in
lib.genAttrs units mkAfter;
genAttrs units mkAfter;
};
}

View File

@ -1,339 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
/* you can set a style on hover for any module like this */
#pulseaudio:hover {
background-color: #a37800;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#power-profiles-daemon {
padding-right: 15px;
}
#power-profiles-daemon.performance {
background-color: #f53c3c;
color: #ffffff;
}
#power-profiles-daemon.balanced {
background-color: #2980b9;
color: #ffffff;
}
#power-profiles-daemon.power-saver {
background-color: #2ecc71;
color: #000000;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}
#tags button {
color: black;
}
#tags button.occupied {
color: white;
}
#tags button.focused {
background-color: grey;
}