Mostly security changes, add nouveau as a boot option, simplify settings and prepare for home-manager options

This commit is contained in:
Jimbo 2024-11-29 01:49:18 -05:00
parent 6021f46c20
commit 137a9ab6d9
58 changed files with 281 additions and 269 deletions

View file

@ -1,5 +1,11 @@
{ ... }:
{ lib, ... }:
{
options.home.sway.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable SwayWM";
};
imports = [
./sway
./swaylock

View file

@ -6,13 +6,11 @@
./hotkeys
./programs
./rules
./swayshot
./swaysleep
./theme
];
wayland.windowManager.sway = {
enable = true;
enable = config.home.sway.enable;
package = null;
wrapperFeatures.gtk = true;
checkConfig = false;

View file

@ -1,5 +1,10 @@
{ pkgs, ... }:
{
imports = [
./swayshot
./swaysleep
];
home.packages = with pkgs; [
clipman
swaybg

View file

@ -1,7 +1,5 @@
{ pkgs, config, ... }:
{
imports = [ ./swappy ];
home.packages = with pkgs; [
(pkgs.writeScriptBin "swayshot" ''
# Swappy
@ -14,40 +12,28 @@
| XCURSOR_SIZE=40 slurp -w ${config.look.border.string} -c ${config.look.colors.prime} -B 00000066 -b 00000099)
temp_file=$(mktemp -u).png
grim -g "$selected_area" "$temp_file"
# Kill the imv window
kill $imv_pid
# Copy the screenshot to the clipboard
# Copy the screenshot to the clipboard and clear the temp
swappy -f - < "$temp_file"
# Clean up the temporary file
rm "$temp_file"
}
# Screen
handle_screen() {
# Take a screenshot and save it to the temporary file
temp_file=$(mktemp -u).png
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
# Check if the screenshot was successfully taken
if [ $? -eq 0 ]; then
# Copy the screenshot to the clipboard
wl-copy < "$temp_file"
# Show a notification with the screenshot
notify-send -i "$temp_file" "Current screen copied."
# Remove the temporary file
rm "$temp_file"
else
# If the screenshot capture failed, show an error notification
notify-send "Error: Unable to capture screenshot."
fi
}
# Check for command-line arguments
if [ "$1" == "--swappy" ]; then
handle_swappy
elif [ "$1" == "--screen" ]; then

View file

@ -1,11 +0,0 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [ swappy ];
file.".config/swappy/config".text = ''
[Default]
early_exit=true
save_dir=$HOME/Pictures/Screenshots
'';
};
}

View file

@ -8,7 +8,7 @@ let
text = "#FFFFFFFF";
in {
programs.swaylock = {
enable = true;
enable = config.home.desktop.enable;
package = pkgs.swaylock-effects;
settings = {
clock = true;

View file

@ -241,7 +241,7 @@
format-icons = ["" "" "" "" ""];
};
in {
enable = true;
enable = config.home.desktop.enable;
settings = {
display1 = {
name = "bar1";