diff --git a/flake.lock b/flake.lock index 95dcbd6..2fe96ad 100644 --- a/flake.lock +++ b/flake.lock @@ -135,11 +135,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1738686104, - "narHash": "sha256-PfG/bm33axdRPsi3nMB5ioOvq1xdJpdw+iptZVJVmE4=", + "lastModified": 1738721195, + "narHash": "sha256-fg7RyZh7lIXIemVIXNWqoBAXb2Ro5h6P9HJWDMuYi4U=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "52f13caa3c3570bc59582578593b8fafd40f8aaa", + "rev": "9af406ea66edc730a2c64cf82b74a03513b94f5e", "type": "github" }, "original": { @@ -508,11 +508,11 @@ ] }, "locked": { - "lastModified": 1738667255, - "narHash": "sha256-sMMQb9NydZqQ/MvvtPp+Ny0W9P0Jk0moU7SrTBlO5Vo=", + "lastModified": 1738709900, + "narHash": "sha256-8Bo5xFlCH5q72ExvAnH7TzStMlLZldKOSLMClRSfmTc=", "owner": "nix-community", "repo": "home-manager", - "rev": "7abcf59a365430b36f84eaa452a466b11e469e33", + "rev": "f2d32e46fac9d51da6912948ae1156044c71774b", "type": "github" }, "original": { @@ -1078,11 +1078,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738546358, - "narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c6e957d81b96751a3d5967a0fd73694f303cc914", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { @@ -1110,11 +1110,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1738546358, - "narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c6e957d81b96751a3d5967a0fd73694f303cc914", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { diff --git a/homes/emenel/default.nix b/homes/emenel/default.nix index baee39a..9a80a1d 100644 --- a/homes/emenel/default.nix +++ b/homes/emenel/default.nix @@ -8,6 +8,11 @@ ++ [ inputs.emacs-overlay.overlays.default ]; }; + imports = with nix-config.homeModules; [ + mako + mpv + ]; + home = { packages = lib.mkMerge [ [ @@ -17,6 +22,7 @@ inputs.shikane.packages.x86_64-linux.default inputs.isd.packages.x86_64-linux.default inputs.hyprpicker.packages.x86_64-linux.default + inputs.hyprlock.packages.x86_64-linux.default ] (with nix-config.packages.x86_64-linux; [ @@ -87,7 +93,6 @@ gst_all_1.gstreamer alsa-oss powertop - hypridle age sops @@ -398,7 +403,6 @@ defaultSopsFile = ./secrets.yaml; - secrets = { bw_client_id = { path = "${config.sops.defaultSymlinkPath}/bw_client_id"; @@ -415,37 +419,47 @@ }; }; - programs = { - home-manager.enable = true; - mpv = { - enable = true; - package = (pkgs.mpv-unwrapped.wrapper { - scripts = with pkgs.mpvScripts; [ - thumbfast - modernz - ]; - - mpv = pkgs.mpv-unwrapped.override { - waylandSupport = true; - ffmpeg = pkgs.ffmpeg-full; + accounts.email = { + maildirBasePath = "/home/emenel/.maildir"; + accounts = { + "matt@emenel.ca" = { + address = "matt@emenel.ca"; + realName = "Matt Nish-Lapidus"; + primary = true; + mu.enable = true; + mbsync = { + enable = true; + create = "maildir"; }; - }); - config = { - osc = "no"; - profile = "high-quality"; - ytdl-format = "bestvideo+bestaudio"; - cache-default = 4000000; + msmtp.enable = true; + flavor = "fastmail.com"; + passwordCommand = "rbw get mu4e-fastmail"; + }; + + "admin@studyoftime.org" = { + address = "admin@studyoftime.org"; + realName = "ISST Web Admin"; + mu.enable = true; + mbsync = { + enable = true; + create = "maildir"; + }; + msmtp.enable = true; + passwordCommand = "rbw get admin@studyoftime"; + imap.host = "imap.dreamhost.com"; + smtp.host = "imap.dreamhost.com"; + userName = "admin@studyoftime.org"; }; }; + }; + + programs = { + home-manager.enable = true; + direnv = { enable = true; nix-direnv.enable = true; }; - yazi = { - enable = true; - enableFishIntegration = true; - package = inputs.yazi.packages.x86_64-linux.default; - }; fish = { enable = true; shellAliases = { @@ -476,7 +490,9 @@ enable = true; }; mu.enable = true; - mbsync.enable = true; + mbsync = { + enable = true; + }; msmtp.enable = true; emacs = { enable = true; @@ -509,6 +525,7 @@ wezterm = { enable = true; package = inputs.wezterm.packages.${pkgs.system}.default; + extraConfig = lib.readFile ./dotfiles/dot_config/wezterm/wezterm.lua; }; bat = { enable = true; @@ -562,25 +579,12 @@ lfs.enable = true; }; htop.enable = true; - nnn = { - enable = true; - }; pandoc.enable = true; password-store.enable = true; - wlogout = { - enable = true; - }; - hyprlock = { - enable = true; - }; waybar = { enable = true; package = pkgs.waybar; - # systemd = { - # enable = true; - # # target = "graphical-session.target"; - # }; }; eww = { enable = true; @@ -639,10 +643,8 @@ enable = true; package = pkgs.playerctl; }; - mako = { - enable = true; - }; - # flatpak.enable = true; + + flatpak.enable = true; syncthing = { enable = true; # tray.enable = true; @@ -717,17 +719,15 @@ }; # moving files! - xdg.configFile."mako".source = ./dotfiles/dot_config/mako; - xdg.configFile."hypr".source = ./dotfiles/dot_config/hypr; xdg.configFile."halloy/config.toml".source = ./dotfiles/dot_config/halloy/config.toml; xdg.configFile."waybar".source = ./dotfiles/dot_config/waybar; - xdg.configFile."just/justfile".source = ./dotfiles/dot_config/just/justfile; xdg.configFile."starship.toml".source = ./dotfiles/dot_config/starship.toml; - xdg.configFile."ghostty".source = ./dotfiles/dot_config/ghostty; - xdg.configFile."wezterm".source = ./dotfiles/dot_config/wezterm; + xdg.configFile."niri/config.kdl".source = ./dotfiles/dot_config/niri/config.kdl; + + + xdg.configFile."just/justfile".source = ./dotfiles/dot_config/just/justfile; xdg.configFile."git".source = ./dotfiles/dot_config/git; xdg.configFile."rbw".source = ./dotfiles/dot_config/rbw; - xdg.configFile."niri/config.kdl".source = ./dotfiles/dot_config/niri/config.kdl; xdg.configFile."shikane".source = ./dotfiles/dot_config/shikane; home.file.".ssh/config".source = ./dotfiles/dot_ssh/config; home.file.".npmrc".source = ./dotfiles/dot_npmrc; @@ -738,20 +738,17 @@ source = ./dotfiles/dot_config/fish/functions; recursive = true; }; + home.file.".config/fish/completions" = { source = ./dotfiles/dot_config/fish/completions; recursive = true; }; - xdg.configFile."yazi" = { - source = ./dotfiles/dot_config/yazi; - recursive = true; - }; xdg.configFile."emacs".enable = false; - home.file.".msmtprc".source = ./dotfiles/dot_msmtprc; - home.file.".mbsyncrc".source = ./dotfiles/dot_mbsyncrc; - xdg.configFile."isyncrc".enable = false; + # home.file.".msmtprc".source = ./dotfiles/dot_msmtprc; + # home.file.".mbsyncrc".source = ./dotfiles/dot_mbsyncrc; + # xdg.configFile."isyncrc".enable = false; home.file.".local/bin" = { source = ./dotfiles/dot_local/bin; diff --git a/homes/emenel/dotfiles/dot_config/hypr/hyprlock.conf b/homes/emenel/dotfiles/dot_config/hypr/hyprlock.conf index 392d8f9..2e4d59b 100644 --- a/homes/emenel/dotfiles/dot_config/hypr/hyprlock.conf +++ b/homes/emenel/dotfiles/dot_config/hypr/hyprlock.conf @@ -1,5 +1,5 @@ general { - grace = 1 + grace = 3 hide_cursor = true } @@ -9,16 +9,14 @@ background { input-field { monitor = - # size = 250, 60 outline_thickness = 2 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.35 # Scale of dots' absolute size, 0.0 - 1.0 + dots_size = 0.15 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.25 # Scale of dots' absolute size, 0.0 - 1.0 dots_center = true outer_color = rgba(0, 0, 0, 0) inner_color = rgba(225, 225, 225, 0.25) font_color = rgb(0,0,0) fade_on_empty = false - rounding = -1 check_color = rgb(204, 136, 34) placeholder_text = hm ... hide_input = false diff --git a/homes/emenel/dotfiles/dot_config/waybar/style.css b/homes/emenel/dotfiles/dot_config/waybar/style.css index e1da559..245108e 100644 --- a/homes/emenel/dotfiles/dot_config/waybar/style.css +++ b/homes/emenel/dotfiles/dot_config/waybar/style.css @@ -1,7 +1,7 @@ * { border: none; font-size: 12pt; - font-family: "JetBrainsMono Nerd Font,JetBrainsMono NF" ; + font-family: "JetBrainsMono Nerd Font" ; min-height: 25px; } diff --git a/hosts/eddie/configuration.nix b/hosts/eddie/configuration.nix index 4b008ae..b10c3b2 100644 --- a/hosts/eddie/configuration.nix +++ b/hosts/eddie/configuration.nix @@ -6,10 +6,12 @@ { - imports = + imports = with nix-config.nixosModules; [ # Include the results of the hardware scan. ./hardware-configuration.nix ./razer-speaker-fix.nix + + niri ]; nixpkgs = { @@ -17,8 +19,7 @@ allowUnfree = true; }; overlays = builtins.attrValues nix-config.overlays - ++ [ inputs.emacs-overlay.overlays.default - inputs.niri.overlays.default ]; + ++ [ inputs.niri.overlays.default ]; }; # environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; @@ -537,6 +538,7 @@ nerd-fonts.jetbrains-mono nerd-fonts.fira-code nerd-fonts._0xproto + nerd-fonts.symbols-only ]; }; diff --git a/modules/home/hypridle.nix b/modules/home/hypridle.nix new file mode 100644 index 0000000..688bd0c --- /dev/null +++ b/modules/home/hypridle.nix @@ -0,0 +1,62 @@ +{ inputs, ... }: +{ + services.hypridle = { + enable = true; + package = inputs.hypridle.packages.x86_64-linux.default; + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + }; + # TODO: add monitor shut off timout + # battery timers + listener = [ + { + timeout = 30; + on-timeout = "systemd-ac-power || light -S 0"; + on-resume = "systemd-ac-power || light -I"; + } + + { + timeout = "30"; + on-timeout = "systemd-ac-power || light -s razer/0003:1532:02B6.0004/backlight -S 0"; + on-resume = "systemd-ac-power || light -s razer/0003:1532:02B6.0004/backlight -S 40"; + } + + { + timeout = "120"; + on-timeout = "systemd-ac-power || systemd-ac-power && loginctl lock-session"; + } + + { + timeout = "600"; + on-timeout = "systemd-ac-power || systemctl suspend"; + } + + # ac power timers + { + timeout = "60"; + on-timeout = "systemd-ac-power && light -S 0"; + on-resume = "systemd-ac-power && light -I"; + } + + { + timeout = "60"; + on-timeout = "systemd-ac-power && light -s razer/0003:1532:02B6.0004/backlight -S 0"; + on-resume = "systemd-ac-power && light -s razer/0003:1532:02B6.0004/backlight -S 40"; + } + + { + timeout = "300"; + on-timeout = "systemd-ac-power && loginctl lock-session"; + } + + { + timeout = "1800"; + on-timeout = "systemd-ac-power && systemctl suspend"; + } + ]; + + }; + }; +} diff --git a/modules/home/hyprlock.nix b/modules/home/hyprlock.nix new file mode 100644 index 0000000..fff4323 --- /dev/null +++ b/modules/home/hyprlock.nix @@ -0,0 +1,61 @@ +{ inputs, ... }: +{ + programs.hyprlock = { + enable = true; + package = inputs.hyprlock.packages.x86_64-linux.default; + settings = { + + general = { + grace = 3; + hide_cursor = true; + }; + + background = { + color = "rgb(0,0,0)"; + }; + + input-field = { + outline_thickness = 2; + dots_size = 0.15; # Scale of input-field height, 0.2 - 0.8; + dots_spacing = 0.25; # Scale of dots' absolute size, 0.0 - 1.0; + dots_center = true; + outer_color = "rgba(0, 0, 0, 0)"; + inner_color = "rgba(225, 225, 225, 0.25)"; + font_color = "rgb(0,0,0)"; + fade_on_empty = false; + check_color = "rgb(204, 136, 34)"; + placeholder_text = "hm ..."; + hide_input = false; + position = "0, 0"; + halign = "center"; + valign = "center"; + font_family = "JetBrains Mono"; + }; + + # DATE + label = [ + { + text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; + color = "rgba(242, 243, 244, 0.75)"; + font_size = 32; + font_family = "JetBrains Mono"; + position = "0, 300"; + halign = "center"; + valign = "center"; + } + + # TIME + { + text = "cmd[update:1000] echo \"$(date +\"%-I:%M\")\""; + color = "rgba(242, 243, 244, 0.75)"; + font_size = 32; + font_family = "JetBrains Mono"; + position = "0, 200"; + halign = center; + valign = center; + } + ]; + + }; + }; +} diff --git a/modules/home/mako.nix b/modules/home/mako.nix new file mode 100644 index 0000000..e33d632 --- /dev/null +++ b/modules/home/mako.nix @@ -0,0 +1,29 @@ +{ + services.mako = { + enable = true; + maxVisible=5; + sort="-time"; + layer="top"; + anchor="top-right"; + + font="JetbrainsMono-Light 12"; + backgroundColor="#111111"; + textColor="#eeeeee"; + width=300; + height=100; + margin="24"; + padding="16"; + borderSize=2; + borderColor="#eeeeee"; + borderRadius=6; + progressColor="over #5588AAFF"; + icons=true; + maxIconSize=64; + + markup=true; + actions=true; + format="%s\n%b"; + defaultTimeout=5000; + ignoreTimeout=false; + }; +} diff --git a/modules/home/mpv.nix b/modules/home/mpv.nix new file mode 100644 index 0000000..1fcaaac --- /dev/null +++ b/modules/home/mpv.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + programs.mpv = { + enable = true; + package = (pkgs.mpv-unwrapped.wrapper { + scripts = with pkgs.mpvScripts; [ + thumbfast + modernz + ]; + + mpv = pkgs.mpv-unwrapped.override { + waylandSupport = true; + ffmpeg = pkgs.ffmpeg-full; + }; + }); + config = { + osc = "no"; + profile = "high-quality"; + ytdl-format = "bestvideo+bestaudio"; + cache-default = 4000000; + }; + }; +} diff --git a/modules/home/yazi/default.nix b/modules/home/yazi/default.nix new file mode 100644 index 0000000..360b810 --- /dev/null +++ b/modules/home/yazi/default.nix @@ -0,0 +1,17 @@ +{ inputs, ... }: +{ + yazi = { + enable = true; + enableFishIntegration = true; + package = inputs.yazi.packages.x86_64-linux.default; + initLua = ./init.lua; + keymap = { + input.prepend_keymap = [ + { on = ""; run = "shell 'ripdrag \"$@\" -x 2>/dev/null &' --confirm"; } + { on = "y"; run = ["shell 'for path in \"$@\"; do echo \"file://$path\"; done | wl-copy -t text/uri-list'\n" "yank"]; } + { on = ["g" "r"]; run = "shell 'ya emit cd \"$(git rev-parse --show-toplevel)\"'\n"; } + ]; + }; + }; + +} diff --git a/modules/home/yazi/init.lua b/modules/home/yazi/init.lua new file mode 100644 index 0000000..5828a5e --- /dev/null +++ b/modules/home/yazi/init.lua @@ -0,0 +1,23 @@ +-- adds user and group of hovered file/dir to status bar +Status:children_add(function(self) + local h = self._current.hovered + if h and h.link_to then + return " -> " .. tostring(h.link_to) + else + return "" + end +end, 3300, Status.LEFT) + +Status:children_add(function() + local h = cx.active.current.hovered + if h == nil or ya.target_family() ~= "unix" then + return "" + end + + return ui.Line { + ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"), + ":", + ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"), + " ", + } +end, 500, Status.RIGHT)