diff --git a/dot_config/flake/home/sway/default.nix b/dot_config/flake/home/sway/default.nix index 7c5e5e3..d2b609c 100644 --- a/dot_config/flake/home/sway/default.nix +++ b/dot_config/flake/home/sway/default.nix @@ -1,29 +1,86 @@ -{...}: let +{ + pkgs, + lib, + ... +}: let mod = "Mod4"; term = "kitty"; + menu = "rofi -combi-modi window,drun,ssh -show combi -show-icons"; + + image = pkgs.fetchurl { + url = "https://www.pixelstalk.net/wp-content/uploads/image11/Get-Glittery-blue-4K-wallpaper-with-a-calm-cool-sparkle.jpg"; + sha256 = "sha256-inZkyQsiF+aqgj2IK2AKN9STYLJBzG+QQCzw/X7cdcw="; + }; in { imports = [ ./rofi.nix ]; + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + + settings = { + image = "${image}"; + effect-blur = "30x3"; + }; + }; + + services.swayidle = { + enable = true; + extraArgs = ["-w"]; + events = [ + { + event = "before-sleep"; + command = "${lib.getExe pkgs.swaylock-effects} -f"; + } + { + event = "lock"; + command = "${lib.getExe pkgs.swaylock-effects} -f"; + } + ]; + timeouts = [ + { + timeout = 300; + command = "${lib.getExe pkgs.swaylock-effects} -f"; + } + { + timeout = 305; + command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"''; + resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * dpms on"''; + } + { + timeout = 600; + command = ''systemctl suspend''; + } + { + timeout = 1200; + command = ''systemctl hibernate''; + } + ]; + }; + + services.flameshot = { + enable = true; + settings = { + General = { + # disabledTrayIcon = true; + showStartupLaunchMessage = false; + uiColor = "#24273a"; + }; + }; + }; + wayland.windowManager.sway = { enable = true; checkConfig = true; config = rec { output."*" = { scale = "1"; - # bg = "${image} fill"; + background = "${image} fill"; }; - startup = [ - ### Idle configuration - # This will lock your screen after 300 seconds of inactivity, then turn off - # your displays after another 300 seconds, and turn your screens back on when - # resumed. It will also lock your screen before your computer goes to sleep. - {command = "swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg \"output * power off\"' resume 'swaymsg \"output * power on\"' before-sleep 'swaylock -f -c 000000'";} - ]; - - menu = "rofi -combi-modi window,drun,ssh -show combi -show-icons"; + startup = []; # Home row direction keys, like vim up = "k"; @@ -120,6 +177,8 @@ in { # Make the current focus fullscreen "${mod}+f" = "fullscreen"; + + "Print" = "exec flameshot gui"; }; # Drag floating windows by holding down $mod and left mouse button. diff --git a/dot_config/flake/machines/wash/configuration.nix b/dot_config/flake/machines/wash/configuration.nix index 1b9a40d..542e5ad 100644 --- a/dot_config/flake/machines/wash/configuration.nix +++ b/dot_config/flake/machines/wash/configuration.nix @@ -25,10 +25,23 @@ }; # Bootloader. - boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot = { + enable = true; + configurationLimit = 5; + }; + boot.loader.efi.canTouchEfiVariables = true; + boot.plymouth = { + enable = true; + themePackages = [pkgs.catppuccin-plymouth]; + theme = "catppuccin-macchiato"; + }; + + # Nix options + nix.optimise.automatic = true; nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.trustedUsers = ["tyler" "@wheel"]; networking.hostName = "wash"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -117,14 +130,18 @@ environment.systemPackages = with pkgs; [ # unstable.bitwarden-desktop sqlite - vscode + vscode.fhs lm_sensors + + pre-commit ]; fonts.packages = with pkgs; [ nerdfonts ]; + programs.nix-ld.enable = true; + # Install firefox. programs.firefox.enable = true; programs.fish.enable = true;