....
This commit is contained in:
@@ -2,14 +2,9 @@
|
|||||||
# special thanks to: https://github.com/lostMia/nixos-config
|
# special thanks to: https://github.com/lostMia/nixos-config
|
||||||
# TODOs
|
# TODOs
|
||||||
# - monitor scaling
|
# - monitor scaling
|
||||||
# - fix copying
|
|
||||||
# - flameshot
|
# - flameshot
|
||||||
# - rofi config
|
# - background and transperency
|
||||||
# - rofi show ssh as well
|
|
||||||
# - fix audio next,prev
|
|
||||||
# - backgroudn and transperency
|
|
||||||
# - hibernation
|
# - hibernation
|
||||||
# - swapfile not found in stage1
|
|
||||||
# - win + D command
|
# - win + D command
|
||||||
# - kernel output for luks pwd on all displays
|
# - kernel output for luks pwd on all displays
|
||||||
|
|
||||||
@@ -66,6 +61,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
home-manager.users.me.services.swayosd.enable = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
@@ -80,6 +76,32 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
# flameshot where clipboard works with wayland
|
||||||
|
(flameshot.overrideAttrs (prev: {
|
||||||
|
nativeBuildInputs = prev.nativeBuildInputs or [] ++ [ libsForQt5.kguiaddons ];
|
||||||
|
cmakeFlags = prev.nativeBuildInputs or [] ++ [ "-DUSE_WAYLAND_CLIPBOARD=true" "-DUSE_WAYLAND_GRIM=ON" ];
|
||||||
|
patches = prev.patches or [] ++ [ ../overlays/patches/flameshot-wayland.patch ];
|
||||||
|
}))
|
||||||
|
|
||||||
|
waybar
|
||||||
|
/*
|
||||||
|
(waybar.overrideAttrs (prev: {
|
||||||
|
//patches = prev.patches or [] ++ [
|
||||||
|
//(pkgs.fetchpatch {
|
||||||
|
//url = "https://github.com/alebastr/Waybar/commit/reload-signal-fix.patch";
|
||||||
|
//hash = "sha256-c4+A7biF1FOLemjcr+TobWMLUnha8zbHIkLaW24iUcQ=";
|
||||||
|
//})
|
||||||
|
//];
|
||||||
|
patches = [];
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "alebastr";
|
||||||
|
repo = "Waybar";
|
||||||
|
rev = "d8a7f429e756f4dc378ed1cb9824d47ea46edab5";
|
||||||
|
hash = "sha256-EB7tA2mHv67Hq1yMMDJ7YuQdAinrcpI0GkLxsTguWac=";
|
||||||
|
};
|
||||||
|
}))
|
||||||
|
*/
|
||||||
|
|
||||||
xdg-desktop-portal
|
xdg-desktop-portal
|
||||||
wlr-randr
|
wlr-randr
|
||||||
rofi-wayland
|
rofi-wayland
|
||||||
@@ -87,7 +109,7 @@
|
|||||||
swayfx
|
swayfx
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
zoxide
|
zoxide
|
||||||
waybar
|
|
||||||
power-profiles-daemon
|
power-profiles-daemon
|
||||||
brightnessctl
|
brightnessctl
|
||||||
autotiling
|
autotiling
|
||||||
@@ -103,7 +125,6 @@
|
|||||||
sway-audio-idle-inhibit
|
sway-audio-idle-inhibit
|
||||||
dunst
|
dunst
|
||||||
libnotify
|
libnotify
|
||||||
nur.repos.kira-bruneau.swaylock-fprintd
|
|
||||||
swayidle
|
swayidle
|
||||||
corrupter
|
corrupter
|
||||||
swayosd
|
swayosd
|
||||||
@@ -157,7 +178,7 @@
|
|||||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
set $mod Mod1
|
set $mod Mod4
|
||||||
set $left h
|
set $left h
|
||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
@@ -174,9 +195,9 @@
|
|||||||
### Input configuration
|
### Input configuration
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_layout de,de
|
xkb_layout de,de
|
||||||
repeat_delay 160,160
|
repeat_delay 130,130
|
||||||
repeat_rate 80,80
|
repeat_rate 90,90
|
||||||
xkb_options altwin:swap_lalt_lwin
|
# xkb_options altwin:swap_lalt_lwin
|
||||||
}
|
}
|
||||||
|
|
||||||
# altwin:swap_lalt_lwin swaps the left alt and windows keys, so the win key is on the right and the alt is on the left.
|
# altwin:swap_lalt_lwin swaps the left alt and windows keys, so the win key is on the right and the alt is on the left.
|
||||||
@@ -206,35 +227,51 @@
|
|||||||
|
|
||||||
## Autostart
|
## Autostart
|
||||||
exec autotiling # Automatically tiles in whatever direction is the longest
|
exec autotiling # Automatically tiles in whatever direction is the longest
|
||||||
exec "/usr/bin/env bash ${./..}/scripts/idlescript" # Manages suspending and locking
|
|
||||||
exec "/usr/bin/env bash ${./..}/scripts/batteryscript.sh" # Sends battery notifications when necessary
|
#exec "/usr/bin/env bash ${./..}/scripts/idlescript" # Manages suspending and locking
|
||||||
|
exec ${pkgs.bash}/bin/bash ${./..}/scripts/batteryscript.sh # Sends battery notifications when necessary
|
||||||
exec nm-applet # Networkmanager applet
|
exec nm-applet # Networkmanager applet
|
||||||
exec blueman-applet # Bluetoothmanager applet
|
exec blueman-applet # Bluetoothmanager applet
|
||||||
exec blueman-tray # Bluetoothmanager tray icon
|
exec blueman-tray # Bluetoothmanager tray icon
|
||||||
exec shikane # Manages displays and known display setups
|
exec shikane # Manages displays and known display setups
|
||||||
exec sway-audio-idle-inhibit # Prevents sleep when audio is playing
|
exec sway-audio-idle-inhibit # Prevents sleep when audio is playing
|
||||||
exec swayosd-server # OSD server for audio and screen brightness popups
|
|
||||||
exec waybar # Status bar for sway
|
exec waybar # Status bar for sway
|
||||||
|
exec swayosd-server
|
||||||
|
|
||||||
assign [class="vesktop"] workspace 1
|
exec swayidle lock ${pkgs.writeScriptBin "my-lock" ''
|
||||||
assign [class="Signal"] workspace 1
|
swaylock
|
||||||
assign [app_id="firefox"] workspace 2
|
systemctl suspend-then-hibernate
|
||||||
assign [app_id="thunderbird"] workspace 10
|
''}/bin/my-lock
|
||||||
|
|
||||||
|
#assign [class="vesktop"] workspace 1
|
||||||
|
#assign [class="Signal"] workspace 1
|
||||||
|
#assign [app_id="firefox"] workspace 2
|
||||||
|
#assign [app_id="thunderbird"] workspace 10
|
||||||
|
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
bindsym Mod4+Shift+Return exec $term
|
#bindsym Mod4+Shift+Return exec $term
|
||||||
|
|
||||||
|
bindsym --locked $mod+d exec wlr-randr --output eDP-1 --on
|
||||||
|
bindsym --locked $mod+Shift+d exec wlr-randr --output eDP-1 --off
|
||||||
|
|
||||||
bindsym $mod+Shift+Return exec $term
|
bindsym $mod+Shift+Return exec $term
|
||||||
bindsym $mod+delete exec $term
|
bindsym $mod+delete exec $term
|
||||||
bindsym $mod+Shift+c kill
|
bindsym $mod+Shift+c kill
|
||||||
bindsym $mod+q reload
|
bindsym $mod+q reload
|
||||||
bindsym $mod+x exec ${./..}/scripts/lockscript
|
bindsym $mod+x exec swaylock
|
||||||
|
bindsym $mod+Shift+x exec bash -c "swaylock; systemctl suspend-then-hibernate"
|
||||||
|
|
||||||
|
|
||||||
|
#exec swayidle -w \
|
||||||
|
#timeout 300 'swaylock -f -c 000000 -i $lock_bg' \
|
||||||
|
#timeout 600 'swaymsg "output * dpms off"' \
|
||||||
|
#resume 'swaymsg "output * dpms on"' \
|
||||||
|
#before-sleep 'swaylock -f -c 000000 -i $lock_bg'
|
||||||
|
|
||||||
bindsym $mod+Shift+s exec "${./..}/scripts/screenshot.sh"
|
bindsym $mod+Shift+s exec "${./..}/scripts/screenshot.sh"
|
||||||
|
|
||||||
#bindsym $mod+p exec $menu -show combi -combi-modes "run" -modi combi -monitor "eDP-1" # rofi
|
bindsym $mod+p exec $menu -show combi -combi-modes "ssh,run"
|
||||||
bindsym $mod+p exec $menu -show combi -combi-modes "run" -modi combi
|
|
||||||
bindsym $mod+Shift+p exec $menu -show ssh -monitor "eDP-1"
|
|
||||||
|
|
||||||
bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||||
|
|
||||||
@@ -248,13 +285,17 @@
|
|||||||
#bindsym $mod+p exec ${./..}/scripts/toggle_freeze_process.sh
|
#bindsym $mod+p exec ${./..}/scripts/toggle_freeze_process.sh
|
||||||
|
|
||||||
# Function Keys
|
# Function Keys
|
||||||
bindsym $mod+Shift+m exec sleep 0.1 && swaymsg output eDP-1 dpms toggle
|
#bindsym $mod+Shift+m exec sleep 0.1 && swaymsg output eDP-1 dpms toggle
|
||||||
|
|
||||||
bindsym $mod+Shift+y exec swayosd-client --brightness -2
|
bindsym $mod+Shift+y exec swayosd-client --brightness -8
|
||||||
bindsym $mod+y exec swayosd-client --brightness +2
|
bindsym $mod+y exec swayosd-client --brightness +8
|
||||||
|
|
||||||
#bindsym $mod+m exec swayosd-client --output-volume mute-toggle --max-volume 200
|
#bindsym $mod+m exec swayosd-client --output-volume mute-toggle --max-volume 200
|
||||||
|
|
||||||
|
bindsym $mod+n exec playerctl next
|
||||||
|
bindsym $mod+Shift+n exec playerctl previous
|
||||||
|
bindsym $mod+c exec playerctl play-pause
|
||||||
|
|
||||||
bindsym $mod+Shift+v exec swayosd-client --output-volume -2 --max-volume 200
|
bindsym $mod+Shift+v exec swayosd-client --output-volume -2 --max-volume 200
|
||||||
bindsym $mod+v exec swayosd-client --output-volume +2 --max-volume 200
|
bindsym $mod+v exec swayosd-client --output-volume +2 --max-volume 200
|
||||||
|
|
||||||
@@ -335,9 +376,9 @@
|
|||||||
|
|
||||||
# Layout stuff:
|
# Layout stuff:
|
||||||
gaps inner 2
|
gaps inner 2
|
||||||
gaps outer 2
|
gaps outer 0
|
||||||
|
|
||||||
gaps top 5
|
gaps top 0
|
||||||
#smart_borders on
|
#smart_borders on
|
||||||
#smart_gaps on
|
#smart_gaps on
|
||||||
|
|
||||||
@@ -353,9 +394,10 @@
|
|||||||
bindsym $mod+Comma layout tabbed
|
bindsym $mod+Comma layout tabbed
|
||||||
bindsym $mod+Period layout toggle split
|
bindsym $mod+Period layout toggle split
|
||||||
|
|
||||||
bindsym $mod+Return fullscreen
|
bindsym $mod+space fullscreen
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
bindsym $mod+space focus mode_toggle
|
#bindsym $mod+r focus mode_toggle
|
||||||
|
bindsym $mod+r exec sh -c "echo Run > ~/.mize/mize_dev_module/pipe"
|
||||||
|
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||||
@@ -376,15 +418,15 @@
|
|||||||
# down will grow the containers height
|
# down will grow the containers height
|
||||||
set $move_amount 175px
|
set $move_amount 175px
|
||||||
|
|
||||||
bindsym $mod+Mod4+$right resize grow width $move_amount
|
bindsym $mod+Mod1+$right resize grow width $move_amount
|
||||||
bindsym $mod+Mod4+$up resize shrink height $move_amount
|
bindsym $mod+Mod1+$up resize shrink height $move_amount
|
||||||
bindsym $mod+Mod4+$down resize grow height $move_amount
|
bindsym $mod+Mod1+$down resize grow height $move_amount
|
||||||
bindsym $mod+Mod4+$left resize shrink width $move_amount
|
bindsym $mod+Mod1+$left resize shrink width $move_amount
|
||||||
|
|
||||||
bindsym $mod+Mod4+Left resize grow width $move_amount
|
bindsym $mod+Mod1+Left resize grow width $move_amount
|
||||||
bindsym $mod+Mod4+Down resize shrink height $move_amount
|
bindsym $mod+Mod1+Down resize shrink height $move_amount
|
||||||
bindsym $mod+Mod4+Up resize grow height $move_amount
|
bindsym $mod+Mod1+Up resize grow height $move_amount
|
||||||
bindsym $mod+Mod4+Right resize shrink width $move_amount
|
bindsym $mod+Mod1+Right resize shrink width $move_amount
|
||||||
|
|
||||||
# Return to default mode
|
# Return to default mode
|
||||||
# bindsym Return mode "default"
|
# bindsym Return mode "default"
|
||||||
@@ -1044,42 +1086,58 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me.home.file.".config/swaylock/config".text = ''
|
|
||||||
daemonize
|
|
||||||
show-failed-attempts
|
|
||||||
show-keyboard-layout
|
|
||||||
ignore-empty-password
|
|
||||||
fingerprint
|
|
||||||
image=$HOME/Pictures/Screenshots/screen.png
|
|
||||||
indicator-radius=200
|
|
||||||
indicator-thickness=10
|
|
||||||
inside-color=#00000000
|
|
||||||
line-color=#00000000
|
|
||||||
ring-color=#00000000
|
|
||||||
text-color=#00000000
|
|
||||||
|
|
||||||
layout-bg-color=#00000000
|
security.pam.services.swaylock = {
|
||||||
layout-text-color=#00000000
|
text = ''
|
||||||
|
auth include login
|
||||||
inside-clear-color=#00000000
|
|
||||||
line-clear-color=#00000000
|
|
||||||
ring-clear-color=#ffff99
|
|
||||||
text-clear-color=#00000000
|
|
||||||
|
|
||||||
inside-ver-color=#00000000
|
|
||||||
line-ver-color=#00000000
|
|
||||||
ring-ver-color=#70ffff
|
|
||||||
text-ver-color=#00000000
|
|
||||||
|
|
||||||
inside-wrong-color=#00000000
|
|
||||||
line-wrong-color=#00000000
|
|
||||||
ring-wrong-color=#ff5555
|
|
||||||
text-wrong-color=#00000000
|
|
||||||
|
|
||||||
bs-hl-color=#ff5555
|
|
||||||
key-hl-color=#99ff99
|
|
||||||
|
|
||||||
text-caps-lock-color=#ffffff
|
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
home-manager.users.me.programs.swaylock = {
|
||||||
|
package = pkgs.writeScriptBin "swaylock" ''
|
||||||
|
path=/tmp/lock_screen_picture.png
|
||||||
|
grim "$path" &&
|
||||||
|
corrupter -add 0 -bheight 20 -stdabber 10 -boffset 50 "$path" "$path" &&
|
||||||
|
|
||||||
|
#swaymsg "output * dpms on"
|
||||||
|
${nur.repos.kira-bruneau.swaylock-fprintd}/bin/swaylock
|
||||||
|
'';
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
daemonize = true;
|
||||||
|
show-failed-attempts = true;
|
||||||
|
show-keyboard-layout = true;
|
||||||
|
ignore-empty-password = true;
|
||||||
|
fingerprint = true;
|
||||||
|
image = "/tmp/lock_screen_picture.png";
|
||||||
|
indicator-radius = 200;
|
||||||
|
indicator-thickness = 10;
|
||||||
|
inside-color = "#00000000";
|
||||||
|
line-color = "#00000000";
|
||||||
|
ring-color = "#00000000";
|
||||||
|
text-color = "#00000000";
|
||||||
|
|
||||||
|
layout-bg-color = "#00000000";
|
||||||
|
layout-text-color = "#00000000";
|
||||||
|
|
||||||
|
inside-clear-color = "#555755";
|
||||||
|
line-clear-color = "#00000000";
|
||||||
|
ring-clear-color = "#ffff99";
|
||||||
|
text-clear-color = "#00000000";
|
||||||
|
|
||||||
|
inside-ver-color = "#00000000";
|
||||||
|
line-ver-color = "#00000000";
|
||||||
|
ring-ver-color = "#70ffff";
|
||||||
|
text-ver-color = "#00000000";
|
||||||
|
|
||||||
|
inside-wrong-color = "#00000000";
|
||||||
|
line-wrong-color = "#00000000";
|
||||||
|
ring-wrong-color = "#ff5555";
|
||||||
|
text-wrong-color = "#00000000";
|
||||||
|
|
||||||
|
bs-hl-color = "#ff5555";
|
||||||
|
key-hl-color = "#99ff99";
|
||||||
|
|
||||||
|
text-caps-lock-color = "#ffffff";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
21
flake.lock
generated
21
flake.lock
generated
@@ -3667,6 +3667,7 @@
|
|||||||
"robotnix": "robotnix",
|
"robotnix": "robotnix",
|
||||||
"systems": "systems_5",
|
"systems": "systems_5",
|
||||||
"victorinix": "victorinix",
|
"victorinix": "victorinix",
|
||||||
|
"waveforms": "waveforms",
|
||||||
"zephyr-nix": "zephyr-nix",
|
"zephyr-nix": "zephyr-nix",
|
||||||
"zmk-nix": "zmk-nix"
|
"zmk-nix": "zmk-nix"
|
||||||
}
|
}
|
||||||
@@ -4157,6 +4158,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"waveforms": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740296893,
|
||||||
|
"narHash": "sha256-8FQRWdQXqRI7EfDjx9EkQMpnEEQXmK/m/PSRWcRIagc=",
|
||||||
|
"owner": "liff",
|
||||||
|
"repo": "waveforms-flake",
|
||||||
|
"rev": "d210e3a743349a659a1cfdc202cba32bae6f2dbc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "liff",
|
||||||
|
"repo": "waveforms-flake",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ws-butler": {
|
"ws-butler": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|||||||
@@ -82,6 +82,11 @@
|
|||||||
url = "github:lilyinstarlight/zmk-nix";
|
url = "github:lilyinstarlight/zmk-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waveforms = {
|
||||||
|
url = "github:liff/waveforms-flake";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-generators, flake-utils, systems, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-generators, flake-utils, systems, ... }@inputs:
|
||||||
|
|||||||
223
hosts/fusu.nix
223
hosts/fusu.nix
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, secretsDir, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common/all.nix
|
../common/all.nix
|
||||||
@@ -30,6 +30,8 @@
|
|||||||
#];
|
#];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
boot.zfs.package = pkgs.zfs_unstable;
|
boot.zfs.package = pkgs.zfs_unstable;
|
||||||
boot.zfs.forceImportRoot = false;
|
boot.zfs.forceImportRoot = false;
|
||||||
@@ -89,6 +91,21 @@
|
|||||||
8080 # for mitm proxy
|
8080 # for mitm proxy
|
||||||
5901 # vnc
|
5901 # vnc
|
||||||
|
|
||||||
|
5357 # wsdd
|
||||||
|
8080 # for mitm proxy
|
||||||
|
|
||||||
|
49388
|
||||||
|
49389
|
||||||
|
49390
|
||||||
|
49391
|
||||||
|
49392
|
||||||
|
49393
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [
|
||||||
|
3702 # wsdd
|
||||||
|
67 # allow DHCP traffic
|
||||||
|
53 # allow dns
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.networkmanager.enable = false; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = false; # Easiest to use and most distros use this by default.
|
||||||
@@ -101,6 +118,11 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ntfs3g
|
ntfs3g
|
||||||
virtiofsd
|
virtiofsd
|
||||||
|
bcache-tools
|
||||||
|
su
|
||||||
|
fuse3
|
||||||
|
terraform
|
||||||
|
usbutils
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
@@ -131,4 +153,203 @@
|
|||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
############################ update ip service
|
||||||
|
|
||||||
|
systemd.services.update-ip =
|
||||||
|
let
|
||||||
|
update-ip = pkgs.writeShellApplication {
|
||||||
|
name = "update-ip";
|
||||||
|
|
||||||
|
runtimeInputs = with pkgs; [ curl w3m ];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
ip=$(curl my.ip.fi)
|
||||||
|
curl "http://dynv6.com/api/update?hostname=${builtins.readFile "${secretsDir}/dns-name-two"}&ipv4=$ip&token=${builtins.readFile "${secretsDir}/dns-name-two-token"}"
|
||||||
|
curl "https://dynamicdns.park-your-domain.com/update?host=home&domain=${builtins.readFile "${secretsDir}/dns-name"}&password=${builtins.readFile "${secretsDir}/dns-name-token"}&ip=$ip"
|
||||||
|
|
||||||
|
# https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-to-dynamically-update-the-hosts-ip-with-an-https-request/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
#curl "https://dynamicdns.park-your-domain.com/update?host=mc&domain=c2vi.dev&password=${builtins.readFile "${secretsDir}/dns-name-token"}&ip=$ip"
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
description = "dyndns ip updates";
|
||||||
|
unitConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "500s";
|
||||||
|
ExecStart = "${update-ip}/bin/update-ip";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###################################### get oci ampere vm ####################################
|
||||||
|
|
||||||
|
systemd.services.oci-ampere =
|
||||||
|
let
|
||||||
|
oci-ampere = pkgs.writeShellApplication {
|
||||||
|
name = "oci-ampere";
|
||||||
|
|
||||||
|
runtimeInputs = with pkgs; [ terraform ];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
if [[ -f /home/me/here/oci-ampere-vm/not_gotten ]]
|
||||||
|
then
|
||||||
|
echo not gotten....................................
|
||||||
|
pwd
|
||||||
|
cd /home/me/here/oci-ampere-vm
|
||||||
|
terraform apply -auto-approve && rm /home/me/here/oci-ampere-vm/not_gotten
|
||||||
|
else
|
||||||
|
echo gotten!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = false;
|
||||||
|
description = "get a oci ampere vm";
|
||||||
|
unitConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "500s";
|
||||||
|
ExecStart = "${oci-ampere}/bin/oci-ampere";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
################################ samba ######################################
|
||||||
|
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
||||||
|
|
||||||
|
# needed see: [[samba problems]] in my obsidian vault
|
||||||
|
users.users.files.group = "files";
|
||||||
|
users.groups.files = {};
|
||||||
|
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
securityType = "user";
|
||||||
|
extraConfig = ''
|
||||||
|
server role = standalone server
|
||||||
|
map to guest = bad user
|
||||||
|
usershare allow guests = yes
|
||||||
|
hosts allow = 192.168.0.0/16
|
||||||
|
hosts deny = 0.0.0.0
|
||||||
|
workgroup = WORKGROUP
|
||||||
|
security = user
|
||||||
|
'';
|
||||||
|
shares = {
|
||||||
|
files = {
|
||||||
|
"valid users" = "files";
|
||||||
|
"comment" = "all my files";
|
||||||
|
"path" = "/home/files/storage/files";
|
||||||
|
"browsable" = "no";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"force user" = "files";
|
||||||
|
"force group" = "files";
|
||||||
|
"force create mode" = "0777";
|
||||||
|
# Papierkorb
|
||||||
|
"vfs object" = "recycle";
|
||||||
|
"recycle:repository" = "/home/files/storage/files/trash-files";
|
||||||
|
"recycle:keeptree" = "Yes";
|
||||||
|
"recycle:versions" = "Yes";
|
||||||
|
"recycle:touch" = "Yes";
|
||||||
|
"recycle:touch_mtime" = "Yes";
|
||||||
|
"recycle:maxsize" = "80000";
|
||||||
|
};
|
||||||
|
lan = {
|
||||||
|
"comment" = "gastordner";
|
||||||
|
"path" = "/home/files/storage/lan";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"force user" = "files";
|
||||||
|
"force group" = "files";
|
||||||
|
"force create mode" = "0777";
|
||||||
|
# Papierkorb
|
||||||
|
"vfs object" = "recycle";
|
||||||
|
"recycle:repository" = "/home/files/storage/files/trash-lan";
|
||||||
|
"recycle:keeptree" = "No";
|
||||||
|
"recycle:versions" = "Yes";
|
||||||
|
"recycle:touch" = "Yes";
|
||||||
|
"recycle:touch_mtime" = "Yes";
|
||||||
|
"recycle:maxsize" = "8000";
|
||||||
|
};
|
||||||
|
mama = {
|
||||||
|
"comment" = "Meine Dateien auf Mamas Laptop";
|
||||||
|
"path" = "/home/files/storage/files/stuff/Mamas-Laptop";
|
||||||
|
"browsable" = "no";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"valid users" = "mamafiles";
|
||||||
|
"force user" = "files";
|
||||||
|
"force group" = "files";
|
||||||
|
"force create mode" = "0777";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
############################## backup to onedrive ##################################
|
||||||
|
# needs that
|
||||||
|
programs.fuse.userAllowOther = true; # otherwise the root user has no acces to the mount
|
||||||
|
|
||||||
|
systemd.services.rclone-mount-backup = {
|
||||||
|
enable = false;
|
||||||
|
description = "Mount rclone backup folder";
|
||||||
|
unitConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.bash}/bin/bash -c 'export PATH=/run/wrappers/bin:$PATH; id; ${pkgs.rclone}/bin/rclone mount --allow-non-empty --allow-other --vfs-cache-max-size 2G --vfs-cache-mode full backup: /home/files/backup'";
|
||||||
|
User = "files";
|
||||||
|
Group = "files";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.borgbackup.jobs.files = {
|
||||||
|
#user = "files";
|
||||||
|
extraCreateArgs = "--verbose --list --filter=AMECbchfs --stats --checkpoint-interval 600";
|
||||||
|
extraArgs = "--progress";
|
||||||
|
paths = "/home/files/storage";
|
||||||
|
doInit = false;
|
||||||
|
repo = "/home/files/backup/dateien-backup-borg-repo";
|
||||||
|
compression = "lzma,9";
|
||||||
|
startAt = "weekly";
|
||||||
|
user = "files";
|
||||||
|
group = "files";
|
||||||
|
postCreate = ''
|
||||||
|
echo create done!!!!!
|
||||||
|
'';
|
||||||
|
extraPruneArgs = "--stats --list --save-space";
|
||||||
|
patterns = [
|
||||||
|
"- /home/files/storage/files/no-backup"
|
||||||
|
];
|
||||||
|
|
||||||
|
encryption.mode = "repokey-blake2";
|
||||||
|
encryption.passCommand = "cat /home/files/secrets/borg-passphrase";
|
||||||
|
|
||||||
|
environment.BORG_KEY_FILE = "/home/files/secrets/borg-key";
|
||||||
|
|
||||||
|
prune.keep = {
|
||||||
|
#within = "1w"; # Keep all archives from the last day
|
||||||
|
daily = 7;
|
||||||
|
weekly = 7;
|
||||||
|
monthly = -1; # Keep at least one archive for each month
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
uuid = "e0103dac-7da0-4e32-a01b-487b8c4c813c";
|
uuid = "e0103dac-7da0-4e32-a01b-487b8c4c813c";
|
||||||
type = "wifi";
|
type = "wifi";
|
||||||
interface-name = "wlan0";
|
interface-name = "wlan0";
|
||||||
|
autoconnect = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
wifi = {
|
wifi = {
|
||||||
@@ -164,6 +165,31 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hh40 = {
|
||||||
|
connection = {
|
||||||
|
id = "hh40";
|
||||||
|
uuid = "73a61cef-8f7b-4f42-ab3f-0066e0295bbc";
|
||||||
|
type = "wifi";
|
||||||
|
interface-name = "wlan0";
|
||||||
|
autoconnect = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi = {
|
||||||
|
hidden = "false";
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = builtins.readFile "${secretsDir}/home-wifi-ssid";
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi-security = {
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = builtins.readFile "${secretsDir}/home-wifi-password";
|
||||||
|
};
|
||||||
|
|
||||||
|
ipv4 = {
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
share = {
|
share = {
|
||||||
connection = {
|
connection = {
|
||||||
id = "share";
|
id = "share";
|
||||||
|
|||||||
@@ -38,6 +38,9 @@
|
|||||||
virtualisation.vmVariant.services.timesyncd.enable = lib.mkForce false;
|
virtualisation.vmVariant.services.timesyncd.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
|
||||||
|
virtualisation.waydroid.enable = true;
|
||||||
|
|
||||||
|
|
||||||
services.nscd.enable = lib.mkForce false;
|
services.nscd.enable = lib.mkForce false;
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
@@ -55,6 +58,10 @@
|
|||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# disable touch clicks because i always tap while typing
|
# disable touch clicks because i always tap while typing
|
||||||
#services.xserver.libinput.touchpad.tappingButtonMap = null;
|
#services.xserver.libinput.touchpad.tappingButtonMap = null;
|
||||||
services.xserver.libinput.touchpad.tapping = false;
|
services.xserver.libinput.touchpad.tapping = false;
|
||||||
@@ -76,10 +83,20 @@
|
|||||||
# see: https://github.com/NixOS/nixpkgs/issues/300081
|
# see: https://github.com/NixOS/nixpkgs/issues/300081
|
||||||
#"${inputs.nixpkgs-unstable}/nixos/modules/virtualisation/incus.nix"
|
#"${inputs.nixpkgs-unstable}/nixos/modules/virtualisation/incus.nix"
|
||||||
#../scripts/yt-block/module.nix
|
#../scripts/yt-block/module.nix
|
||||||
|
|
||||||
|
# add waveforms flake module
|
||||||
|
#inputs.waveforms.nixosModule
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.udev.packages = [ inputs.waveforms.packages.${system}.adept2-runtime ];
|
||||||
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
inputs.waveforms.packages.${system}.waveforms
|
||||||
|
|
||||||
|
# add pyclip for waydroid
|
||||||
|
python310Packages.pyclip
|
||||||
|
|
||||||
grim # screenshot functionality
|
grim # screenshot functionality
|
||||||
slurp # screenshot functionality
|
slurp # screenshot functionality
|
||||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||||
@@ -91,6 +108,14 @@
|
|||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# waveforms
|
||||||
|
|
||||||
|
# my keyboar flash script, that opens as an alacritty window
|
||||||
|
(pkgs.writeShellScriptBin "keyboard-flash" "alacritty --command ${pkgs.writeShellScriptBin "keyboard-flash-internal" "${./..}/scripts/keyboard-flash; bash"}/bin/keyboard-flash-internal")
|
||||||
|
|
||||||
|
# my keyboar flash script, that opens as an alacritty window
|
||||||
|
(pkgs.writeShellScriptBin "keyboard-flash-left" "alacritty --command ${pkgs.writeShellScriptBin "keyboard-flash-internal" "${./..}/scripts/keyboard-flash left; bash"}/bin/keyboard-flash-internal")
|
||||||
|
|
||||||
slint-lsp
|
slint-lsp
|
||||||
cifs-utils
|
cifs-utils
|
||||||
nfs-utils
|
nfs-utils
|
||||||
@@ -104,6 +129,8 @@
|
|||||||
# shedule nix builds with low priority, so the laptop is still usable while building something
|
# shedule nix builds with low priority, so the laptop is still usable while building something
|
||||||
nix.daemonCPUSchedPolicy = "idle";
|
nix.daemonCPUSchedPolicy = "idle";
|
||||||
nix.daemonIONiceLevel = 7;
|
nix.daemonIONiceLevel = 7;
|
||||||
|
|
||||||
|
|
||||||
systemd.services.nix-daemon.serviceConfig.Nice = 9;
|
systemd.services.nix-daemon.serviceConfig.Nice = 9;
|
||||||
|
|
||||||
# enable ntp
|
# enable ntp
|
||||||
@@ -513,14 +540,22 @@
|
|||||||
virtualisation.incus.enable = true;
|
virtualisation.incus.enable = true;
|
||||||
systemd.services.incus.path = [ pkgs.swtpm ];
|
systemd.services.incus.path = [ pkgs.swtpm ];
|
||||||
#virtualisation.incus.package = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.incus;
|
#virtualisation.incus.package = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.incus;
|
||||||
users.users.me.extraGroups = [ "incus-admin" ];
|
|
||||||
|
# add myself to plugdev group for waveforms
|
||||||
|
# and incus-admin to use incus without sudo
|
||||||
|
users.users.me.extraGroups = [ "incus-admin" "plugdev" ];
|
||||||
|
|
||||||
|
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman.enable = true;
|
||||||
|
|
||||||
virtualisation.kvmgt.enable = true;
|
virtualisation.kvmgt.enable = true;
|
||||||
boot.extraModprobeConfig = "options i915 enable_guc=2";
|
boot.extraModprobeConfig = "options i915 enable_guc=2";
|
||||||
boot.kernelParams = [ "intel_iommu=on" "pcie_aspm=force" ];
|
boot.resumeDevice = "/dev/disk/by-uuid/20002ed7-1431-4992-90f6-730bdc6eef2c";
|
||||||
|
boot.kernelParams = [
|
||||||
|
"resume_offset=45743809"
|
||||||
|
"intel_iommu=on"
|
||||||
|
"pcie_aspm=force"
|
||||||
|
];
|
||||||
|
|
||||||
virtualisation.kvmgt.vgpus = {
|
virtualisation.kvmgt.vgpus = {
|
||||||
"i915-GVTg_V5_8" = {
|
"i915-GVTg_V5_8" = {
|
||||||
@@ -544,17 +579,18 @@
|
|||||||
|
|
||||||
############################## swap and hibernate ###################################
|
############################## swap and hibernate ###################################
|
||||||
swapDevices = [ { device = "/swapfile"; } ];
|
swapDevices = [ { device = "/swapfile"; } ];
|
||||||
boot.resumeDevice = "/swapfile";
|
|
||||||
|
# boot.resumeDevice = "/swapfile";
|
||||||
services.logind = {
|
services.logind = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
HandlePowerKey=suspend-then-hibernate
|
HandlePowerKey=suspend-then-hibernate
|
||||||
'';
|
'';
|
||||||
lidSwitch = "suspend-then-hibernate";
|
lidSwitch = "lock";
|
||||||
lidSwitchExternalPower = "suspend-then-hibernate";
|
lidSwitchExternalPower = "lock";
|
||||||
lidSwitchDocked = "ignore";
|
lidSwitchDocked = "ignore";
|
||||||
};
|
};
|
||||||
systemd.sleep.extraConfig = ''
|
systemd.sleep.extraConfig = ''
|
||||||
HibernateDelaySec=27h
|
HibernateDelaySec=4h
|
||||||
HibernateMode=shutdown
|
HibernateMode=shutdown
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
home.c2vi.dev rpi
|
home.c2vi.dev rpi
|
||||||
|
home.c2vi.dev fusu
|
||||||
home.c2vi.dev rpis
|
home.c2vi.dev rpis
|
||||||
home.c2vi.dev files
|
home.c2vi.dev files
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, meson
|
, meson
|
||||||
|
, lib
|
||||||
|
, ninja
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "exitß";
|
name = "exit0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "richardweinberger";
|
owner = "richardweinberger";
|
||||||
repo = "exit0";
|
repo = "exit0";
|
||||||
rev = "f6cdeeb858ad9717b698a21e6fec3bb94b2aa2dd";
|
rev = "f6cdeeb858ad9717b698a21e6fec3bb94b2aa2dd";
|
||||||
sha256 = "";
|
sha256 = "sha256-NCNPO4XCdCwPLSQuW4AT6vskqvu1ks/yHGUzzI+l3hE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson
|
meson
|
||||||
|
ninja
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -f "htldoc.nix" ]; then
|
if [ -f "htldoc.nix" ]; then
|
||||||
htldocUrl=$(nix eval --expr 'let config = (import ./htldoc.nix {}); in if builtins.hasAttr "htldocVersion" config then config.htldocVersion else "github:c2vi/htldoc/master"' --impure)
|
htldocUrl=$(nix eval --expr 'let config = (import ./htldoc.nix {}); in if builtins.hasAttr "htldocVersion" config then config.htldocVersion else "github:c2vi/htldoc/master"' --impure --raw)
|
||||||
|
echo htldocUrl: $htldocUrl
|
||||||
nix run $htldocUrl -- $@
|
nix run $htldocUrl -- $@
|
||||||
else
|
else
|
||||||
nix run github:c2vi/htldoc/master -- $@
|
nix run github:c2vi/htldoc/master -- $@
|
||||||
|
|||||||
1
mybin/ru
1
mybin/ru
@@ -104,6 +104,7 @@ cat /sys/class/power_supply/BAT1/status
|
|||||||
|
|
||||||
elif [ "$1" == "hibernate" ]
|
elif [ "$1" == "hibernate" ]
|
||||||
then
|
then
|
||||||
|
swaylock
|
||||||
sudo systemctl hibernate
|
sudo systemctl hibernate
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
~/work/config/scripts/win -o main-win 192.168.122.98 sebastian $@
|
~/work/config/scripts/win -o win 192.168.122.141 me $@
|
||||||
|
|||||||
@@ -395,6 +395,20 @@
|
|||||||
|
|
||||||
" ###### rust ###### "
|
" ###### rust ###### "
|
||||||
|
|
||||||
|
" specially for mize...
|
||||||
|
cnoreabbrev md call Set_Mize_RunBuild()
|
||||||
|
|
||||||
|
function! Set_Mize_RunBuild()
|
||||||
|
cnoreabbrev c call Mize_RunBuild()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! Mize_RunBuild()
|
||||||
|
:w
|
||||||
|
silent ! echo Run > ~/.mize/mize_dev_module/pipe
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function! Setup_rust()
|
function! Setup_rust()
|
||||||
|
|
||||||
vnoremap s :call Rust_toggle_comment()<Enter>
|
vnoremap s :call Rust_toggle_comment()<Enter>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "Arc-Dark";
|
theme = "Arc-Dark";
|
||||||
@@ -11,4 +12,175 @@
|
|||||||
color-window = "#1c2023, #919ba0, #1c2023";
|
color-window = "#1c2023, #919ba0, #1c2023";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
# credit https://github.com/lostMia/nixos-config/blob/f1654caf8572f25f9de9216cfe402995187f3c27/programs/rofi.nix
|
||||||
|
home.file.".config/rofi/config.rasi".text = ''
|
||||||
|
* {
|
||||||
|
selected-normal-foreground: #282a36;
|
||||||
|
foreground: #f8f8f2;
|
||||||
|
item-normal: #1e1e1e;
|
||||||
|
item-alternative: #222222;
|
||||||
|
normal-foreground: @foreground;
|
||||||
|
alternate-normal-background: rgba ( 45, 48, 59, 1 % );
|
||||||
|
red: rgba ( 220, 50, 47, 100 % );
|
||||||
|
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
|
||||||
|
blue: rgba ( 38, 139, 210, 100 % );
|
||||||
|
urgent-foreground: rgba ( 204, 102, 102, 100 % );
|
||||||
|
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
|
||||||
|
active-foreground: rgba ( 101, 172, 255, 100 % );
|
||||||
|
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||||
|
selected-active-foreground: @foreground;
|
||||||
|
alternate-active-background: rgba ( 45, 48, 59, 88 % );
|
||||||
|
background: #1b1b1b;
|
||||||
|
alternate-normal-foreground: @foreground;
|
||||||
|
normal-background: rgba ( 45, 48, 59, 1 % );
|
||||||
|
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||||
|
selected-normal-background: #f8f8f2;
|
||||||
|
border-color: #ff3060;
|
||||||
|
spacing: 10;
|
||||||
|
separatorcolor: rgba ( 45, 48, 59, 1 % );
|
||||||
|
urgent-background: rgba ( 45, 48, 59, 15 % );
|
||||||
|
selected-urgent-background: rgba ( 165, 66, 66, 100 % );
|
||||||
|
alternate-urgent-foreground: @urgent-foreground;
|
||||||
|
background-color: rgba ( 0, 0, 0, 0 % );
|
||||||
|
alternate-active-foreground: @active-foreground;
|
||||||
|
active-background: rgba ( 29, 31, 33, 17 % );
|
||||||
|
selected-active-background: rgba ( 26, 28, 35, 100 % );
|
||||||
|
}
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "HackNerdFont Regular 14";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Tela circle purple dark";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
scroll-method: 0;
|
||||||
|
disable-history: false;
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: @background;
|
||||||
|
border: 2;
|
||||||
|
border-color: @border-color;
|
||||||
|
padding: 15;
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
listview {
|
||||||
|
lines: 12;
|
||||||
|
columns: 1;
|
||||||
|
}
|
||||||
|
mainbox {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
message {
|
||||||
|
border: 2px 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
textbox {
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
listview {
|
||||||
|
fixed-height: 0;
|
||||||
|
border: 8px 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
spacing: 8px ;
|
||||||
|
scrollbar: false;
|
||||||
|
padding: 2px 0px 0px ;
|
||||||
|
}
|
||||||
|
element {
|
||||||
|
border: 1px;
|
||||||
|
border-radius: 12px;
|
||||||
|
border-color: #333333;
|
||||||
|
padding: 4px ;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element.normal.normal {
|
||||||
|
background-color: @item-normal;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
element.normal.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @urgent-foreground;
|
||||||
|
}
|
||||||
|
element.normal.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @active-foreground;
|
||||||
|
}
|
||||||
|
element.selected.normal {
|
||||||
|
background-color: @selected-normal-background;
|
||||||
|
text-color: @selected-normal-foreground;
|
||||||
|
}
|
||||||
|
element.selected.urgent {
|
||||||
|
background-color: @selected-urgent-background;
|
||||||
|
text-color: @selected-urgent-foreground;
|
||||||
|
}
|
||||||
|
element.selected.active {
|
||||||
|
background-color: @selected-active-background;
|
||||||
|
text-color: @selected-active-foreground;
|
||||||
|
}
|
||||||
|
element.alternate.normal {
|
||||||
|
background-color: @item-alternative;
|
||||||
|
text-color: @alternate-normal-foreground;
|
||||||
|
}
|
||||||
|
element.alternate.urgent {
|
||||||
|
background-color: @alternate-urgent-background;
|
||||||
|
text-color: @alternate-urgent-foreground;
|
||||||
|
}
|
||||||
|
element.alternate.active {
|
||||||
|
background-color: @alternate-active-background;
|
||||||
|
text-color: @alternate-active-foreground;
|
||||||
|
}
|
||||||
|
scrollbar {
|
||||||
|
width: 4px ;
|
||||||
|
border: 0;
|
||||||
|
handle-color: @normal-foreground;
|
||||||
|
handle-width: 8px ;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
mode-switcher {
|
||||||
|
border: 2px 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
button.selected {
|
||||||
|
background-color: @selected-normal-background;
|
||||||
|
text-color: @selected-normal-foreground;
|
||||||
|
}
|
||||||
|
inputbar {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
case-indicator {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
prompt {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
inputbar {
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: " ";
|
||||||
|
margin: 0px 0.3em 0em 0em ;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,8 +140,12 @@ in rec {
|
|||||||
# the charybdis has a left and right, so the default parts works
|
# the charybdis has a left and right, so the default parts works
|
||||||
shield = "charybdis_right";
|
shield = "charybdis_right";
|
||||||
|
|
||||||
#zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
postPatch = ''
|
||||||
zephyrDepsHash = "sha256-/ECQR3x0hzVGB7icGuWeyyNC9HuWmCgS5xA8r30gCAw=";
|
mkdir -p ./zmk/app/boards/
|
||||||
|
cp -r ./boards/* ./zmk/app/boards/
|
||||||
|
'';
|
||||||
|
|
||||||
|
zephyrDepsHash = "sha256-4enAzZRvlV0ni1+rv7PUsRI6Rhb+zweuFBLeb/sflBc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -155,8 +159,13 @@ in rec {
|
|||||||
# the charybdis has a left and right, so the default parts works
|
# the charybdis has a left and right, so the default parts works
|
||||||
shield = "charybdis_left";
|
shield = "charybdis_left";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
mkdir -p ./zmk/app/boards/
|
||||||
|
cp -r ./boards/* ./zmk/app/boards/
|
||||||
|
'';
|
||||||
|
|
||||||
#zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
#zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
||||||
zephyrDepsHash = "sha256-/ECQR3x0hzVGB7icGuWeyyNC9HuWmCgS5xA8r30gCAw=";
|
zephyrDepsHash = "sha256-4enAzZRvlV0ni1+rv7PUsRI6Rhb+zweuFBLeb/sflBc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -172,7 +181,7 @@ in rec {
|
|||||||
shield = "charybdis_%PART%";
|
shield = "charybdis_%PART%";
|
||||||
|
|
||||||
#zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
#zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
||||||
zephyrDepsHash = "sha256-/ECQR3x0hzVGB7icGuWeyyNC9HuWmCgS5xA8r30gCAw=";
|
zephyrDepsHash = "sha256-r4SIPCLqBT/y2bblHUUZtNRwrhXFWY8wWtkplbG3coo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
battery_percent_MODULUS=5 # How many percent difference are required for another update
|
battery_percent_MODULUS=5 # How many percent difference are required for another update
|
||||||
INTERVAL=5 # The interval at which to check the battery percentage
|
INTERVAL=20 # The interval at which to check the battery percentage
|
||||||
ALERT_SCRIPT="sudo /home/mia/Scripts/keyboard_alert.sh"
|
ALERT_SCRIPT="sudo /home/mia/Scripts/keyboard_alert.sh"
|
||||||
|
|
||||||
# Battery Levels
|
# Battery Levels
|
||||||
BAT_RECOMMENDED_UPPER_LIMIT=80
|
BAT_RECOMMENDED_UPPER_LIMIT=80
|
||||||
BAT_RECOMMENDED_LOWER_LIMIT=40
|
BAT_RECOMMENDED_LOWER_LIMIT=30
|
||||||
BAT_SLIGHTLY_LOW=30
|
BAT_SLIGHTLY_LOW=25
|
||||||
BAT_LOW=20
|
BAT_LOW=17
|
||||||
BAT_VERY_LOW=10
|
BAT_VERY_LOW=10
|
||||||
BAT_HIB=5
|
BAT_HIB=5
|
||||||
|
|
||||||
@@ -23,13 +23,13 @@ get_percentage()
|
|||||||
|
|
||||||
countdown()
|
countdown()
|
||||||
{
|
{
|
||||||
for i in $(seq 1 10);
|
for i in $(seq 1 15);
|
||||||
do
|
do
|
||||||
if [[ $(cat /sys/bus/acpi/drivers/battery/*/power_supply/BAT?/status) = "Charging" ]]; then
|
if [[ $(cat /sys/bus/acpi/drivers/battery/*/power_supply/BAT?/status) = "Charging" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 4
|
||||||
notify-send $((10-$i)) -u critical
|
notify-send $((10-$i)) -u critical
|
||||||
done
|
done
|
||||||
systemctl hibernate
|
systemctl hibernate
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
CONFIG_REPO_LOCATION=~/work/config
|
CONFIG_REPO_LOCATION=~/work/config
|
||||||
CHARYBDIS_DISK_LOCATION=/dev/disk/by-uuid/0042-0042
|
CHARYBDIS_DISK_LOCATION=/dev/disk/by-uuid/0042-0042
|
||||||
|
|
||||||
|
|
||||||
# use the fusefatfs packaged in my nurPkgs
|
# use the fusefatfs packaged in my nurPkgs
|
||||||
alias fusefatfs="$(nix build ${CONFIG_REPO_LOCATION}#mynurPkgs.fusefatfs --no-keep-outputs --print-out-paths)/bin/fusefatfs"
|
export fusefatfs="$(nix build ${CONFIG_REPO_LOCATION}#mynurPkgs.fusefatfs --no-keep-outputs --print-out-paths)/bin/fusefatfs"
|
||||||
|
|
||||||
|
|
||||||
# if we have a keyboard config like thing in the clipboard.... use that
|
# if we have a keyboard config like thing in the clipboard.... use that
|
||||||
@@ -15,18 +17,34 @@ if [[ "$(wl-paste | head -n 4)" == '#include <dt-bindings/zmk/mouse.h>
|
|||||||
#include <dt-bindings/zmk/keys.h>' ]]
|
#include <dt-bindings/zmk/keys.h>' ]]
|
||||||
then
|
then
|
||||||
echo pasting keyboard config from clipboard
|
echo pasting keyboard config from clipboard
|
||||||
wl-paste > $CONFIG_REPO_LOCATION/zmk-config/config/charybdis.keymap
|
wl-paste | grep -v "bindings/zmk/pointing" > $CONFIG_REPO_LOCATION/zmk-config/config/charybdis.keymap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $TMP/keyboard-flash-mnt
|
sudo mkdir -p /tmp/keyboard-flash-mnt
|
||||||
exit
|
|
||||||
|
|
||||||
sudo fusefatfs $CHARYBDIS_DISK_LOCATION $TMP/keyboard-flash-mnt
|
# error checking if device exists
|
||||||
|
if [[ ! -L $CHARYBDIS_DISK_LOCATION ]]
|
||||||
|
then
|
||||||
|
echo err: keyboard not in bootloader mode
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo before build
|
||||||
|
|
||||||
firmware_out_path=$(nix build .#random.keyboardRight -L --no-keep-outputs --print-out-paths)
|
if [[ $1 == "left" ]]
|
||||||
|
then
|
||||||
|
firmware_out_path=$(nix build ${CONFIG_REPO_LOCATION}#random.keyboardLeft -L --no-keep-outputs --print-out-paths)
|
||||||
|
else
|
||||||
|
firmware_out_path=$(nix build ${CONFIG_REPO_LOCATION}#random.keyboardRight -L --no-keep-outputs --print-out-paths)
|
||||||
|
fi
|
||||||
echo firmware at: $firmware_out_path
|
echo firmware at: $firmware_out_path
|
||||||
|
|
||||||
sudo cp $firmware_out_path #NEXT: what to copy where
|
# flashing by writing to device directly
|
||||||
|
#sudo dd if=$firmware_out_path/zmk.uf2 of=$CHARYBDIS_DISK_LOCATION
|
||||||
|
|
||||||
sudo umount $TMP/keyboard-flash-mnt
|
# flashing by mounting
|
||||||
|
sudo $fusefatfs -o rw+ $CHARYBDIS_DISK_LOCATION /tmp/keyboard-flash-mnt
|
||||||
|
|
||||||
|
sudo cp $firmware_out_path/zmk.uf2 /tmp/keyboard-flash-mnt/CURRENT.UF2 || true
|
||||||
|
|
||||||
|
sudo umount /tmp/keyboard-flash-mnt
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
path="/home/mia/Pictures/Screenshots/screen.png"
|
|
||||||
grim "$path" &&
|
|
||||||
corrupter -add 0 -bheight 20 -stdabber 10 -boffset 50 "$path" "$path" &&
|
|
||||||
|
|
||||||
swaylock -c /home/mia/.config/swaylock/config &&
|
|
||||||
swaymsg "output * dpms on"
|
|
||||||
@@ -9,7 +9,7 @@ default_vm_uuid=win
|
|||||||
#default_vm_uuid=6a412143-871f-4838-bacd-5dcfa5fa95c3
|
#default_vm_uuid=6a412143-871f-4838-bacd-5dcfa5fa95c3
|
||||||
|
|
||||||
username=me
|
username=me
|
||||||
password=$(cat ~/work/here/secrets/win-vm-pwd)
|
password=$(cat ~/secrets/win-vm-pwd)
|
||||||
|
|
||||||
if [ "$1" == "-o" ];then
|
if [ "$1" == "-o" ];then
|
||||||
cmd=$5
|
cmd=$5
|
||||||
@@ -119,6 +119,9 @@ elif [ "$cmd" == "f" ];then
|
|||||||
#xfreerdp ${RDP_FLAGS} /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +clipboard +auto-reconnect +home-drive /wm-class:"Microsoft Windows" -grab-keyboard
|
#xfreerdp ${RDP_FLAGS} /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +clipboard +auto-reconnect +home-drive /wm-class:"Microsoft Windows" -grab-keyboard
|
||||||
#
|
#
|
||||||
elif [ "$cmd" == "fl" ];then
|
elif [ "$cmd" == "fl" ];then
|
||||||
|
echo username: $username
|
||||||
|
echo ip: $default_vm_ip
|
||||||
|
|
||||||
RDP_SCALE=100
|
RDP_SCALE=100
|
||||||
MULTI_FLAG="span"
|
MULTI_FLAG="span"
|
||||||
RDP_USER=$username
|
RDP_USER=$username
|
||||||
|
|||||||
@@ -71,7 +71,6 @@
|
|||||||
blueman
|
blueman
|
||||||
pavucontrol
|
pavucontrol
|
||||||
spotify
|
spotify
|
||||||
flameshot
|
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
haskellPackages.xmobar
|
haskellPackages.xmobar
|
||||||
dolphin
|
dolphin
|
||||||
|
|||||||
Reference in New Issue
Block a user