add wm module and other stuff

This commit is contained in:
tristan 2023-05-25 09:12:37 +01:00
parent 632727e5aa
commit a18f813eb3
4 changed files with 27 additions and 23 deletions

View file

@ -4,7 +4,8 @@
, work ? false , work ? false
, displays ? [ ] , displays ? [ ]
, userName , userName
, ... }: , ...
}:
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ imports = [
@ -21,12 +22,15 @@
(import ./modules/dev.nix { inherit user; }) (import ./modules/dev.nix { inherit user; })
(import ./modules/personal.nix { inherit user; }) (import ./modules/personal.nix { inherit user; })
(import ./modules/gamer.nix { inherit user; }) (import ./modules/gamer.nix { inherit user; })
(import ./modules/wayland.nix { inherit user; })
./scripts.nix ./scripts.nix
../system/global/system.nix ../system/global/system.nix
../system/${name}/system.nix ../system/${name}/system.nix
../hardware/${name}.nix ../hardware/${name}.nix
]; ];
windowManager.hyprland = true;
home-manager.users.${user}.imports = [ home-manager.users.${user}.imports = [
../system/global/home.nix ../system/global/home.nix
../system/${name}/home.nix ../system/${name}/home.nix

View file

@ -9,7 +9,7 @@ in
sway = mkEnableOption "sway"; sway = mkEnableOption "sway";
}; };
config = { config = mkIf (cfg.sway || cfg.hyprland) {
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {

View file

@ -99,7 +99,7 @@ in
extraConfig = '' extraConfig = ''
## global hyprland configuration ## global hyprland configuration
env = GDK_BACKEND,wayland,x11 env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb env = QT_QPA_PLATFORM,xcb
env = SDL_VIDEODRIVER,wayland env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_CURRENT_DESKTOP,Hyprland
@ -481,7 +481,7 @@ in
ffmpegthumbnailer -i "$1" -o "$CACHE.jpg" -s 0 -q 5 ffmpegthumbnailer -i "$1" -o "$CACHE.jpg" -s 0 -q 5
image "$CACHE.jpg" "$2" "$3" "$4" "$5" image "$CACHE.jpg" "$2" "$3" "$4" "$5"
;; ;;
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif) *.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.jfif)
image "$1" "$2" "$3" "$4" "$5" image "$1" "$2" "$3" "$4" "$5"
;; ;;
*.svg) *.svg)
@ -780,6 +780,7 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
}; };
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true;
config = { config = {
modifier = "Mod4"; modifier = "Mod4";
input = { input = {
@ -884,5 +885,15 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
}; };
}; };
programs.pandoc = {
enable = true;
defaults = {
metadata = {
author = "Tristan Beedell";
};
pdf-engine = "xelatex";
};
};
} }

View file

@ -42,6 +42,10 @@
networking.firewall.allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; networking.firewall.allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
networking.firewall.allowedUDPPortRanges = [{ from = 1714; to = 1764; }]; networking.firewall.allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
networking.firewall.interfaces.tailscale0 = {
allowedTCPPortRanges = [{ from = 0; to = 65535; }];
};
services.avahi.enable = true; services.avahi.enable = true;
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
@ -68,21 +72,6 @@
xkbOptions = "caps:escape"; xkbOptions = "caps:escape";
}; };
services.greetd = {
enable = true;
settings = rec {
hypr_session = {
command = "Hyprland";
user = "tristan";
};
sway_session = {
command = "sway";
user = "tristan";
};
default_session = hypr_session;
};
};
qt.enable = true; qt.enable = true;
qt.platformTheme = "gtk2"; qt.platformTheme = "gtk2";
qt.style = "gtk2"; qt.style = "gtk2";