Compare commits
No commits in common. "f7e23e39c7742c73e79eed91790f460d1b16ed9a" and "e3a1143ca5f49ae1b84c4a9196a55e29d769b4f1" have entirely different histories.
f7e23e39c7
...
e3a1143ca5
14
flake.lock
14
flake.lock
|
@ -380,11 +380,11 @@
|
|||
"nix-secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1721484039,
|
||||
"narHash": "sha256-NIAfRofVQrYEE/XVbp3nmW1JYCxfv8gbuCEYySnZN18=",
|
||||
"lastModified": 1721482736,
|
||||
"narHash": "sha256-jrR4tQeESMJ/vSDSDjw6N8t1137TiRFsXq8CsG05sLE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "ad7a2afbe9c767101006c992b6031337f49c3777",
|
||||
"revCount": 157,
|
||||
"rev": "cfdb75ffef8f3e91fe95823086fabf4743e5e65b",
|
||||
"revCount": 155,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
||||
},
|
||||
|
@ -502,11 +502,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1721483124,
|
||||
"narHash": "sha256-pWsDpSZ/8necd7nvjV9P+EAARWaYgvn8tIDfUo6kJ/c=",
|
||||
"lastModified": 1721472350,
|
||||
"narHash": "sha256-XFGmZB6GhnYsTOFouj60lc40OkZxpdk6mL2nTT0fIkU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "a4c5fbcd97777ae321523253b042b13de0941a25",
|
||||
"rev": "b4365ef44d92f9f6bd6ad3e54117d1719ebd2c57",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
./scripts/get-focused-monitor.nix
|
||||
./scripts/git-commit-ai.nix
|
||||
./scripts/aichat-wrapper.nix
|
||||
./scripts/dmenu-wifi.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "dmenu-wifi" ''
|
||||
nmcli dev wifi rescan
|
||||
ssid_list=$(nmcli -f in-use,bssid,ssid,mode,chan,freq,rate,signal,bars,security dev wifi)
|
||||
available_connections=$(echo "$ssid_list" | sed '/--.*Infra/d')
|
||||
|
||||
connection=$( echo "$available_connections" | dmenu -l 20)
|
||||
bssid=$(echo "$connection" | sed 's/^.\s*//;s/\s\s.*$//')
|
||||
ssid=$(echo "$connection" | sed 's/^.\s*[0-9;A-Z;:]*\s\s//;s/\s*Infra\s*[0-9].*$//')
|
||||
[[ "$connection" = "" ]] && notify-send -t 5000 "Wifi Connect" "Cancelled" && exit 0
|
||||
[[ $( echo "$connection" | grep "IN-USE" -o) = "IN-USE" ]] && notify-send -t 5000 "Wifi Connect" "Please select valid network" && exit 0
|
||||
[[ -n "$(echo "$connection" | grep '\*')" ]] && notify-send -t 5000 "Wifi Connect" "Already Connected to: $(echo "$ssid")" && exit 0
|
||||
|
||||
notify-send -t 5000 "Network Manager" "Attempting to connect to $ssid..."
|
||||
nmcli connection modify "$ssid" 802-11-wireless.bssid "$bssid"
|
||||
nmcli device wifi connect "$bssid"
|
||||
return_code=$?
|
||||
if [ $return_code == 4 ];
|
||||
then
|
||||
notify-send -t 5000 "Wifi Connect" "Please enter password for '$ssid'..."
|
||||
prompt="Enter Password for '$ssid'"
|
||||
pwd=$(echo "" | dmenu -p "$prompt")
|
||||
nmcli device wifi connect "$bssid" password "$pwd"
|
||||
return_code=$?
|
||||
fi
|
||||
case "$return_code" in
|
||||
0) notify-send -t 5000 "Wifi Connect" "Successfully connected to: $ssid!"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 0
|
||||
;;
|
||||
3) notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Timeout expired?"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
;;
|
||||
4)
|
||||
notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Possibly wrong password?"
|
||||
nmcli connection delete id "$ssid"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
;;
|
||||
*) notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Error code $?"
|
||||
echo "Failed. Exiting"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
esac
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-battery" ''
|
||||
(writeShellScriptBin "sb-cpu-pct" ''
|
||||
BAT=/sys/class/power_supply/BAT0/capacity
|
||||
|
||||
# Exit script if no battery detected
|
||||
|
|
|
@ -37,7 +37,6 @@ in
|
|||
|
||||
boot = {
|
||||
blacklistedKernelModules = [ "snd_hda_intel" "snd_soc_skl" ];
|
||||
kernelModules = [ "iwlwifi" ];
|
||||
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
@ -46,12 +45,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
firmware = [
|
||||
pkgs.sof-firmware
|
||||
];
|
||||
};
|
||||
hardware.firmware = [
|
||||
pkgs.sof-firmware
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "citadel";
|
||||
|
|
|
@ -21,9 +21,6 @@ in
|
|||
};
|
||||
secrets = {
|
||||
"passwords/root".neededForUsers = true;
|
||||
"ssh_keys/deploy_key/id_ed25519" = {
|
||||
path = "/etc/ssh/deploy_key-ssh-ed25519";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ in
|
|||
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue