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,21 +79,19 @@
} }
]; ];
nix = { nix.settings = {
settings = { substituters = [
substituters = [ "https://alyraffauf.cachix.org"
"https://alyraffauf.cachix.org" "https://cache.nixos.org/"
"https://cache.nixos.org/" "https://nix-community.cachix.org"
"https://nix-community.cachix.org" ];
];
trusted-public-keys = [ trusted-public-keys = [
"alyraffauf.cachix.org-1:GQVrRGfjTtkPGS8M6y7Ik0z4zLt77O0N25ynv2gWzDM=" "alyraffauf.cachix.org-1:GQVrRGfjTtkPGS8M6y7Ik0z4zLt77O0N25ynv2gWzDM="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
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.services.easyeffects = {
ar.home = { enable = true;
services.easyeffects = { preset = "framework13";
enable = true; };
preset = "framework13"; }
}; ];
};
}
];
};
} }

View file

@ -142,13 +142,11 @@ 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 = {
@ -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,19 +5,17 @@
self, self,
... ...
}: { }: {
home-manager = { home-manager.sharedModules = [
sharedModules = [ {
{ wayland.windowManager.hyprland.extraConfig = ''
wayland.windowManager.hyprland.extraConfig = '' # Extra bindings for petalburg.
# Extra bindings for petalburg. bind = , xf86launch4, exec, ${lib.getExe self.inputs.pp-adjuster.packages.${pkgs.system}.default}
bind = , xf86launch4, exec, ${lib.getExe self.inputs.pp-adjuster.packages.${pkgs.system}.default} bind = , xf86launch2, exec, ${lib.getExe pkgs.playerctl} play-pause
bind = , xf86launch2, exec, ${lib.getExe pkgs.playerctl} play-pause
exec-once = ${lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default} "desc:Samsung Display Corp. 0x4152" exec-once = ${lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default} "desc:Samsung Display Corp. 0x4152"
''; '';
ar.home.desktop.hyprland.tabletMode.enable = true; ar.home.desktop.hyprland.tabletMode.enable = true;
} }
]; ];
};
} }

View file

@ -4,24 +4,20 @@
pkgs, pkgs,
... ...
}: { }: {
home-manager = { home-manager.sharedModules = [
sharedModules = [ {
{ programs.vscode.userSettings = {
programs.vscode.userSettings = { "editor.fontSize" = lib.mkForce "16";
"editor.fontSize" = lib.mkForce "16"; };
};
home.pointerCursor.size = lib.mkForce 24; home.pointerCursor.size = lib.mkForce 24;
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"; };
}; }
}; ];
}
];
};
} }