diff --git a/common/modules/programs.nix b/common/modules/programs.nix index 6bc11e1..3ca43de 100644 --- a/common/modules/programs.nix +++ b/common/modules/programs.nix @@ -22,4 +22,28 @@ ]; }; }; + + programs = { + # TODO: install plugins through nix + tmux = { + enable = true; + keyMode = "vi"; + terminal = "screen-256color"; + newSession = true; + historyLimit = 30000; + extraConfig = '' + bind-key -n Home send Escape "OH" + bind-key -n End send Escape "OF" + set -g mouse on + set -ga terminal-overrides ',xterm*:smcup@:rmcup@' + bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" + bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" + + set -g @plugin 'dracula/tmux' + run 'bash -c "$HOME/.tmux/plugins/tpm/tpm || + ${pkgs.git}/bin/git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm && + $HOME/.tmux/plugins/tpm/tpm"' + ''; + }; + }; } diff --git a/hosts/wim/cfg/main.nix b/hosts/wim/cfg/main.nix index 6366872..0593657 100644 --- a/hosts/wim/cfg/main.nix +++ b/hosts/wim/cfg/main.nix @@ -3,6 +3,5 @@ { imports = [ ./security.nix - ./packages.nix ]; } diff --git a/hosts/wim/cfg/packages.nix b/hosts/wim/cfg/packages.nix deleted file mode 100644 index fbe7e85..0000000 --- a/hosts/wim/cfg/packages.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ pkgs, hyprland, ... }: - -{ - services = { - xserver = { - enable = true; - layout = "ca"; - displayManager = { - sddm = { - enable = true; - settings = { - General = { - DisplayServer = "wayland"; - InputMethod = ""; - }; - Wayland.CompositorCommand = "${pkgs.weston}/bin/weston --shell=fullscreen-shell.so"; - Theme = { - Current = "Dracula"; - CursorTheme = "Dracula-cursors"; - CursorSize = 24; - }; - }; - }; - sessionPackages = [ - hyprland.packages.x86_64-linux.default - ]; - defaultSession = "hyprland"; - autoLogin = { - enable = true; - user = "matt"; - }; - }; - libinput.enable = true; - }; - dbus.enable = true; - gvfs.enable = true; - flatpak.enable = true; - tlp.enable = true; - }; - - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; - - programs = { - - # TODO: install plugins through nix - tmux = { - enable = true; - keyMode = "vi"; - terminal = "screen-256color"; - newSession = true; - historyLimit = 30000; - extraConfig = '' - bind-key -n Home send Escape "OH" - bind-key -n End send Escape "OF" - set -g mouse on - set -ga terminal-overrides ',xterm*:smcup@:rmcup@' - bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" - bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" - - set -g @plugin 'dracula/tmux' - run 'bash -c "$HOME/.tmux/plugins/tpm/tpm || - ${pkgs.git}/bin/git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm && - $HOME/.tmux/plugins/tpm/tpm"' - ''; - }; - }; - - # List packages in root user PATH - environment.systemPackages = with pkgs; [ - # for sddm - plasma5Packages.plasma-framework - plasma5Packages.plasma-workspace - - qemu - wl-clipboard - alsa-utils - evtest - plasma5Packages.kio-admin - plasma5Packages.ksshaskpass - ]; -} diff --git a/hosts/wim/configuration.nix b/hosts/wim/configuration.nix index 2d727da..9d38819 100644 --- a/hosts/wim/configuration.nix +++ b/hosts/wim/configuration.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, hyprland, pkgs, ... }: { imports = [ @@ -9,6 +9,7 @@ ../../modules/plymouth.nix ../../modules/printer.nix ../../modules/proton-bridge.nix + ../../modules/sddm-wayland.nix ./cfg/main.nix ./home/main.nix @@ -23,6 +24,50 @@ }; }; + services = { + xserver = { + displayManager = { + sessionPackages = [ + hyprland.packages.x86_64-linux.default + ]; + defaultSession = "hyprland"; + + autoLogin = { + enable = true; + user = "matt"; + }; + }; + + libinput.enable = true; + }; + dbus.enable = true; + gvfs.enable = true; + flatpak.enable = true; + tlp.enable = true; + }; + + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + ]; + }; + + # List packages in root user PATH + environment.systemPackages = with pkgs; [ + # for sddm + plasma5Packages.plasma-framework + plasma5Packages.plasma-workspace + + qemu + wl-clipboard + alsa-utils + evtest + plasma5Packages.kio-admin + plasma5Packages.ksshaskpass + ]; + # Set your time zone. time.timeZone = "America/Montreal"; diff --git a/modules/sddm-wayland.nix b/modules/sddm-wayland.nix new file mode 100644 index 0000000..3c94459 --- /dev/null +++ b/modules/sddm-wayland.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: { + services.xserver = { + enable = true; + layout = "ca"; + displayManager = { + sddm = { + enable = true; + settings = { + General = { + DisplayServer = "wayland"; + InputMethod = ""; + }; + Wayland.CompositorCommand = "${pkgs.weston}/bin/weston --shell=fullscreen-shell.so"; + Theme = { + Current = "Dracula"; + CursorTheme = "Dracula-cursors"; + CursorSize = 24; + }; + }; + }; + }; + }; +}