diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/home-manager/bat.nix | 4 | ||||
| -rw-r--r-- | modules/home-manager/btop.nix | 4 | ||||
| -rw-r--r-- | modules/home-manager/helix.nix | 10 | ||||
| -rw-r--r-- | modules/home-manager/shell.nix | 7 | ||||
| -rw-r--r-- | modules/home-manager/starship.nix | 6 | ||||
| -rw-r--r-- | modules/home-manager/swayidle.nix | 30 | ||||
| -rw-r--r-- | modules/home-manager/swaylock.nix | 23 | ||||
| -rw-r--r-- | modules/home-manager/waybar.nix | 136 | ||||
| -rw-r--r-- | modules/nixos/headscale.nix | 1 | ||||
| -rw-r--r-- | modules/nixos/hyprland.nix | 16 | ||||
| -rw-r--r-- | modules/nixos/tailscale.nix | 2 | ||||
| -rw-r--r-- | modules/users/defin.nix | 3 | ||||
| -rw-r--r-- | modules/users/root.nix | 1 |
13 files changed, 228 insertions, 15 deletions
diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index 5a9802e..3a06076 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -1,4 +1,4 @@ -{ catppuccin-bat, ...}: { +{ inputs, ...}: { # a cat(1) clone with syntax highlighting and Git integration. programs.bat = { enable = true; @@ -7,7 +7,7 @@ theme = "catppuccin-mocha"; }; themes = { - catppuccin-mocha = builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme"; + catppuccin-mocha = builtins.readFile "${inputs.catppuccin-bat}/Catppuccin-mocha.tmTheme"; }; }; } diff --git a/modules/home-manager/btop.nix b/modules/home-manager/btop.nix index 7243a6e..894ff2e 100644 --- a/modules/home-manager/btop.nix +++ b/modules/home-manager/btop.nix @@ -1,5 +1,5 @@ -{ catppuccin-btop, ... }: { - home.file.".config/btop/themes".source = "${catppuccin-btop}/themes"; +{ inputs, ... }: { + home.file.".config/btop/themes".source = "${inputs.catppuccin-btop}/themes"; #replace htop/nmon programs.btop = { diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index d93a2ea..1eaebfb 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -1,11 +1,17 @@ -{ pkgs, catppuccin-helix, ... }: { +{ pkgs, inputs, ... }: { # https://github.com/catppuccin/helix - xdg.configFile."helix/themes".source = "${catppuccin-helix}/themes/default"; + xdg.configFile."helix/themes".source = "${inputs.catppuccin-helix}/themes/default"; programs.helix = { enable = true; package = pkgs.helix; # defaultEditor = true; + # themes = { + # custom = { + # "inherits" = "catpuccin_mocha"; + # "ui.background" = {}; + # }; + # }; settings = { theme = "catppuccin_mocha"; editor = { diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix index cd35607..685cda1 100644 --- a/modules/home-manager/shell.nix +++ b/modules/home-manager/shell.nix @@ -1,4 +1,6 @@ -{nushell-scripts, ... }: { +{inputs, ... }: let + nushell-scripts = inputs.nushell-scripts; +in { programs.nushell = { enable = true; shellAliases = { @@ -13,6 +15,7 @@ # egpu = "(DRI_PRIME=pci-0000_05_00_0 glxinfo | grep 'OpenGL renderer')"; # checkgpu = "(lspci | grep VGA)"; cat = "bat -f # --paging never"; + search = "nix search nixpkgs#"; }; configFile.source = ../../resources/nushell/config.nu; extraConfig = '' @@ -24,6 +27,8 @@ source ${nushell-scripts}/custom-completions/cargo/cargo-completions.nu source ${nushell-scripts}/custom-completions/make/make-completions.nu source ${nushell-scripts}/custom-completions/git/git-completions.nu + use ${nushell-scripts}/themes/nu-themes/catppuccin-mocha.nu + $env.config = ($env.config | merge {color_config: (catppuccin-mocha)}) ''; }; } diff --git a/modules/home-manager/starship.nix b/modules/home-manager/starship.nix index 12d6f6b..eafc03c 100644 --- a/modules/home-manager/starship.nix +++ b/modules/home-manager/starship.nix @@ -1,4 +1,4 @@ -{ catppuccin-starship, ... }: { +{ inputs, ... }: { programs.starship = { enable = true; @@ -6,6 +6,6 @@ command_timeout = 1000; palette = "catppuccin_mocha"; - } // builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml"); + } // builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/palettes/mocha.toml"); }; -}
\ No newline at end of file +} diff --git a/modules/home-manager/swayidle.nix b/modules/home-manager/swayidle.nix new file mode 100644 index 0000000..19cd171 --- /dev/null +++ b/modules/home-manager/swayidle.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: { + services.swayidle = { + enable = true; + systemdTarget = "hyprland-session.target"; + timeouts = + let + dpmsCommand = "${pkgs.hyprland}/bin/hyprctl dispatch dpms"; + brightnessCommand = "${pkgs.brightnessctl}/bin/brightnessctl -s %% brightnessctl s"; + in + [ + { #timeout 180 + timeout = 3; + command = "${brightnessCommand} 15%"; + resumeCommand = "brightnessctl -r"; + } + { + #timeout 300 + timeout = 5; + command = "${dpmsCommand} off && swaylock"; + resumeCommand = "${dpmsCommand} on"; + } + { #timeout 420 + timeout = 7; + command = "${brightnessCommand} 0%"; + resumeCommand = "brightnessctl -r"; + } + ]; + # events.before-sleep.event = "swaylock"; + }; +} diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix new file mode 100644 index 0000000..745d3ef --- /dev/null +++ b/modules/home-manager/swaylock.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: { + programs.swaylock.enable = true; + programs.swaylock.package = pkgs.swaylock-effects; + programs.swaylock.settings = { + ignore-empty-password = true; + clock = true; + screenshots = true; + grace = 10; + indicator-radius = 100; + indicator-thickness = 7; + ring-color = "455a64"; + key-hl-color = "be5046"; + text-color = "ffc107"; + line-color = 00000000; + inside-color = 00000088; + separator-color = 00000000; + fade-in = 4; + effect-blur = "7x3"; + effect-scale = 2; + effect-vignette = "0.5:0.5"; + # effect-compose = [ "0,1.5%;-1x10%;$HOME/.config/sway/lock.svg" "$@" ]; + }; +} diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix new file mode 100644 index 0000000..c35bc75 --- /dev/null +++ b/modules/home-manager/waybar.nix @@ -0,0 +1,136 @@ +{ config, ... }: { + programs.waybar = { + enable = true; + systemd.enable = true; + systemd.target = "hyprland-session.target"; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 40; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "clock" ]; + modules-right = [ "idle_inhibitor" "pulseaudio" "bluetooth" "network" "backlight/slider" "battery" "cpu" "temperature" "memory" "keyboard_state" "tray" ]; + + "tray" = { + icon-size = 21; + spacing = 10; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + "pulseaudio" = { + # // "scroll-step": 1, // %, can be a float + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = "{volume}% "; + format-source-muted = ""; + "format-icons" = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ "" "" "" ]; + }; + on-click = "pavucontrol"; + }; + "wireplumber" = { + on-click = "helvum"; + max-volume = 150; + scroll-step = 0.2; + + # format-bluetooth = "{volume}% {icon} {format_source}"; + # format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " "; + format = "{volume}% {icon} "; + # format-source-muted = ""; + format-icons = { + # headphone = ""; + # hands-free = ""; + # headset = ""; + # phone = ""; + # portable = ""; + # car = ""; + default = [ "" "" "" ]; + }; + # on-click = "pavucontrol" + }; + "network" = { + format-wifi = "{essid} ({signalStrength}%) "; + format-ethernet = "{ipaddr}/{cidr} "; + tooltip-format = "{ifname} via {gwaddr} "; + format-linked = "{ifname} (No IP) "; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + "backlight/slider" = { + min = 1; + max = 100; + orientation = "horizontal"; + # device = "intel_backlight"; + }; + "clock" = { + format = "{:%H:%M} "; + format-alt = "{:%A, %B %d, %Y (%R)} "; + # timezone = config.time.timeZone; + timezone = "US/Mountain"; + tooltip-format = "<tt><small>{calendar}</small></tt>"; + "calendar" = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "right"; + on-scroll = 1; + on-right-click = "mode"; + "format" = { + months = "<span color='#ffead3'><b>{}</b></span>"; + days = "<span color='#ecc6d9'><b>{}</b></span>"; + weeks = "<span color='#99ffdd'><b>W{}</b></span>"; + weekdays = "<span color='#ffcc66'><b>{}</b></span>"; + today = "<span color='#ff6699'><b><u>{}</u></b></span>"; + }; + }; + }; + "battery" = { + interval = 60; + states = { + "warning" = 30; + "critical" = 15; + }; + format = "{capacity}% {icon}"; + format-icons = [ "" "" "" "" "" ]; + max-length = 25; + }; + "cpu" = { + format = "{usage}% "; + tooltip = false; + }; + "memory" = { + format = "{used:0.1f}G/{total:0.1f}G "; + }; + "temperature" = { + format = "{temperatureC}°C "; + }; + "keyboard-state" = { + numlock = true; + capslock = true; + "format" = { + numlock = "N {icon}"; + # capslock = "C {icon}"; + }; + "format-icons" = { + locked = ""; + unlocked = ""; + }; + }; + }; + }; + }; +} diff --git a/modules/nixos/headscale.nix b/modules/nixos/headscale.nix index f3314fc..261dd52 100644 --- a/modules/nixos/headscale.nix +++ b/modules/nixos/headscale.nix @@ -29,5 +29,6 @@ in { }; networking.firewall.allowedTCPPorts = [ 80 443 ]; + environment.systemPackages = [ config.services.headscale.package ]; } diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index 3ccc77c..3167314 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -3,7 +3,8 @@ enable = true; wlr.enable = true; extraPortals = with pkgs; [ - xdg-desktop-portal-wlr + # xdg-desktop-portal-wlr + xdg-desktop-portal-hyprland ]; }; @@ -50,13 +51,16 @@ environment.systemPackages = with pkgs; [ waybar # the status bar swaybg # the wallpaper + hyprpaper # hyprland wallpeper swayidle # the idle timeout - swaylock # locking the screen + swaylock-effects # locking the screen + brightnessctl # control device brightness wlogout # logout menu wl-clipboard # copying and pasting hyprpicker # color picker wf-recorder # screen recording + xwaylandvideobridge # lets xwayland programs see wayland applications for screensharing grim # taking screenshots slurp # selecting a region to screenshot # TODO replace by 'flameshot gui --raw | wl-copy' @@ -73,8 +77,14 @@ networkmanagerapplet # provide GUI app: nm-connection-editor xfce.thunar # sfce4's file manager + # gnome.gnome-keyring # for remembering wifi passwords + # gnome.libgnome-keyring + polkit-kde-agent + ]; + fonts.packages = with pkgs; [ + font-awesome # fixes waybar fonts ]; # fix https://github.com/ryan4yin/nix-config/issues/10 security.pam.services.swaylock = {}; -}
\ No newline at end of file +} diff --git a/modules/nixos/tailscale.nix b/modules/nixos/tailscale.nix index e73aec9..774a959 100644 --- a/modules/nixos/tailscale.nix +++ b/modules/nixos/tailscale.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ config, ... }: { services.tailscale = { enable = true; extraUpFlags = [ diff --git a/modules/users/defin.nix b/modules/users/defin.nix index 86fe112..cb3a919 100644 --- a/modules/users/defin.nix +++ b/modules/users/defin.nix @@ -14,12 +14,13 @@ openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmzvB5AfjjioiGywizWdBVsarvOSw4YGhgxhk8w34rZA4DghCXme8ILbkk4x4k+VTC6dPVKkvjPY1nn+qx1BtySSSj30Oez7iIqmMH2DvsQMa4zBPe6W4CUo76HrkqR4+rghto8fYZFCo6JhScUr48TvpGIEqsWRQxIGXvFpAazmu1OlsycWatruYwJby5wg2ZIEL9Ci0OHdwGfU1OTexY1Bl03s5Qr6dodvdwSc0ft6Qtv/ijy7iC3ySB2NhirUfDOtS8ysV3yhyxlcXgdI1vksZ6GIoB7TsfdcnpCMcOPSGvQLnAY4+5IDQElkC2igSBSiuUbqDbzNSRw+ctHsoqKAyjAob51XphVJh7CcgBkFufSTJLsOBhyyZSrEBlNB7AHJrFQSnoYYlFjILx4gfcqBxDMOSFL1CiarOq3oZ+udaX06uhIjVXzZhkggqxrCRRwOtPd6eKbuK+2oa0h93QtKQQhrwXCpbVRBe5V3u3i4I7xFFMpYJ3Kcteiua1qxKhF9RNP4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" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBrDUymBW+rosSI68sxDKLMfH7cOPPLG5K+CuA6aYcsp defin@bosco" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHXrt3+N4+ahtXZCUn11evQsVGsGgAohGwafC29/a4fk defin@Radahn" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICkGcmYIYCe6GHsZZvnXqsedF0wn+AhGSr+RPJtUO/kl defin@khad" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEaMYXO9ghATyUPzyE7aD/XVVmK9UAexueoGEYAqPT4L defin@kebab" ]; }; }; diff --git a/modules/users/root.nix b/modules/users/root.nix index 7fb9418..9464651 100644 --- a/modules/users/root.nix +++ b/modules/users/root.nix @@ -6,4 +6,5 @@ hashedPassword = "$6$UljPNAdxZ22lP3Bc$8VaEAacZxtXM3Zji2IA7Jf5fXs9pFnAVQff1d8IbfFOKCvjibceyopOAjRXa8lXtpOSJgPW1OO1dzOspqhWnz0"; }; }; + services.openssh.settings.PasswordAuthentication = false; } |
