This commit is contained in:
randomuser 2024-02-09 23:42:23 -06:00
commit 64c7debf35
13 changed files with 315 additions and 10 deletions

View File

@ -340,8 +340,9 @@ in {
return 301 https://mail.beepboop.systems; return 301 https://mail.beepboop.systems;
''; '';
}; };
locations."~ \\.git" = { locations."~* ^(.*)\\.git(/.*)?$" = {
extraConfig = '' extraConfig = ''
set $modified_path $1$2;
client_max_body_size 0; client_max_body_size 0;
include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi_params;

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
}

31
boxes/phone/default.nix Normal file
View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
imports = [
./bootstrap.nix
];
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config = ./home.nix;
};
# Simply install just the packages
environment.packages = with pkgs; [
# User-facing stuff that you really really want to have
git
tmux
hostname
];
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "23.05";
# Set your time zone
time.timeZone = "America/Chicago";
}

10
boxes/phone/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, pkgs, home, ... }:
{
imports = [
../../home/nvim
../../home/ssh
../../home/git # needed for flakes
];
home.stateVersion = "23.05";
}

View File

@ -32,10 +32,13 @@
services.getty.autologinUser = "usr"; services.getty.autologinUser = "usr";
boot.loader = { boot.loader = {
grub.timeoutStyle = "hidden"; grub = {
timeout = 0; timeoutStyle = "hidden";
grub.enable = true; enable = true;
grub.device = "/dev/sda"; device = "/dev/sda";
splashImage = null;
};
timeout = 1;
}; };
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;

View File

@ -17,6 +17,8 @@
, curl , curl
, ytfzf , ytfzf
, xrandr , xrandr
, svkbd
, libsForQt5
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -26,7 +28,7 @@ stdenv.mkDerivation rec {
src = ./utils; src = ./utils;
nativeBuildInputs = [ makeWrapper pkg-config libxcb ]; nativeBuildInputs = [ makeWrapper pkg-config libxcb ];
buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle scrcpy ]; buildInputs = [ libxcb bash feh xrandr jq curl fzy ytfzf ffmpeg sshuttle svkbd scrcpy libsForQt5.kolourpaint ];
buildPhase = '' buildPhase = ''
ls ls
@ -39,7 +41,11 @@ stdenv.mkDerivation rec {
for i in $(ls $src/sh); do for i in $(ls $src/sh); do
cp $src/sh/$i $out/bin cp $src/sh/$i $out/bin
ln -sf $out/bin/tmenu_run $out/bin/regenerate ln -sf $out/bin/tmenu_run $out/bin/regenerate
<<<<<<< HEAD
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle scrcpy ]} wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle scrcpy ]}
=======
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf ffmpeg sshuttle svkbd libsForQt5.kolourpaint ]}
>>>>>>> f481fd5f3f58fe7ac42fb5d07703be8d59fb4502
done done
cp c/status/main $out/bin/statusbar cp c/status/main $out/bin/statusbar

View File

@ -17,6 +17,7 @@ keyboard () {
pkill xcape pkill xcape
xcape -e 'Super_L=Escape' xcape -e 'Super_L=Escape'
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
xset -r 161 # tablet rotate key doesn't need repeat
xset r rate 200 40 xset r rate 200 40
} }

8
builds/utils/sh/musexplore Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
svkbd-mobile-intl &
choice=$(ls ~/doc/music/works | tmenu)
kill %1
if [ -n "$choice" ]; then
find "$HOME/doc/music/works/$choice/" -type f | sxiv -i
fi

46
builds/utils/sh/tabletmenu Executable file
View File

@ -0,0 +1,46 @@
svkbd-mobile-intl &
choice=$(
printf "
vert-mode
hori-mode
keyb
nokeyb
musexplore
brave
chromium
close-wind
" | tmenu
)
pkill svkbd
case "$choice" in
"vert-mode")
xrandr --output LVDS-1 --rotate left
xinput set-prop "Wacom ISDv4 E6 Finger" 178 0 -1 1 1 0 0 0 0 1
sleep 4
;;
"hori-mode")
xrandr --output LVDS-1 --rotate normal
xinput set-prop "Wacom ISDv4 E6 Finger" 178 1 0 0 0 1 0 0 0 1
;;
"nokeyb")
pkill svkbd
;;
"keyb")
svkbd-mobile-intl & disown
;;
"musexplore")
musexplore
;;
"brave")
brave
;;
"chromium")
chromium
;;
"close-wind")
bspc node -c
;;
esac

View File

@ -91,6 +91,77 @@
"type": "github" "type": "github"
} }
}, },
"home-manager-phone": {
"inputs": {
"nixpkgs": [
"phone-nixpkgs"
]
},
"locked": {
"lastModified": 1702195668,
"narHash": "sha256-Lxmjez0nfNBptdqV5GsXKm7Bb7swjGsrxiLxWJu0tL8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "33110fb3c7fe6a94b98b641866a5eddb64b7c23f",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": {
"lastModified": 1666720474,
"narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": [
"home-manager-phone"
],
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"phone-nixpkgs"
],
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1688144254,
"narHash": "sha256-8KL1l/7eP2Zm1aJjdVaSOk0W5kTnJo9kcgW03gqWuiI=",
"owner": "t184256",
"repo": "nix-on-droid",
"rev": "2301e01d48c90b60751005317de7a84a51a87eb6",
"type": "github"
},
"original": {
"owner": "t184256",
"ref": "release-23.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1706098335, "lastModified": 1706098335,
@ -137,6 +208,22 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1686921029,
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1705856552, "lastModified": 1705856552,
@ -152,11 +239,78 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nmd": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_2": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"phone-nixpkgs": {
"locked": {
"lastModified": 1704290814,
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-phone": "home-manager-phone",
"nix-on-droid": "nix-on-droid",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"phone-nixpkgs": "phone-nixpkgs",
"simple-nixos-mailserver": "simple-nixos-mailserver" "simple-nixos-mailserver": "simple-nixos-mailserver"
} }
}, },

View File

@ -3,10 +3,15 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
phone-nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager-phone = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "phone-nixpkgs";
};
firefox-addons = { firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -14,9 +19,22 @@
simple-nixos-mailserver = { simple-nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11"; url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
}; };
nix-on-droid = {
url = "github:t184256/nix-on-droid/release-23.05";
inputs.nixpkgs.follows = "phone-nixpkgs";
inputs.home-manager.follows = "home-manager-phone";
};
}; };
outputs = { self, nixpkgs, home-manager, firefox-addons, simple-nixos-mailserver, ... }@inputs: { outputs = { self, nixpkgs, phone-nixpkgs, home-manager, home-manager-phone, firefox-addons, simple-nixos-mailserver, nix-on-droid, ... }@inputs: {
nixOnDroidConfigurations = {
phone = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [
./boxes/phone
];
};
};
nixosConfigurations = { nixosConfigurations = {
netbox = nixpkgs.lib.nixosSystem { netbox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";

View File

@ -1,4 +1,21 @@
Host main Host mainsail
HostName 192.168.1.100
User usr
Port 22
Host netbox
HostName beepboop.systems HostName beepboop.systems
User useracc User ryan
Port 55555 Port 443
Host mainsail-prox
HostName localhost
User usr
Port 55554
ProxyJump netbox
Host mlg-prox
HostName localhost
User usr
Port 2222
ProxyJump mainsail-prox

View File

@ -46,3 +46,6 @@ super + {_,shift + } {1-9,0}
# change a node to tiling, floating, or fullscreen # change a node to tiling, floating, or fullscreen
super + {t,f,s} super + {t,f,s}
bspc node -t {tiled,floating,fullscreen} bspc node -t {tiled,floating,fullscreen}
XF86RotateWindows
tabletmenu