introducting rive in flake, extending git

This commit is contained in:
nx2
2024-04-03 12:03:50 +02:00
parent 0e95c69d8c
commit 551b904c32
4 changed files with 279 additions and 186 deletions

View File

@@ -29,6 +29,24 @@
]; ];
}; };
secrets = import ./secrets/passwords-and-certificates.nix; secrets = import ./secrets/passwords-and-certificates.nix;
rice = {
transparency = "0.8";
colors = {
main-fg = "#ffffff";
main-bg = "#000000";
bubble-fg = "#ffffff";
bubble-bg = "#222222";
bubble-border = "#bbbbbb";
secondary-fg = "#ffffff";
secondary-bg = "#222255";
lines = "#bbbbbb";
accent = "#ff00ff"
};
font = {
code = "CascadiaCove-NF";
base = "Atkinson Hyperlegible";
};
};
in in
{ {
nixosConfigurations = { nixosConfigurations = {
@@ -37,7 +55,7 @@
modules = [ modules = [
./configuration.nix ./configuration.nix
]; ];
specialArgs = {inherit user allowed secrets;}; specialArgs = {inherit user allowed secrets rice;};
}; };
}; };
@@ -45,7 +63,7 @@
nx2 = home-manager.lib.homeManagerConfiguration { nx2 = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ ./home.nix ]; modules = [ ./home.nix ];
extraSpecialArgs = {inherit system user allowed secrets pkgs-unstable;}; extraSpecialArgs = {inherit system user allowed secrets pkgs-unstable rice;};
}; };
}; };

View File

@@ -1,9 +1,31 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }: { config, pkgs, lib, system, user, allowed, secrets, ... }:
{ {
home.packages = with pkgs; [
git
delta
# only works on spec arch, chage url for others
(stdenv.mkDerivation {
name = "easycommit";
src = pkgs.fetchurl {
url = "https://github.com/blackironj/easycommit/releases/download/v0.0.1/easycommit-v0.0.1-linux-amd64.tar.gz";
sha256 = "sha256-Ip5wfVe/RzCxGGh1YFBllAn84nD7mUXbnMko+ue/C2E=";
};
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
tar xf $src -C $out/
ls -la $out
mv $out/easycommit $out/bin/
chmod +x $out/bin/easycommit
'';
})
];
programs.git = { programs.git = {
enable = true; enable = true;
userName = "nx2"; userName = ''Lennart J. Kurzweg (Nx2)'';
userEmail = "nx2@nx2.site"; userEmail = "nx2@nx2.site";
delta = { delta = {
enable = true; enable = true;

View File

@@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, pkgs-unstable, rice, lib, ... }:
let let
animation-speed = "4"; animation-speed = "2";
transparency = "0.9"; transparency = "0.9";
gap-size = 10; gap-size = 10;
monitors = { monitors = {
@@ -19,10 +19,14 @@ let
}; };
in in
{ {
home.packages = with pkgs; [ home.packages = [
# hyprland itself is a system package # hyprland itself is a system package
hyprland-protocols pkgs.hyprland-protocols
(writeShellScriptBin "waybar_mode" ''
pkgs-unstable.hyprlock
pkgs-unstable.hypridle
(pkgs.writeShellScriptBin "waybar_mode" ''
#!/bin/bash #!/bin/bash
# Function to print help message # Function to print help message
@@ -69,11 +73,11 @@ in
settings = { settings = {
# source = /home/nx2/.config/hypr/hyprland-nosync.conf; # source = /home/nx2/.config/hypr/hyprland-nosync.conf;
monitor = [ monitor = [
"${monitors.main.name}, ${monitors.main.resolution}, ${monitors.main.position}, ${monitors.main.scale}" "${monitors.main.name}, ${monitors.main.resolution}, ${monitors.main.position}, ${monitors.main.scale}"
]; ];
workspace = [ workspace = [
"${monitors.main.name}, 11" "${monitors.main.name}, 11"
"${monitors.main.name}, 12" "${monitors.main.name}, 12"
"${monitors.main.name}, 13" "${monitors.main.name}, 13"
@@ -96,11 +100,11 @@ workspace = [
"${monitors.second.name}, 28" "${monitors.second.name}, 28"
"${monitors.second.name}, 29" "${monitors.second.name}, 29"
"${monitors.second.name}, 20" "${monitors.second.name}, 20"
]; ];
"device:logitech-wireless-mouse-mx-master-1" = { "device:logitech-wireless-mouse-mx-master-1" = {
sensitivity = -0.2; sensitivity = -0.2;
}; };
# env = XCURSOR_SIZE,18 # env = XCURSOR_SIZE,18
@@ -161,7 +165,9 @@ workspace = [
animations = { animations = {
enabled = true; enabled = true;
bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; # bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o
# bezier = "myBezier, 0.83, 0, 0.17, 1"; # io
bezier = "myBezier, 0.33, 1, 0.68, 1";
animation = [ animation = [
"windows, 1, ${animation-speed}, myBezier, slide" "windows, 1, ${animation-speed}, myBezier, slide"
"border, 1, ${animation-speed}, myBezier" "border, 1, ${animation-speed}, myBezier"
@@ -216,29 +222,31 @@ workspace = [
]; ];
windowrulev2 = [ windowrulev2 = [
"opacity $trans,class:^(com.chatterino.chatterino)$" "opacity ${transparency},class:^(com.chatterino.chatterino)$"
"opacity $trans,class:^(chatterino)$" "opacity ${transparency},class:^(chatterino)$"
"bordercolor rgba(ff00ffff) rgba(ff00ff66), pinned:1" "bordercolor rgba(ff00ffff) rgba(ff00ff66), pinned:1"
]; ];
windowrule = [ windowrule = [
"opacity $trans, code-oss" "opacity ${transparency}, firefox"
"opacity $trans, VSCodium" "opacity ${transparency}, code-oss"
"opacity $trans, Code" "opacity ${transparency}, VSCodium"
"opacity $trans, neovide" "opacity ${transparency}, Code"
"opacity $trans, obsidian" "opacity ${transparency}, neovide"
"opacity $trans, zathura" "opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura"
"bordercolor rgba(ffffffff) rgba(000000b2), Alacritty" "bordercolor rgba(ffffffff) rgba(000000b2), Alacritty"
"bordercolor rgba(ffffffff) rgba(000000b2), Kitty" "bordercolor rgba(ffffffff) rgba(000000b2), Kitty"
"opacity $trans, discord" "opacity ${transparency}, discord"
"opacity $trans, vesktop" "opacity ${transparency}, vesktop"
"opacity $trans, Element" "opacity ${transparency}, Element"
"opacity $trans, thunderbird" "opacity ${transparency}, thunderbird"
"opacity $trans, lutris" "opacity ${transparency}, lutris"
"opacity $trans, element" "opacity ${transparency}, element"
"opacity $trans, ^([sS]potify)$" "opacity ${transparency}, ^([sS]potify)$"
"opacity $trans, virt-manager" "opacity ${transparency}, virt-manager"
"opacity $trans, thunar" "opacity ${transparency}, thunar"
"opacity ${transparency}, title:^(wlogout)$"
"opaque, title:^(GNU Image Manipulation Program)$" "opaque, title:^(GNU Image Manipulation Program)$"
"dimaround, Rofi" "dimaround, Rofi"
"float, title:^(Picture-in-Picture)$" "float, title:^(Picture-in-Picture)$"
@@ -727,30 +735,104 @@ workspace = [
submap = reset submap = reset
''; '';
}; };
home.file = {
".config/hypr/hyprlock.conf".text = ''
background {
monitor = ${monitors.main.name}
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
path = /home/nx2/Pictures/nix-wall.png
blur_size = 4
blur_passes = 3 # 0 disables blurring
noise = 0.0117
contrast = 1.3000 # Vibrant!!!
brightness = 0.8000
vibrancy = 0.2100
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 250, 50
outline_thickness = 1
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = rgba(aaaaaaff)
inner_color = rgba(000000ff)
font_color = rgba(ffffffff)
fade_on_empty = true
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
position = 0, 50
halign = center
valign = bottom
}
# Current time
label {
monitor =
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
color = $color0
font_size = 64
font_family = ${font.code} 10
position = 0, 16
halign = center
valign = center
}
# User label
label {
monitor =
text = Hey <span text_transform="capitalize" size="larger">$USER</span>
color = $color0
font_size = 20
font_family = ${font.code} 10
position = 0, 0
halign = center
valign = center
}
# Type to unlock
label {
monitor =
text = Type to unlock!
color = $color0
font_size = 16
font_family = ${font.code} 10
position = 0, 30
halign = center
valign = bottom
}
'';
};
} }
# plugin { # plugin {
# hycov { # hycov {
# overview_gappo = 60 # gaps width from screen edge # overview_gappo = 60 # gaps width from screen edge
# overview_gappi = 24 # gaps width from clients # overview_gappi = 24 # gaps width from clients
# enable_hotarea = 0 # enable mouse cursor hotarea # enable_hotarea = 0 # enable mouse cursor hotarea
# # hotarea_monitor = all # monitor name which hotarea is in, default is all # # hotarea_monitor = all # monitor name which hotarea is in, default is all
# # hotarea_pos = 1 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right) # # hotarea_pos = 1 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right)
# # hotarea_size = 10 # hotarea size, 10x10 # # hotarea_size = 10 # hotarea size, 10x10
# # swipe_fingers = 4 # finger number of gesture,move any directory # # swipe_fingers = 4 # finger number of gesture,move any directory
# move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move # move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move
# enable_gesture = 0 # enable gesture # enable_gesture = 0 # enable gesture
# disable_workspace_change = 0 # disable workspace change when in overview mode # disable_workspace_change = 0 # disable workspace change when in overview mode
# disable_spawn = 0 # disable bind exec when in overview mode # disable_spawn = 0 # disable bind exec when in overview mode
# auto_exit = 1 # enable auto exit when no client in overview # auto_exit = 1 # enable auto exit when no client in overview
# auto_fullscreen = 0 # auto make active window maximize after exit overview # auto_fullscreen = 0 # auto make active window maximize after exit overview
# only_active_workspace = 0 # only overview the active workspace # only_active_workspace = 0 # only overview the active workspace
# only_active_monitor = 1 # only overview the active monitor # only_active_monitor = 1 # only overview the active monitor
# enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail # enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail
# alt_replace_key = Alt_L # alt swith mode arg,see readme for detail # alt_replace_key = Alt_L # alt swith mode arg,see readme for detail
# alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode # alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode
# click_in_cursor = 0 # when click to jump,the target windwo is find by cursor, not the current foucus window. # click_in_cursor = 0 # when click to jump,the target windwo is find by cursor, not the current foucus window.
# hight_of_titlebar = 0 # height deviation of title bar hight # hight_of_titlebar = 0 # height deviation of title bar hight
# } # }
# } # }

View File

@@ -51,7 +51,7 @@
imv mpv mediainfo exiftool ffmpeg imv mpv mediainfo exiftool ffmpeg
pavucontrol fontpreview gtk2fontsel pavucontrol fontpreview gtk2fontsel
lynx bat du-dust eza neofetch tldr fzf figlet delta ripgrep lolcat jq glow lynx bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
brightnessctl wev brightnessctl wev
element sssnake pipes element sssnake pipes
@@ -64,42 +64,13 @@
python-pkgs.pipdeptree python-pkgs.pipdeptree
python-pkgs.requests python-pkgs.requests
])) ]))
(writeShellScriptBin "nxrbs-nix" '' # (writeShellScriptBin "nxrbs-nix" ''
set -e # set -e
pushd ~/.nix-dots/ # pushd ~/.nix-dots/
git diff # git diff
'') # '')
# only works on spec arch, chage url for others
(stdenv.mkDerivation {
name = "easycommit";
src = pkgs.fetchurl {
url = "https://github.com/blackironj/easycommit/releases/download/v0.0.1/easycommit-v0.0.1-linux-amd64.tar.gz";
sha256 = "sha256-Ip5wfVe/RzCxGGh1YFBllAn84nD7mUXbnMko+ue/C2E=";
};
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
tar xf $src -C $out/
ls -la $out
mv $out/easycommit $out/bin/
chmod +x $out/bin/easycommit
'';
})
];
home.file = { ];
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/nx2/etc/profile.d/hm-session-vars.sh
#
xdg = { xdg = {
enable = true; enable = true;