Compare commits
1 commit
e047cc1f13
...
f1b45216e9
Author | SHA1 | Date | |
---|---|---|---|
f1b45216e9 |
12 changed files with 110 additions and 23 deletions
|
@ -2,6 +2,7 @@
|
|||
self,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -24,5 +25,9 @@ in
|
|||
(mkURLEntry "KitchenOwl" "https://kitchenowl.ccnlc.eu" "${self}/assets/favicon-kitchenowl.png")
|
||||
(mkURLEntry "Discord" "https://discord.com/app" "${self}/assets/favicon-discord.png")
|
||||
];
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = osConfig.xdg.mime.defaultApplications;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
|
||||
Unit = {
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
|
|
|
@ -11,8 +11,8 @@ let
|
|||
inherit (lib.my) getExe getExe';
|
||||
|
||||
desktop = osConfig.modules.system.roles.desktop;
|
||||
term = lib.my.getExe desktop.terminal;
|
||||
filemanager = lib.my.getExe desktop.filemanager;
|
||||
term = getExe desktop.terminal;
|
||||
filemanager = getExe desktop.filemanager;
|
||||
cliphistEnabled = osConfig.modules.services.cliphist.enable;
|
||||
|
||||
colors = {
|
||||
|
@ -50,7 +50,6 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
swipe:up focus up
|
||||
swipe:down focus down
|
||||
}
|
||||
workspace 1
|
||||
font pango:monospace 0.001
|
||||
'';
|
||||
config = {
|
||||
|
@ -62,9 +61,9 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${mod}+p" = "exec ${pkgs.hyprlock}/bin/hyprlock";
|
||||
"${mod}+p" = "exec ${getExe pkgs.hyprlock}";
|
||||
|
||||
"${mod}+Shift+p" = "exec rofi -show p -modi p:${pkgs.rofi-power-menu}/bin/rofi-power-menu";
|
||||
"${mod}+Shift+p" = "exec ${getExe pkgs.rofi} -show p -modi p:${getExe pkgs.rofi-power-menu}";
|
||||
# Reload the config file
|
||||
"${mod}+Shift+c" = "reload";
|
||||
# Kill the focused window
|
||||
|
@ -72,14 +71,13 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
# Make focused window fullscreen
|
||||
"${mod}+f" = "fullscreen";
|
||||
# Start launcher
|
||||
"${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
|
||||
"${mod}+d" = "exec ${getExe desktop.runner.package}";
|
||||
"${mod}+s" =
|
||||
let
|
||||
cliphist = getExe pkgs.cliphist;
|
||||
fuzzel = getExe pkgs.fuzzel;
|
||||
copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||
in
|
||||
mkIf cliphistEnabled "exec ${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${copy}";
|
||||
mkIf cliphistEnabled "exec ${cliphist} list | ${desktop.runner.dmenu} | ${cliphist} decode | ${copy}";
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
"${mod}+Shift+space" = "floating toggle";
|
||||
"${mod}+Return" = "exec ${term}";
|
||||
|
@ -144,7 +142,9 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
};
|
||||
seat = {
|
||||
"*" = {
|
||||
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
||||
#xcursor_theme = mkIf (
|
||||
#config ? home.pointerCursor.name
|
||||
#) "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
||||
keyboard_grouping = "none";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib.my) validatePath;
|
||||
in
|
||||
|
|
31
home/themes/vanilla.nix
Normal file
31
home/themes/vanilla.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = {
|
||||
package = pkgs.adwaita-qt;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = lib.mkDefault {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 32;
|
||||
};
|
||||
}
|
|
@ -8,5 +8,6 @@
|
|||
./hyprland.nix
|
||||
./ssh.nix
|
||||
./fish.nix
|
||||
./uwsm.nix
|
||||
];
|
||||
}
|
||||
|
|
26
modules/programs/uwsm.nix
Normal file
26
modules/programs/uwsm.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.programs.uwsm;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.dbus.implementation = lib.mkForce "dbus";
|
||||
|
||||
programs.uwsm = {
|
||||
enable = true;
|
||||
waylandCompositors = {
|
||||
hyprland = mkIf config.programs.hyprland.enable {
|
||||
prettyName = "Hyprland";
|
||||
comment = "Hyprland compositor managed by UWSM";
|
||||
binPath = "/run/current-system/sw/bin/Hyprland";
|
||||
};
|
||||
sway = mkIf config.programs.sway.enable {
|
||||
prettyName = "Sway";
|
||||
comment = "Sway compositor managed by UWSM";
|
||||
binPath = "/run/current-system/sw/bin/sway";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -29,7 +29,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
systemd.user.services.cliphist = {
|
||||
description = "Clipboard management daemon";
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
|
|
|
@ -27,8 +27,7 @@ in
|
|||
pkgs.networkmanager
|
||||
];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
|
|
@ -85,8 +85,7 @@ in
|
|||
systemd.user.services.tailscale-system-tray = mkIf cfg.systemTray {
|
||||
description = "tailscale system tray";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
path = [ pkgs.polkit ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
|
|
@ -10,5 +10,18 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall = mkIf config.modules.system.roles.desktop.enable {
|
||||
# if packets are still dropped, they will show up in dmesg
|
||||
logReversePathDrops = true;
|
||||
# wireguard trips rpfilter up
|
||||
extraCommands = ''
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption mkIf;
|
||||
inherit (lib.types) package;
|
||||
inherit (lib.types) package str;
|
||||
inherit (lib.my) getExe;
|
||||
cfg = config.modules.system.roles.desktop;
|
||||
in
|
||||
{
|
||||
|
@ -26,6 +27,24 @@ in
|
|||
default = pkgs.nautilus;
|
||||
description = '''';
|
||||
};
|
||||
runner = {
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.fuzzel;
|
||||
description = ''
|
||||
The runner to use.
|
||||
'';
|
||||
};
|
||||
|
||||
dmenu = mkOption {
|
||||
type = str;
|
||||
default = "--dmenu";
|
||||
apply = val: "${getExe cfg.runner.package} ${val}";
|
||||
description = ''
|
||||
Flags necessary to execute the runner in its dmenu compatibility mode.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
|
|
Loading…
Add table
Reference in a new issue