Compare commits
No commits in common. "1cd19687be5d7291915a49f0bdb3db6b3adc1473" and "069f9727407085be5b131589b9ff1825b9a6b3cc" have entirely different histories.
1cd19687be
...
069f972740
27 changed files with 213 additions and 464 deletions
4
build-mac-remote.sh
Executable file
4
build-mac-remote.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
sudo nixos-rebuild switch --flake . \
|
||||||
|
--impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw \
|
||||||
|
--build-host 192.168.178.119 --no-build-nix
|
||||||
|
|
3
build-mac.sh
Executable file
3
build-mac.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
sudo nixos-rebuild switch --flake . \
|
||||||
|
--impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw \
|
||||||
|
|
1
build.sh
Executable file
1
build.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
sudo nixos-rebuild switch --flake . --impure
|
|
@ -27,13 +27,12 @@ with builtins;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
nushellFull networkmanager htmlq
|
|
||||||
|
|
||||||
wget git neofetch pciutils zip unzip gnutar iw btop nodejs jdk8 jdk11
|
wget git neofetch pciutils zip unzip gnutar iw btop nodejs jdk8 jdk11
|
||||||
jdk libsecret gh nix-prefetch-scripts fzf glab ripgrep
|
jdk libsecret gh nix-prefetch-scripts fzf glab ripgrep
|
||||||
sl lolcat appimage-run git-crypt file whois p7zip file nmap cmatrix tree
|
sl lolcat appimage-run git-crypt file whois p7zip file nmap cmatrix tree
|
||||||
socat smartmontools mprocs
|
socat smartmontools
|
||||||
dig aria2 usbutils
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,7 +101,7 @@ with builtins;
|
||||||
|
|
||||||
users.users.jade = {
|
users.users.jade = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark" ];
|
extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" ];
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.marksman
|
pkgs.marksman
|
||||||
];
|
];
|
||||||
|
|
18
flake.lock
18
flake.lock
|
@ -245,11 +245,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697838989,
|
"lastModified": 1695550077,
|
||||||
"narHash": "sha256-hwVlO+st8vWJO6iy3/JbMHrUyY4Ak7xUSmffoWqBPUg=",
|
"narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ae631b0b20f06f7d239d160723d228891ddb2fe0",
|
"rev": "a88df2fb101778bfd98a17556b3a2618c6c66091",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -418,11 +418,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697777081,
|
"lastModified": 1695559356,
|
||||||
"narHash": "sha256-n2vQARhKevRGyeo+LAa8g+CdUQsdH/caNk8jnylcPhY=",
|
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "679cadfdfed2b90311a247b2d6ef6dfd3d6cab73",
|
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -569,11 +569,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697723726,
|
"lastModified": 1695360818,
|
||||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.jade = { nixosConfig, pkgs, ... }: {
|
home-manager.users.jade = { nixosConfig, pkgs, ... }: {
|
||||||
home.sessionVariables.TZ = nixosConfig.time.timeZone;
|
home.sessionVariables.TZ = nixosConfig.time.timeZone;
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "${nixosConfig.system.stateVersion}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -13,7 +13,6 @@ import System.Exit
|
||||||
|
|
||||||
import XMonad.Hooks.StatusBar
|
import XMonad.Hooks.StatusBar
|
||||||
import XMonad.Hooks.StatusBar.PP
|
import XMonad.Hooks.StatusBar.PP
|
||||||
import XMonad.Hooks.EwmhDesktops
|
|
||||||
|
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -21,8 +20,6 @@ import qualified Data.Map as M
|
||||||
import XMonad.Layout.Spacing
|
import XMonad.Layout.Spacing
|
||||||
import XMonad.Layout.Tabbed
|
import XMonad.Layout.Tabbed
|
||||||
|
|
||||||
import XMonad.Actions.KeyRemap
|
|
||||||
|
|
||||||
import XMonad.Prompt
|
import XMonad.Prompt
|
||||||
import XMonad.Prompt.Layout
|
import XMonad.Prompt.Layout
|
||||||
import Graphics.X11.ExtraTypes.XF86
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
|
@ -32,7 +29,7 @@ import Control.Monad (when)
|
||||||
-- The preferred terminal program, which is used in a binding below and by
|
-- The preferred terminal program, which is used in a binding below and by
|
||||||
-- certain contrib modules.
|
-- certain contrib modules.
|
||||||
--
|
--
|
||||||
myTerminal = "kitty"
|
myTerminal = "kitty"
|
||||||
|
|
||||||
-- Whether focus follows the mouse pointer.
|
-- Whether focus follows the mouse pointer.
|
||||||
myFocusFollowsMouse :: Bool
|
myFocusFollowsMouse :: Bool
|
||||||
|
@ -44,14 +41,14 @@ myClickJustFocuses = False
|
||||||
|
|
||||||
-- Width of the window border in pixels.
|
-- Width of the window border in pixels.
|
||||||
--
|
--
|
||||||
myBorderWidth = 2
|
myBorderWidth = 2
|
||||||
|
|
||||||
-- modMask lets you specify which modkey you want to use. The default
|
-- modMask lets you specify which modkey you want to use. The default
|
||||||
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
|
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
|
||||||
-- ("right alt"), which does not conflict with emacs keybindings. The
|
-- ("right alt"), which does not conflict with emacs keybindings. The
|
||||||
-- "windows key" is usually mod4Mask.
|
-- "windows key" is usually mod4Mask.
|
||||||
--
|
--
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
|
|
||||||
-- The default number of workspaces (virtual screens) and their names.
|
-- The default number of workspaces (virtual screens) and their names.
|
||||||
-- By default we use numeric strings, but any string may be used as a
|
-- By default we use numeric strings, but any string may be used as a
|
||||||
|
@ -62,129 +59,129 @@ myModMask = mod4Mask
|
||||||
--
|
--
|
||||||
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
||||||
--
|
--
|
||||||
myWorkspaces = ["comms","browser","3","4","5","6","7","8","9"]
|
myWorkspaces = ["comms","browser","3","4","5","6","7","8","9"]
|
||||||
|
|
||||||
-- Border colors for unfocused and focused windows, respectively.
|
-- Border colors for unfocused and focused windows, respectively.
|
||||||
--
|
--
|
||||||
myNormalBorderColor = "#3c3836"
|
myNormalBorderColor = "#3c3836"
|
||||||
myFocusedBorderColor = "#504945"
|
myFocusedBorderColor = "#504945"
|
||||||
|
|
||||||
myRemaps = KeymapTable [ ((0, xK_a), (0, xK_b)) ]
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Key bindings. Add, modify or remove key bindings here.
|
-- Key bindings. Add, modify or remove key bindings here.
|
||||||
--
|
--
|
||||||
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
[ ((modm, xK_Return), spawn $ XMonad.terminal conf)
|
|
||||||
, ((modm .|. shiftMask, xK_q), kill)
|
|
||||||
-- -- Rotate through the available layout algorithms
|
|
||||||
, ((modm, xK_space ), sendMessage NextLayout)
|
|
||||||
|
|
||||||
-- rofiing
|
[ ((modm, xK_Return), spawn $ XMonad.terminal conf)
|
||||||
, ((modm, xK_d), spawn "rofi -show drun")
|
, ((modm .|. shiftMask, xK_q), kill)
|
||||||
, ((modm .|. shiftMask, xK_e), spawn "rofi -show desktopctl -modes desktopctl:desktopctl -show-icons")
|
-- Rotate through the available layout algorithms
|
||||||
, ((modm, xK_m), spawn "menu-qalc -- -theme gruvbox-dark")
|
, ((modm, xK_space ), sendMessage NextLayout)
|
||||||
, ((modm, xK_i), spawn "rofimoji --selector-args '-theme gruvbox-dark' -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy")
|
|
||||||
|
|
||||||
, ((modm, xK_o), spawn "rofi -show searchwolf -modes searchwolf:searchwolf -theme gruvbox-dark")
|
-- rofiing
|
||||||
|
, ((modm, xK_d), spawn "rofi -show drun")
|
||||||
|
, ((modm .|. shiftMask, xK_e), spawn "rofi -show desktopctl -modes desktopctl:desktopctl -show-icons")
|
||||||
|
, ((modm, xK_m), spawn "menu-qalc -- -theme gruvbox-dark")
|
||||||
|
, ((modm, xK_i), spawn "rofimoji --selector-args '-theme gruvbox-dark' -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy")
|
||||||
|
|
||||||
-- screenshotting
|
, ((modm, xK_o), spawn "rofi -show searchwolf -modes searchwolf:searchwolf -theme gruvbox-dark")
|
||||||
-- TODO: Fix/rewrite window-screenshot.sh
|
|
||||||
, ((modm, xK_w), spawn "window-screenshot.nu")
|
|
||||||
, ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots")
|
|
||||||
, ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots")
|
|
||||||
, ((modm, xK_t), spawn "ocr-screenshot.sh")
|
|
||||||
|
|
||||||
, ((modm .|. shiftMask, xK_t), spawn "DEVICE=\"MELF0410:00 1FD2:7007\"; if [ $(xinput list-props \"$DEVICE\" | awk '/^\\tDevice Enabled \\([0-9]+\\):\\t[01]/ {print $NF}') = \"1\" ]; then xinput disable \"$DEVICE\"; else xinput enable \"$DEVICE\"; fi")
|
-- screenshotting
|
||||||
|
-- TODO: Fix/rewrite window-screenshot.sh
|
||||||
|
, ((modm, xK_w), spawn "window-screenshot.sh")
|
||||||
|
, ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots")
|
||||||
|
, ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots")
|
||||||
|
, ((modm, xK_t), spawn "ocr-screenshot.sh")
|
||||||
|
|
||||||
-- Reset the layouts on the current workspace to default
|
, ((modm .|. shiftMask, xK_t), spawn "DEVICE=\"MELF0410:00 1FD2:7007\"; if [ $(xinput list-props \"$DEVICE\" | awk '/^\\tDevice Enabled \\([0-9]+\\):\\t[01]/ {print $NF}') = \"1\" ]; then xinput disable \"$DEVICE\"; else xinput enable \"$DEVICE\"; fi")
|
||||||
-- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
|
||||||
-- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
-- Reset the layouts on the current workspace to default
|
||||||
-- Push window back into tiling
|
-- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
||||||
, ((modm .|. shiftMask, xK_space ), withFocused $ windows . W.sink)
|
-- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
||||||
|
-- Push window back into tiling
|
||||||
|
, ((modm .|. shiftMask, xK_space ), withFocused $ windows . W.sink)
|
||||||
|
|
||||||
|
|
||||||
-- Resize viewed windows to the correct size
|
-- Resize viewed windows to the correct size
|
||||||
, ((modm, xK_n ), refresh)
|
, ((modm, xK_n ), refresh)
|
||||||
|
|
||||||
-- Move focus to the next window
|
-- Move focus to the next window
|
||||||
, ((modm, xK_Tab ), layoutPrompt def)
|
, ((modm, xK_Tab ), layoutPrompt def)
|
||||||
|
|
||||||
-- Move focus
|
-- Move focus
|
||||||
, ((modm, xK_j ), windows W.focusDown)
|
, ((modm, xK_j ), windows W.focusDown)
|
||||||
, ((modm, xK_k ), windows W.focusUp )
|
, ((modm, xK_k ), windows W.focusUp )
|
||||||
|
|
||||||
-- Swap the focused window with the next window
|
-- Swap the focused window with the next window
|
||||||
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
|
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
|
||||||
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
|
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
|
||||||
|
|
||||||
-- Shrink the master area
|
-- Shrink the master area
|
||||||
, ((modm, xK_h ), sendMessage Shrink)
|
, ((modm, xK_h ), sendMessage Shrink)
|
||||||
, ((modm, xK_l ), sendMessage Expand)
|
, ((modm, xK_l ), sendMessage Expand)
|
||||||
|
|
||||||
-- Increment the number of windows in the master area
|
-- Increment the number of windows in the master area
|
||||||
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
||||||
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
|
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
|
||||||
|
|
||||||
-- Brightness n stuff
|
-- Brightness n stuff
|
||||||
-- , ((0, xF86XK_AudioRaiseVolume), spawn "amixer -D pulse sset Master 10%+")
|
-- , ((0, xF86XK_AudioRaiseVolume), spawn "amixer -D pulse sset Master 10%+")
|
||||||
-- , ((0, xF86XK_AudioLowerVolume), spawn "amixer -D pulse sset Master 10%-")
|
-- , ((0, xF86XK_AudioLowerVolume), spawn "amixer -D pulse sset Master 10%-")
|
||||||
-- , ((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle")
|
-- , ((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle")
|
||||||
-- , ((0, xF86XK_MonBrightnessUp), spawn "brightnessctl set +10%")
|
-- , ((0, xF86XK_MonBrightnessUp), spawn "brightnessctl set +10%")
|
||||||
-- , ((0, xF86XK_MonBrightnessDown), spawn "brightnessctl set 10%-")
|
-- , ((0, xF86XK_MonBrightnessDown), spawn "brightnessctl set 10%-")
|
||||||
-- , ((0, xF86XK_KbdBrightnessUp), spawn "brightnessctl -d \"kbd_backlight\" set +10%")
|
-- , ((0, xF86XK_KbdBrightnessUp), spawn "brightnessctl -d \"kbd_backlight\" set +10%")
|
||||||
-- , ((0, xF86XK_KbdBrightnessDown), spawn "brightnessctl -d \"kbd_backlight\" set 10%-")
|
-- , ((0, xF86XK_KbdBrightnessDown), spawn "brightnessctl -d \"kbd_backlight\" set 10%-")
|
||||||
|
|
||||||
-- Toggle the status bar gap
|
-- Toggle the status bar gap
|
||||||
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||||
-- See also the statusBar function from Hooks.DynamicLog.
|
-- See also the statusBar function from Hooks.DynamicLog.
|
||||||
--
|
--
|
||||||
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||||
|
|
||||||
--, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess))
|
--, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess))
|
||||||
|
|
||||||
-- Restart xmonad
|
-- Restart xmonad
|
||||||
--, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
--, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
||||||
|
|
||||||
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
-- Run xmessage with a summary of the default keybindings (useful for beginners)
|
||||||
]
|
]
|
||||||
++
|
++
|
||||||
|
|
||||||
--
|
--
|
||||||
-- mod-[1..9], Switch to workspace N
|
-- mod-[1..9], Switch to workspace N
|
||||||
-- mod-shift-[1..9], Move client to workspace N
|
-- mod-shift-[1..9], Move client to workspace N
|
||||||
--
|
--
|
||||||
[((m .|. modm, k), windows $ f i)
|
[((m .|. modm, k), windows $ f i)
|
||||||
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
|
||||||
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
|
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
|
||||||
-- ++
|
-- ++
|
||||||
|
|
||||||
--
|
--
|
||||||
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||||
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||||
--
|
--
|
||||||
-- [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
-- [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
||||||
-- | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
|
-- | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
|
||||||
-- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
|
-- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Mouse bindings: default actions bound to mouse events
|
-- Mouse bindings: default actions bound to mouse events
|
||||||
--
|
--
|
||||||
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- mod-button1, Set the window to floating mode and move by dragging
|
|
||||||
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
|
|
||||||
>> windows W.shiftMaster))
|
|
||||||
|
|
||||||
-- mod-button2, Raise the window to the top of the stack
|
-- mod-button1, Set the window to floating mode and move by dragging
|
||||||
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
|
||||||
|
>> windows W.shiftMaster))
|
||||||
|
|
||||||
-- mod-button3, Set the window to floating mode and resize by dragging
|
-- mod-button2, Raise the window to the top of the stack
|
||||||
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
||||||
>> windows W.shiftMaster))
|
|
||||||
|
|
||||||
-- you may also bind events to the mouse scroll wheel (button4 and button5)
|
-- mod-button3, Set the window to floating mode and resize by dragging
|
||||||
]
|
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
||||||
|
>> windows W.shiftMaster))
|
||||||
|
|
||||||
|
-- you may also bind events to the mouse scroll wheel (button4 and button5)
|
||||||
|
]
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Layouts:
|
-- Layouts:
|
||||||
|
@ -198,16 +195,16 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- which denotes layout choice.
|
-- which denotes layout choice.
|
||||||
|
|
||||||
tabCfg = def
|
tabCfg = def
|
||||||
{ activeColor = "#282828"
|
{ activeColor = "#282828"
|
||||||
, inactiveColor = "#1d2021"
|
, inactiveColor = "#1d2021"
|
||||||
, urgentColor = "#9d0006"
|
, urgentColor = "#9d0006"
|
||||||
, activeBorderColor = "#504945"
|
, activeBorderColor = "#504945"
|
||||||
, inactiveBorderColor = "#3c3836"
|
, inactiveBorderColor = "#3c3836"
|
||||||
, urgentBorderColor = "#cc241d"
|
, urgentBorderColor = "#cc241d"
|
||||||
, activeTextColor = "#ebdbb2"
|
, activeTextColor = "#ebdbb2"
|
||||||
, inactiveTextColor = "#bdae93"
|
, inactiveTextColor = "#bdae93"
|
||||||
, urgentTextColor = "#ebdbb2"
|
, urgentTextColor = "#ebdbb2"
|
||||||
}
|
}
|
||||||
myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled
|
myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled
|
||||||
where
|
where
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
|
@ -238,10 +235,10 @@ myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled
|
||||||
-- 'className' and 'resource' are used below.
|
-- 'className' and 'resource' are used below.
|
||||||
--
|
--
|
||||||
myManageHook = composeAll
|
myManageHook = composeAll
|
||||||
[ className =? "MPlayer" --> doFloat
|
[ className =? "MPlayer" --> doFloat
|
||||||
, className =? "Gimp" --> doFloat
|
, className =? "Gimp" --> doFloat
|
||||||
, resource =? "desktop_window" --> doIgnore
|
, resource =? "desktop_window" --> doIgnore
|
||||||
, resource =? "kdesktop" --> doIgnore ]
|
, resource =? "kdesktop" --> doIgnore ]
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Event handling
|
-- Event handling
|
||||||
|
@ -276,12 +273,11 @@ myLogHook = return ()
|
||||||
--
|
--
|
||||||
-- By default, do nothing.
|
-- By default, do nothing.
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
spawn "pkill oneko; oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'"
|
spawn "pkill oneko; oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'"
|
||||||
--spawn "pkill polybar; polybar"
|
--spawn "pkill polybar; polybar"
|
||||||
spawn "pkill volumeicon; volumeicon"
|
spawn "pkill volumeicon; volumeicon"
|
||||||
spawn "pkill nm-applet; nm-applet"
|
spawn "pkill nm-applet; nm-applet"
|
||||||
spawn "mullvad-vpn --background"
|
spawn "mullvad-vpn --background"
|
||||||
setDefaultKeyRemap myRemaps [myRemaps]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,7 +287,7 @@ myStartupHook = do
|
||||||
-- Run xmonad with the settings you specify. No need to modify this.
|
-- Run xmonad with the settings you specify. No need to modify this.
|
||||||
--
|
--
|
||||||
mySB = statusBarProp "polybar" (pure xmobarPP)
|
mySB = statusBarProp "polybar" (pure xmobarPP)
|
||||||
main = xmonad $ withEasySB mySB defToggleStrutsKey (ewmh defaults)
|
main = xmonad $ withEasySB mySB defToggleStrutsKey defaults
|
||||||
|
|
||||||
-- A structure containing your configuration settings, overriding
|
-- A structure containing your configuration settings, overriding
|
||||||
-- fields in the default config. Any you don't override, will
|
-- fields in the default config. Any you don't override, will
|
||||||
|
@ -320,3 +316,4 @@ defaults = def
|
||||||
, logHook = myLogHook
|
, logHook = myLogHook
|
||||||
, startupHook = myStartupHook
|
, startupHook = myStartupHook
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,11 +53,6 @@ in {
|
||||||
device = "DELL081C:00 044E:121F Mouse";
|
device = "DELL081C:00 044E:121F Mouse";
|
||||||
sensitivity = 255;
|
sensitivity = 255;
|
||||||
};
|
};
|
||||||
hardware.usbWwan.enable = true;
|
|
||||||
systemd.services."ModemManager".enable = true;
|
|
||||||
systemd.services."ModemManager".wants = [ "NetworkManager.service" ];
|
|
||||||
systemd.services."ModemManager".wantedBy = [ "multi-user.target" ];
|
|
||||||
programs.wireshark.enable = true;
|
|
||||||
|
|
||||||
boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
|
||||||
boot.kernelParams = [ "resume_offset=7380652" ];
|
boot.kernelParams = [ "resume_offset=7380652" ];
|
||||||
|
@ -69,7 +64,7 @@ in {
|
||||||
|
|
||||||
services.xserver.libinput.touchpad.tapping = false;
|
services.xserver.libinput.touchpad.tapping = false;
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml pkgs.mqttui pkgs.mobile-broadband-provider-info pkgs.modem-manager-gui pkgs.wireshark];
|
environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml ];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
@ -87,31 +82,31 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# nixpkgs = {
|
nixpkgs = {
|
||||||
# overlays = [
|
overlays = [
|
||||||
# (self: super: {
|
(self: super: {
|
||||||
# linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
||||||
# structuredExtraConfig = with lib.kernel; {
|
structuredExtraConfig = with lib.kernel; {
|
||||||
# "FB" = yes;
|
"FB" = yes;
|
||||||
# "FRAMEBUFFER_CONSOLE" = yes;
|
"FRAMEBUFFER_CONSOLE" = yes;
|
||||||
# "VGA_CONSOLE" = yes;
|
"VGA_CONSOLE" = yes;
|
||||||
# "VIDEO_SELECT" = yes;
|
"VIDEO_SELECT" = yes;
|
||||||
# LOGO = lib.mkForce yes;
|
LOGO = lib.mkForce yes;
|
||||||
# LOGO_LINUX_CLUT224 = yes;
|
LOGO_LINUX_CLUT224 = yes;
|
||||||
# };
|
};
|
||||||
# ignoreConfigErrors = true;
|
ignoreConfigErrors = true;
|
||||||
# });
|
});
|
||||||
# })
|
})
|
||||||
# ];
|
];
|
||||||
# };
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
# boot.kernelPatches = [
|
boot.kernelPatches = [
|
||||||
# {
|
{
|
||||||
# name = "fomx";
|
name = "fomx";
|
||||||
# patch = ../../other/0001-fomx.patch;
|
patch = ../../other/0001-fomx.patch;
|
||||||
# }
|
}
|
||||||
# ];
|
];
|
||||||
|
|
||||||
services.xserver.displayManager.autoLogin = {
|
services.xserver.displayManager.autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
# latest linux kernel
|
# latest linux kernel
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
#boot.kernelPackages = pkgs.linux_zen_xeniafied;
|
#boot.kernelPackages = pkgs.linux_zen_xeniafied;
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
# boot.kernelPatches = [
|
# boot.kernelPatches = [
|
||||||
# {
|
# {
|
||||||
# name = "fomx";
|
# name = "fomx";
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh.permitRootLogin = "without-password";
|
openssh.permitRootLogin = "no";
|
||||||
fail2ban = {
|
fail2ban = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bantime-increment.enable = true;
|
bantime-increment.enable = true;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
dbuser = "nextcloud";
|
dbuser = "nextcloud";
|
||||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||||
dbname = "nextcloud";
|
dbname = "nextcloud";
|
||||||
adminpassFile = "${../../secret-data/nextcloud-admin-pass}";
|
adminpassFile = "${../secret-data/nextcloud-admin-pass}";
|
||||||
adminuser = "root";
|
adminuser = "root";
|
||||||
};
|
};
|
||||||
package = pkgs.nextcloud25;
|
package = pkgs.nextcloud25;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"PENPOT_SMTP_HOST" = "smtp.migadu.com";
|
"PENPOT_SMTP_HOST" = "smtp.migadu.com";
|
||||||
"PENPOT_SMTP_PORT" = "587";
|
"PENPOT_SMTP_PORT" = "587";
|
||||||
"PENPOT_SMTP_USERNAME" = "noreply-pp@schrottkatze.de";
|
"PENPOT_SMTP_USERNAME" = "noreply-pp@schrottkatze.de";
|
||||||
"PENPOT_SMTP_PASSWORD" = "${builtins.readFile ../../secret-data/penpot-smtp-pass}";
|
"PENPOT_SMTP_PASSWORD" = "${builtins.readFile ../secret-data/penpot-smtp-pass}";
|
||||||
"PENPOT_SMTP_TLS" = "true";
|
"PENPOT_SMTP_TLS" = "true";
|
||||||
"PENPOT_SMTP_SSL" = "false";
|
"PENPOT_SMTP_SSL" = "false";
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
SIGNUPS_VERIFY = true;
|
SIGNUPS_VERIFY = true;
|
||||||
ROCKET_LOG = "debug";
|
ROCKET_LOG = "debug";
|
||||||
ENABLE_WAL = false;
|
ENABLE_WAL = false;
|
||||||
ADMIN_TOKEN = builtins.readFile ../../secret-data/vaultwarden-admin-token;
|
ADMIN_TOKEN = builtins.readFile ../secret-data/vaultwarden-admin-token;
|
||||||
DOMAIN = "https://vw.schrottkatze.de";
|
DOMAIN = "https://vw.schrottkatze.de";
|
||||||
SMTP_TIMEOUT = 15;
|
SMTP_TIMEOUT = 15;
|
||||||
ROCKET_PORT = 8812;
|
ROCKET_PORT = 8812;
|
||||||
|
|
5
justfile
5
justfile
|
@ -1,5 +0,0 @@
|
||||||
test:
|
|
||||||
sudo nixos-rebuild test --flake . --impure
|
|
||||||
|
|
||||||
build:
|
|
||||||
sudo nixos-rebuild switch --flake . --impure
|
|
|
@ -13,7 +13,6 @@
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hardware.pulseaudio.enable = pkgs.lib.mkForce false;
|
|
||||||
sound.mediaKeys.enable = true;
|
sound.mediaKeys.enable = true;
|
||||||
home-manager.users.jade = { pkgs, ... }: {
|
home-manager.users.jade = { pkgs, ... }: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.jade.desktop;
|
cfg = config.jade.desktop;
|
||||||
# window-screenshot = pkgs.writeTextFile "window-screenshot.nu" (builtins.readFile ../../other/scripts/desktop/window-screenshot.nu);
|
|
||||||
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh);
|
window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh);
|
||||||
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
# desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh);
|
||||||
desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix { inherit pkgs; };
|
desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix { inherit pkgs; };
|
||||||
|
@ -103,13 +102,10 @@ in with lib; {
|
||||||
|
|
||||||
desktopManager = {
|
desktopManager = {
|
||||||
xterm.enable = false;
|
xterm.enable = false;
|
||||||
# gnome = {
|
|
||||||
# enable = true;
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
displayManager = {
|
displayManager = {
|
||||||
defaultSession = "none+xmonad";
|
#defaultSession = "none+i3";
|
||||||
gdm.enable = true;
|
gdm.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,12 +153,17 @@ in with lib; {
|
||||||
notifications.x11.enable = true;
|
notifications.x11.enable = true;
|
||||||
notifications.test = true;
|
notifications.test = true;
|
||||||
};
|
};
|
||||||
|
services.colord.enable = true;
|
||||||
|
|
||||||
home-manager.users.jade = { pkgs, ... }: {
|
home-manager.users.jade = { pkgs, ... }: {
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
# TODO: more config
|
# TODO: more config
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
programs.exa = {
|
||||||
|
# TODO: more config
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
programs.nushell = {
|
programs.nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = config.users.defaultUserShell;
|
package = config.users.defaultUserShell;
|
||||||
|
@ -171,6 +172,9 @@ in with lib; {
|
||||||
source ${pkgs.nu_scripts}/share/nu_scripts/modules/nix/nix.nu;
|
source ${pkgs.nu_scripts}/share/nu_scripts/modules/nix/nix.nu;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
programs.ripgrep = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -191,17 +195,11 @@ in with lib; {
|
||||||
theme = ../../other/rofi-themes/applauncher.rasi;
|
theme = ../../other/rofi-themes/applauncher.rasi;
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
spotifyd spotify-tui
|
|
||||||
|
|
||||||
#nushell
|
#nushell
|
||||||
nu_scripts direnv
|
nu_scripts direnv
|
||||||
|
|
||||||
just bacon
|
|
||||||
|
|
||||||
magic-wormhole-rs
|
magic-wormhole-rs
|
||||||
|
|
||||||
yt-dlp
|
|
||||||
|
|
||||||
argyllcms
|
argyllcms
|
||||||
displaycal
|
displaycal
|
||||||
|
|
||||||
|
@ -211,13 +209,11 @@ in with lib; {
|
||||||
i3lock rofimoji feh xorg.xinput arandr flameshot
|
i3lock rofimoji feh xorg.xinput arandr flameshot
|
||||||
tesseract5 imagemagick xclip xmacro libwacom wacomtablet xorg.xev
|
tesseract5 imagemagick xclip xmacro libwacom wacomtablet xorg.xev
|
||||||
|
|
||||||
syncplay
|
|
||||||
|
|
||||||
# categories
|
# categories
|
||||||
# filemanager
|
# filemanager
|
||||||
xfce.thunar xfce.tumbler xfce.thunar-archive-plugin gnome.file-roller
|
xfce.thunar xfce.tumbler xfce.thunar-archive-plugin gnome.file-roller
|
||||||
# media/file viewers
|
# media/file viewers
|
||||||
vlc mpv evince nomacs
|
vlc evince nomacs
|
||||||
|
|
||||||
# from environment.systemPackages cleanup
|
# from environment.systemPackages cleanup
|
||||||
font-manager xdotool xorg.xwininfo gparted librewolf firefox uhk-agent
|
font-manager xdotool xorg.xwininfo gparted librewolf firefox uhk-agent
|
||||||
|
|
|
@ -1,60 +1,34 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
{
|
||||||
addNuShebang = path: builtins.concatStringsSep "\n\n" [
|
|
||||||
"#!${pkgs.nushellFull}/bin/nu"
|
|
||||||
(builtins.readFile path)
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
config = {
|
config = {
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager = {
|
networkmanager.wifi.backend = "wpa_supplicant";
|
||||||
wifi.backend = "wpa_supplicant";
|
extraHosts = ''
|
||||||
dispatcherScripts = [
|
127.0.0.1 www.youtube.com
|
||||||
{
|
127.0.0.1 www.reddit.com
|
||||||
type = "basic";
|
127.0.0.1 www.tiktok.com
|
||||||
source = pkgs.writeText "dispatcher" (addNuShebang ../../other/scripts/dispatcher.nu);
|
127.0.0.1 www.twitter.com
|
||||||
}
|
127.0.0.1 www.instagram.com
|
||||||
];
|
127.0.0.1 www.facebook.com
|
||||||
};
|
127.0.0.1 www.snapchat.com
|
||||||
hosts = {
|
|
||||||
"127.0.0.1" = [
|
|
||||||
"www.tiktok.com"
|
|
||||||
"www.twitter.com"
|
|
||||||
"www.instagram.com"
|
|
||||||
"www.facebook.com"
|
|
||||||
"www.snapchat.com"
|
|
||||||
|
|
||||||
"tiktok.com"
|
127.0.0.1 youtube.com
|
||||||
"twitter.com"
|
127.0.0.1 reddit.com
|
||||||
"instagram.com"
|
127.0.0.1 tiktok.com
|
||||||
"facebook.com"
|
127.0.0.1 twitter.com
|
||||||
"snapchat.com"
|
127.0.0.1 instagram.com
|
||||||
|
127.0.0.1 facebook.com
|
||||||
|
127.0.0.1 snapchat.com
|
||||||
|
|
||||||
"google-analytics.com"
|
127.0.0.1 google-analytics.com
|
||||||
"stats.g.doubleclick.net"
|
127.0.0.1 stats.g.doubleclick.net
|
||||||
"googleadservices.com"
|
127.0.0.1 googleadservices.com
|
||||||
"googletagmanager.com"
|
127.0.0.1 googletagmanager.com
|
||||||
"googletagservices.com"
|
127.0.0.1 googletagservices.com
|
||||||
"googlesyndication.com"
|
127.0.0.1 googlesyndication.com
|
||||||
];
|
'';
|
||||||
"10.31.208.9" = [
|
|
||||||
"mqtt.z9"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
environment.etc = (with builtins; (
|
|
||||||
listToAttrs (
|
|
||||||
map (v: {
|
|
||||||
name = "networkhooks/${v}";
|
|
||||||
value = {
|
|
||||||
text = addNuShebang ../../other/scripts/networkhooks/${v};
|
|
||||||
mode = "0755";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(attrNames (readDir ../../other/scripts/networkhooks))
|
|
||||||
)
|
|
||||||
));
|
|
||||||
systemd.services."NetworkManager-wait-online".enable = false;
|
systemd.services."NetworkManager-wait-online".enable = false;
|
||||||
services.mullvad-vpn.enable = true;
|
services.mullvad-vpn.enable = true;
|
||||||
home-manager.users.jade = { pkgs, ... }: {
|
home-manager.users.jade = { pkgs, ... }: {
|
||||||
|
|
|
@ -31,14 +31,19 @@ in with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
languages = {
|
languages = {
|
||||||
"php" = {
|
language = [
|
||||||
name = "php";
|
{
|
||||||
file-types = [ "php" ];
|
name = "rust";
|
||||||
language-server = {
|
}
|
||||||
command = "psalm";
|
{
|
||||||
args = ["--language-server"];
|
name = "php";
|
||||||
};
|
file-types = [ "php" ];
|
||||||
};
|
language-server = {
|
||||||
|
command = "psalm";
|
||||||
|
args = ["--language-server"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
{ pkgs, lib }: rec {
|
|
||||||
# taken from https://github.com/NixOS/nixpkgs/blob/3650808d85dccbfa3be3d785dfd3ce33a757bd2c/pkgs/build-support/trivial-builders/default.nix#L335
|
|
||||||
writeNuShellApplication =
|
|
||||||
{ name
|
|
||||||
, text
|
|
||||||
, runtimeInputs ? [ ]
|
|
||||||
, meta ? { }
|
|
||||||
, checkPhase ? null
|
|
||||||
}:
|
|
||||||
writeTextFile {
|
|
||||||
inherit name meta;
|
|
||||||
executable = true;
|
|
||||||
destination = "/bin/${name}";
|
|
||||||
allowSubstitutes = true;
|
|
||||||
preferLocalBuild = false;
|
|
||||||
text = ''
|
|
||||||
#!${pkgs.nushell}
|
|
||||||
'' + lib.optionalString (runtimeInputs != [ ]) ''
|
|
||||||
|
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '${lib.makeBinPath runtimeInputs}');
|
|
||||||
'' + ''
|
|
||||||
|
|
||||||
${text}
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkPhase =
|
|
||||||
# GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)
|
|
||||||
# but we still want to use writeShellApplication on those platforms
|
|
||||||
if checkPhase == null then ''
|
|
||||||
runHook preCheck
|
|
||||||
|
|
||||||
nu -c "nu-check -d $target"
|
|
||||||
|
|
||||||
runHook postCheck
|
|
||||||
''
|
|
||||||
else checkPhase;
|
|
||||||
};
|
|
||||||
packageNushellApplication =
|
|
||||||
{ name
|
|
||||||
, path
|
|
||||||
, runtimeInputs ? [ ]
|
|
||||||
, meta ? { }
|
|
||||||
, checkPhase ? null
|
|
||||||
}:
|
|
||||||
writeNuShellApplication {
|
|
||||||
inherit name runtimeInputs meta checkPhase;
|
|
||||||
text = builtins.readFile path;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -6,22 +6,13 @@ in with lib; {
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.jade = { pkgs, ... }: {
|
home-manager.users.jade = { pkgs, ... }: {
|
||||||
home.file = {
|
|
||||||
zellij-forgot = {
|
|
||||||
target = ".config/zellij/plugins/zellij-forgot.wasm";
|
|
||||||
source = builtins.fetchurl "https://github.com/karimould/zellij-forgot/releases/download/0.2.0/zellij_forgot.wasm";
|
|
||||||
};
|
|
||||||
monocle = {
|
|
||||||
target = ".config/zellij/plugins/monocle.wasm";
|
|
||||||
source = builtins.fetchurl "https://github.com/imsnif/monocle/releases/download/0.37.2/monocle.wasm";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.zellij = {
|
programs.zellij = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "gruvbox-dark";
|
theme = "gruvbox-dark";
|
||||||
themes.gruvbox-dark = {
|
themes.gruvbox-dark = {
|
||||||
fg = "#d5c4a1";
|
fg = "#D5C4A1";
|
||||||
bg = "#282828";
|
bg = "#282828";
|
||||||
black = "#3C3836";
|
black = "#3C3836";
|
||||||
red = "#CC241D";
|
red = "#CC241D";
|
||||||
|
@ -30,16 +21,9 @@ in with lib; {
|
||||||
blue = "#3C8588";
|
blue = "#3C8588";
|
||||||
magenta = "#B16286";
|
magenta = "#B16286";
|
||||||
cyan = "#689D6A";
|
cyan = "#689D6A";
|
||||||
white = "#665c54";
|
white = "#FBF1C7";
|
||||||
orange = "#D65D0E";
|
orange = "#D65D0E";
|
||||||
};
|
};
|
||||||
# keybinds = {
|
|
||||||
# session = {
|
|
||||||
# "bind \"o\"" = {
|
|
||||||
# LaunchOrFocusPlugin = ["file:/home/jade/.config/zellij/plugins/monocle.wasm" { floating = true; }];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
pane_frames = false;
|
pane_frames = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -247,21 +247,9 @@ $env.config = {
|
||||||
|
|
||||||
hooks: {
|
hooks: {
|
||||||
pre_prompt: [{ ||
|
pre_prompt: [{ ||
|
||||||
let direnv = (direnv export json | from json | default {})
|
let direnv = (direnv export json | from json)
|
||||||
if ($direnv | is-empty) {
|
let direnv = if ($direnv | length) == 1 { $direnv } else { {} }
|
||||||
return
|
$direnv | load-env
|
||||||
}
|
|
||||||
$direnv
|
|
||||||
| items {|key, value|
|
|
||||||
{
|
|
||||||
key: $key
|
|
||||||
value: (if $key in $env.ENV_CONVERSIONS {
|
|
||||||
do ($env.ENV_CONVERSIONS | get $key | get from_string) $value
|
|
||||||
} else {
|
|
||||||
$value
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} | transpose -ird | load-env
|
|
||||||
}] # run before the prompt is shown
|
}] # run before the prompt is shown
|
||||||
pre_execution: [{ null }] # run before the repl input is run
|
pre_execution: [{ null }] # run before the repl input is run
|
||||||
env_change: {
|
env_change: {
|
||||||
|
@ -805,5 +793,3 @@ start_zellij
|
||||||
alias gnix = cd ~/nix-configs;
|
alias gnix = cd ~/nix-configs;
|
||||||
alias grepo = cd ~/Documents/repos;
|
alias grepo = cd ~/Documents/repos;
|
||||||
alias wh = wormhole-rs;
|
alias wh = wormhole-rs;
|
||||||
alias nix-shell = nix-shell --run 'nu -li';
|
|
||||||
alias nsp = nix-shell --run 'nu -li' -p;
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/usr/bin/env nu
|
|
||||||
|
|
||||||
def main [ ] {
|
|
||||||
let reg = (
|
|
||||||
xwininfo -id (xdotool getactivewindow)
|
|
||||||
| lines
|
|
||||||
| parse '{key}: {value}'
|
|
||||||
| str trim
|
|
||||||
| get value
|
|
||||||
| echo {
|
|
||||||
x: $in.1
|
|
||||||
y: $in.2
|
|
||||||
w: $in.5
|
|
||||||
h: $in.6
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
flameshot gui --region $"($reg.w)x($reg.h)+($reg.x)+($reg.y)" -c -p ~/Pictures/screenshots
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
def main [
|
|
||||||
interface: string
|
|
||||||
type: string
|
|
||||||
] {
|
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | append '/run/current-system/sw/bin');
|
|
||||||
|
|
||||||
let currentnet = (
|
|
||||||
nmcli -m tabular connection show --active
|
|
||||||
| detect columns
|
|
||||||
| first
|
|
||||||
| get name
|
|
||||||
);
|
|
||||||
|
|
||||||
systemd-cat echo $"($currentnet) \(($interface)): ($type)";
|
|
||||||
|
|
||||||
if $interface == 'wlp2s0' {
|
|
||||||
^$"/etc/networkhooks/($currentnet).nu" $interface $type
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
def main [
|
|
||||||
interface: string
|
|
||||||
type: string
|
|
||||||
] {
|
|
||||||
if not ($type == 'up') {
|
|
||||||
exit
|
|
||||||
};
|
|
||||||
|
|
||||||
mullvad disconnect;
|
|
||||||
let page = http get 'http://172.0.0.1/';
|
|
||||||
|
|
||||||
let hotspot_ip = $page | htmlq 'input[name=uamip]' -a 'value';
|
|
||||||
let hotspot_port = $page | htmlq 'input[name=uamport]' -a 'value';
|
|
||||||
|
|
||||||
let pl_data = $page
|
|
||||||
| htmlq input -a name -r input[name=button]
|
|
||||||
| lines
|
|
||||||
| wrap name
|
|
||||||
| merge (
|
|
||||||
$page
|
|
||||||
| htmlq input -a value
|
|
||||||
| lines
|
|
||||||
| wrap value
|
|
||||||
)
|
|
||||||
| drop 1;
|
|
||||||
|
|
||||||
let payload = $pl_data
|
|
||||||
| each {|kv| [
|
|
||||||
($kv.name | url encode --all)
|
|
||||||
($kv.value | url encode --all) ]
|
|
||||||
| str join '='
|
|
||||||
} | str join '&';
|
|
||||||
|
|
||||||
let res = curl --insecure --resolve $"www.hotsplots.de:($hotspot_port):($hotspot_ip)" -H 'Content-Type: application/x-www-form-urlencoded' "https://www.hotsplots.de/auth/login.php" --data-raw $"($payload)" ;
|
|
||||||
|
|
||||||
let url = $res | htmlq 'meta[http-equiv=refresh]' -a 'content' | parse '0;url={url}';
|
|
||||||
|
|
||||||
http get $url.url.0;
|
|
||||||
mullvad connect;
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
#! /usr/bin/env nix-shell
|
|
||||||
#! nix-shell -i bash -p curl htmlq
|
|
||||||
|
|
||||||
# echo "Fetching cookie and CSRF token..."
|
|
||||||
# form=$(curl --silent --location --junk-session-cookies --cookie-jar /tmp/wifionice "https://login.wifionice.de/en/" --resolve login.wifionice.de:443:10.101.64.10 -i | htmlq "input")
|
|
||||||
|
|
||||||
# keys=$(htmlq "input" --attribute "name" <<< "$form")
|
|
||||||
# values=$(htmlq "input" --attribute "value" <<< "$form")
|
|
||||||
# payload=$(paste --delimiters="=" <(echo "$keys") <(echo "$values") | tr "\n" "&")
|
|
||||||
|
|
||||||
# echo "Payload: \"$payload\""
|
|
||||||
# echo "POSTing payload..."
|
|
||||||
|
|
||||||
# curl --cookie /tmp/wifionice "https://login.wifionice.de/en/" --resolve login.wifionice.de:443:10.101.64.10 -d "$payload"
|
|
||||||
|
|
||||||
def main [
|
|
||||||
interface: string
|
|
||||||
type: string
|
|
||||||
] {
|
|
||||||
let form = curl --silent --location --junk-session-cookies --cookie-jar /tmp/wifionice 'https://login.wifionice.de/en/' --resolve 'login.wifionice.de:443:10.101.64.10' -i | htmlq 'input';
|
|
||||||
# TODO
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
const wave_timeout = 15min;
|
|
||||||
|
|
||||||
def main [
|
|
||||||
interface: string
|
|
||||||
type: string
|
|
||||||
] {
|
|
||||||
if not ('/var/lib/ccchh-winken/last' | path exists) {
|
|
||||||
mkdir '/var/lib/ccchh-winken';
|
|
||||||
0 | into datetime | save '/var/lib/ccchh-winken/last' -f;
|
|
||||||
}
|
|
||||||
|
|
||||||
let $last_waved = open '/var/lib/ccchh-winken/last' --raw | into datetime;
|
|
||||||
|
|
||||||
if ((date now) - $last_waved) > $wave_timeout {
|
|
||||||
if $type == "up" {
|
|
||||||
mullvad disconnect;
|
|
||||||
curl mqtt://mqtt.z9/winkekatze/katz9/eye/set -d (rand-color);
|
|
||||||
curl mqtt://mqtt.z9/winkekatze/Viktoria/eye/set -d (rand-color);
|
|
||||||
curl mqtt://mqtt.z9/winkekatze/allcats -d 'wink';
|
|
||||||
mullvad connect;
|
|
||||||
|
|
||||||
date now | save '/var/lib/ccchh-winken/last' -f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def rand-color [] {
|
|
||||||
const colors = [
|
|
||||||
"blue"
|
|
||||||
"cyan"
|
|
||||||
"green"
|
|
||||||
"pink"
|
|
||||||
"red"
|
|
||||||
"white"
|
|
||||||
"yellow"
|
|
||||||
];
|
|
||||||
|
|
||||||
$colors | get (random integer 0..(($colors | length) - 1))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
1
test.sh
Executable file
1
test.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
sudo nixos-rebuild test --flake . --impure
|
Loading…
Reference in a new issue