From 30c300f3b7ab9016b363f3d389b88ede9bd143e5 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 7 Nov 2023 21:30:26 -0600 Subject: [PATCH] IRC --- flake.nix | 2 -- modules/home-manager/common.nix | 2 ++ modules/home-manager/default.nix | 4 +-- modules/home-manager/desktop.nix | 1 + modules/home-manager/dragon.nix | 1 + modules/home-manager/eww/eww.yuck | 4 +-- modules/home-manager/foxtrot.nix | 10 ++++++ modules/home-manager/helix.nix | 2 +- modules/home-manager/hyprland.nix | 11 +++--- modules/home-manager/senpai.nix | 18 ++++++++++ modules/home-manager/tmux-master-service.nix | 35 ------------------- .../home-manager/weechat-in-tmux-service.nix | 28 --------------- nixos/beefcake/default.nix | 8 ++++- 13 files changed, 49 insertions(+), 77 deletions(-) create mode 100644 modules/home-manager/senpai.nix delete mode 100644 modules/home-manager/tmux-master-service.nix delete mode 100644 modules/home-manager/weechat-in-tmux-service.nix diff --git a/flake.nix b/flake.nix index b59632b..a019fa8 100644 --- a/flake.nix +++ b/flake.nix @@ -115,7 +115,6 @@ in { dragon = mkNixosSystem "x86_64-linux" [./nixos/dragon] (with outputs.homeManagerModules; [ dragon - hyprland ]); thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker] (with outputs.homeManagerModules; [ thinker @@ -129,7 +128,6 @@ ./nixos/beefcake ] (with outputs.homeManagerModules; [ linux - weechat-in-tmux-service ]); rascal = mkNixosSystem "x86_64-linux" [./nixos/rascal] (with outputs.homeManagerModules; [ linux diff --git a/modules/home-manager/common.nix b/modules/home-manager/common.nix index 7d18e4b..3a94131 100644 --- a/modules/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -12,12 +12,14 @@ imports = with outputs.homeManagerModules; [ # nix-colors.homeManagerModules.default fish + bat helix git iex zellij broot cargo + senpai tmux ]; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index cc66eae..779f98c 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -28,9 +28,7 @@ ewwbar = import ./ewwbar.nix; sway-laptop = import ./sway-laptop.nix; tmux = import ./tmux.nix; - - tmux-master-service = import ./tmux-master-service.nix; - weechat-in-tmux-service = import ./weechat-in-tmux-service.nix; + senpai = import ./senpai.nix; dragon = import ./dragon.nix; thinker = import ./thinker.nix; diff --git a/modules/home-manager/desktop.nix b/modules/home-manager/desktop.nix index 22ce680..d1a3088 100644 --- a/modules/home-manager/desktop.nix +++ b/modules/home-manager/desktop.nix @@ -1,5 +1,6 @@ {outputs, ...}: { imports = with outputs.homeManagerModules; [ kitty + wezterm ]; } diff --git a/modules/home-manager/dragon.nix b/modules/home-manager/dragon.nix index 8fe498a..7813509 100644 --- a/modules/home-manager/dragon.nix +++ b/modules/home-manager/dragon.nix @@ -7,6 +7,7 @@ imports = with outputs.homeManagerModules; [ melee sway + hyprland ]; wayland.windowManager.hyprland = { diff --git a/modules/home-manager/eww/eww.yuck b/modules/home-manager/eww/eww.yuck index 6f47fa7..090429c 100644 --- a/modules/home-manager/eww/eww.yuck +++ b/modules/home-manager/eww/eww.yuck @@ -5,7 +5,7 @@ (music))) (defwindow bar - :monitor 1 + :monitor 0 :stacking "fg" :exclusive true :geometry @@ -33,7 +33,7 @@ {" " + round(EWW_CPU["avg"], 0) + "%"} {" " + round(EWW_RAM["used_mem_perc"], 0) + "%"} {isDesktop == "true" ? "" : " " + brightness + "%"} - {isDesktop == "true" ? "" : "󱊣 " + EWW_BATTERY["BAT0"]["capacity"] + "%/" + EWW_BATTERY["BAT1"]["capacity"] + "%"} + {isDesktop == "true" ? "" : "󱊣 " + EWW_BATTERY["BAT1"]["capacity"] + "%"} )) (defwidget music [] diff --git a/modules/home-manager/foxtrot.nix b/modules/home-manager/foxtrot.nix index 0e41629..1827cb6 100644 --- a/modules/home-manager/foxtrot.nix +++ b/modules/home-manager/foxtrot.nix @@ -2,8 +2,18 @@ imports = with outputs.homeManagerModules; [ sway sway-laptop + hyprland ]; + wayland.windowManager.hyprland = { + settings = { + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + monitor = [ + "eDP-1,2256x1504@60,0x0,1.5" + ]; + }; + }; + wayland.windowManager.sway = { config = { output = { diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index 1ae9954..89e014d 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -130,7 +130,7 @@ # color-modes = false; bufferline = "multiple"; # scrolloff = 8; - rulers = [80 120]; + rulers = [81 121]; cursorline = true; cursor-shape = { diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 13e9962..66269d3 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -27,7 +27,11 @@ ]; exec-once = [ - "firefox & kitty --single-instance & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1" + "hyprpaper" + "mako" + "/usr/lib/polkit-kde-authentication-agent-1" + "eww daemon && eww open bar" + "firefox & kitty --single-instance &" ''swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'"'' "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" ]; @@ -53,9 +57,6 @@ tap-to-click = true; middle_button_emulation = true; }; - - force_no_accel = true; - sensitivity = 1; # -1.0 - 1.0, 0 means no modification. }; misc = { @@ -83,7 +84,7 @@ decoration = { rounding = 3; - blur = "no"; + # blur = "no"; # blur_size = 3 # blur_passes = 1 # blur_new_optimizations = on diff --git a/modules/home-manager/senpai.nix b/modules/home-manager/senpai.nix new file mode 100644 index 0000000..6cac5bd --- /dev/null +++ b/modules/home-manager/senpai.nix @@ -0,0 +1,18 @@ +{config, ...}: { + programs.senpai = { + enable = true; + config = { + addr = "a"; + nick = "a"; + }; + }; + + home.file."${config.xdg.configHome}/senpai/senpai.scfg" = { + enable = true; + text = '' + address irc+insecure://beefcake:6667 + nickname lytedev + password-cmd pass soju + ''; + }; +} diff --git a/modules/home-manager/tmux-master-service.nix b/modules/home-manager/tmux-master-service.nix deleted file mode 100644 index d859c49..0000000 --- a/modules/home-manager/tmux-master-service.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; let - cfg = config.services.tmux-master-service; -in { - options.services.tmux-master-service = { - enable = mkEnableOption "tmux master service"; - - socket = mkOption { - type = types.path; - default = "/run/user/%U/tmux-%U/default"; - }; - }; - config = { - # https://superuser.com/a/1582196 - systemd.user.services.tmux-master = { - Unit = { - Description = "tmux master service"; - }; - Service = { - Type = "forking"; - RemainAfterExit = "yes"; - ExecStart = "${pkgs.tmux}/bin/tmux -S ${cfg.socket} new-session -d -s default"; - ExecStop = "${pkgs.tmux}/bin/tmux -S ${cfg.socket} kill-session -t weechat"; - }; - Install = { - WantedBy = ["default.target"]; - }; - }; - }; -} diff --git a/modules/home-manager/weechat-in-tmux-service.nix b/modules/home-manager/weechat-in-tmux-service.nix deleted file mode 100644 index 55067e4..0000000 --- a/modules/home-manager/weechat-in-tmux-service.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - pkgs, - outputs, - config, - ... -}: let - socket = config.services.tmux-master-service.socket; -in { - imports = with outputs.homeManagerModules; [ - tmux-master-service - ]; - systemd.user.services.weechat-in-tmux = { - Unit = { - Description = "weechat in tmux"; - PartOf = "tmux-master.service"; - After = ["tmux-master.service"]; - }; - Service = { - Type = "oneshot"; - RemainAfterExit = "yes"; - ExecStart = "${pkgs.tmux}/bin/tmux -S ${socket} new-session -d -s weechat ${pkgs.weechat}/bin/weechat"; - ExecStop = "${pkgs.tmux}/bin/tmux -S ${socket} kill-session -t weechat"; - }; - Install = { - WantedBy = ["default.target"]; - }; - }; -} diff --git a/nixos/beefcake/default.nix b/nixos/beefcake/default.nix index 219019e..c3a4ecb 100644 --- a/nixos/beefcake/default.nix +++ b/nixos/beefcake/default.nix @@ -566,7 +566,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00 #use sendfile = yes #max protocol = smb2 # note: localhost is the ipv6 localhost ::1 - hosts allow = 10. 192.168.0. 127.0.0.1 localhost + hosts allow = 192.168.0.0/16 127.0.0.1 localhost hosts deny = 0.0.0.0/0 guest account = nobody map to guest = bad user @@ -742,6 +742,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00 443 # https (caddy) # 5357 # ??? 22 # ssh + 6667 # soju irc bouncer 64022 # ssh (for ben?) ]; networking.firewall.allowedUDPPorts = [ @@ -762,5 +763,10 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00 allowPing = true; }; + services.soju = { + enable = true; + listen = ["irc+insecure://:6667"]; + }; + system.stateVersion = "22.05"; }