Compare commits

...

2 Commits

Author SHA1 Message Date
0bcfa86e5b fix(ags): wifi widget 2025-03-25 17:48:31 +03:00
4758954aea feat: postgres 2025-03-21 00:12:27 +03:00
4 changed files with 26 additions and 5 deletions

View File

@ -3,6 +3,7 @@
./host/bluetooth.nix ./host/bluetooth.nix
./host/bootloader.nix ./host/bootloader.nix
./host/console.nix ./host/console.nix
./host/db.nix
./host/env.nix ./host/env.nix
./host/gamemode.nix ./host/gamemode.nix
./host/gpg.nix ./host/gpg.nix
@ -18,6 +19,7 @@
services = { services = {
udisks2.enable = true; udisks2.enable = true;
fstrim.enable = true; fstrim.enable = true;
upower.enable = true;
}; };
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
} }

10
modules/host/db.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, ... }:{
services.postgresql = {
enable = true;
ensureDatabases = [ "mydatabase" ];
authentication = lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
};
}

View File

@ -91,7 +91,7 @@ window.Bar {
.AudioSlider icon { margin-left: 8px; } .AudioSlider icon { margin-left: 8px; }
.Workspaces, .Layout, .Media, .SysTray, .AudioSlider, .Time { .Workspaces, .Wifi, .Layout, .Media, .SysTray, .AudioSlider, .Battery, .Time {
@extend %item; @extend %item;
} }
} }

View File

@ -1,5 +1,6 @@
import { bind } from "astal" import { bind } from "astal"
import Network from "gi://AstalNetwork" import Network from "gi://AstalNetwork"
import { execAsync } from "astal/process"
export default function Wifi() { export default function Wifi() {
const network = Network.get_default() const network = Network.get_default()
@ -7,11 +8,19 @@ export default function Wifi() {
return <box visible={wifi.as(Boolean)}> return <box visible={wifi.as(Boolean)}>
{wifi.as(wifi => wifi && ( {wifi.as(wifi => wifi && (
<box>
<button
className="Wifi"
onClicked={() => {execAsync("kitty nmtui")}}>
<icon <icon
tooltipText={bind(wifi, "ssid").as(String)} tooltipText={bind(wifi, "ssid").as(String)}
className="Wifi"
icon={bind(wifi, "iconName")} icon={bind(wifi, "iconName")}
/> />
<label
label={bind(wifi, "ssid")}
/>
</button>
</box>
))} ))}
</box> </box>
} }