hosts: code cleanup

This commit is contained in:
Aly Raffauf 2024-07-10 21:21:14 -04:00
parent 6d2df2b81b
commit e0909651f7
5 changed files with 65 additions and 93 deletions

View file

@ -79,8 +79,7 @@
} }
]; ];
nix = { nix.settings = {
settings = {
substituters = [ substituters = [
"https://alyraffauf.cachix.org" "https://alyraffauf.cachix.org"
"https://cache.nixos.org/" "https://cache.nixos.org/"
@ -94,7 +93,6 @@
trusted-users = ["aly"]; trusted-users = ["aly"];
}; };
};
nixpkgs.config.allowUnfree = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Allow unfree packages
@ -106,49 +104,33 @@
profiles = let profiles = let
mkOpenWiFi = ssid: { mkOpenWiFi = ssid: {
connection = { connection.id = "${ssid}";
id = "${ssid}"; connection.type = "wifi";
type = "wifi";
};
ipv4.method = "auto"; ipv4.method = "auto";
ipv6.addr-gen-mode = "default";
ipv6 = { ipv6.method = "auto";
addr-gen-mode = "default"; wifi.mode = "infrastructure";
method = "auto"; wifi.ssid = "${ssid}";
};
wifi = {
mode = "infrastructure";
ssid = "${ssid}";
};
}; };
mkWPA2WiFi = ssid: psk: ( mkWPA2WiFi = ssid: psk: (
(mkOpenWiFi ssid) (mkOpenWiFi ssid)
// { // {
wifi-security = { wifi-security.auth-alg = "open";
auth-alg = "open"; wifi-security.key-mgmt = "wpa-psk";
key-mgmt = "wpa-psk"; wifi-security.psk = "${psk}";
psk = "${psk}";
};
} }
); );
mkEAPWiFi = ssid: identity: pass: auth: ( mkEAPWiFi = ssid: identity: pass: auth: (
(mkOpenWiFi ssid) (mkOpenWiFi ssid)
// { // {
"802-1x" = { "802-1x".eap = "peap;";
eap = "peap;"; "802-1x".identity = "${identity}";
identity = "${identity}"; "802-1x".password = "${pass}";
password = "${pass}"; "802-1x".phase2-auth = "${auth}";
phase2-auth = "${auth}"; wifi-security.auth-alg = "open";
}; wifi-security.key-mgmt = "wpa-eap";
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-eap";
};
} }
); );
in { in {

View file

@ -4,16 +4,12 @@
pkgs, pkgs,
... ...
}: { }: {
home-manager = { home-manager.sharedModules = [
sharedModules = [
{ {
ar.home = { ar.home.services.easyeffects = {
services.easyeffects = {
enable = true; enable = true;
preset = "framework13"; preset = "framework13";
}; };
};
} }
]; ];
};
} }

View file

@ -142,14 +142,12 @@ in {
inherit domain; inherit domain;
enable = true; enable = true;
containers = { containers.oci = {
oci = {
audiobookshelf.enable = true; audiobookshelf.enable = true;
freshRSS.enable = true; freshRSS.enable = true;
plexMediaServer.enable = true; plexMediaServer.enable = true;
transmission.enable = true; transmission.enable = true;
}; };
};
services = { services = {
ddclient = { ddclient = {
@ -161,10 +159,12 @@ in {
forgejo.enable = true; forgejo.enable = true;
navidrome = { navidrome = {
enable = true; enable = true;
lastfm = { lastfm = {
idFile = config.age.secrets.lastfmId.path; idFile = config.age.secrets.lastfmId.path;
secretFile = config.age.secrets.lastfmSecret.path; secretFile = config.age.secrets.lastfmSecret.path;
}; };
spotify = { spotify = {
idFile = config.age.secrets.spotifyId.path; idFile = config.age.secrets.spotifyId.path;
secretFile = config.age.secrets.spotifySecret.path; secretFile = config.age.secrets.spotifySecret.path;

View file

@ -5,8 +5,7 @@
self, self,
... ...
}: { }: {
home-manager = { home-manager.sharedModules = [
sharedModules = [
{ {
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''
# Extra bindings for petalburg. # Extra bindings for petalburg.
@ -19,5 +18,4 @@
ar.home.desktop.hyprland.tabletMode.enable = true; ar.home.desktop.hyprland.tabletMode.enable = true;
} }
]; ];
};
} }

View file

@ -4,8 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
home-manager = { home-manager.sharedModules = [
sharedModules = [
{ {
programs.vscode.userSettings = { programs.vscode.userSettings = {
"editor.fontSize" = lib.mkForce "16"; "editor.fontSize" = lib.mkForce "16";
@ -15,13 +14,10 @@
gtk.font.size = lib.mkForce 14; gtk.font.size = lib.mkForce 14;
ar.home = { ar.home.services.easyeffects = {
services.easyeffects = {
enable = true; enable = true;
preset = "LoudnessEqualizer"; preset = "LoudnessEqualizer";
}; };
};
} }
]; ];
};
} }