-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,759 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
config, | ||
lib, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt enabled; | ||
|
||
cfg = config.${namespace}.archetypes.personal; | ||
in | ||
{ | ||
options.${namespace}.archetypes.personal = { | ||
enable = mkBoolOpt false "Whether or not to enable the personal archetype."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
elyth = { | ||
services = { | ||
tailscale = enabled; | ||
}; | ||
|
||
suites = { | ||
common = enabled; | ||
video = enabled; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
config, | ||
lib, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt enabled; | ||
|
||
cfg = config.${namespace}.archetypes.workstation; | ||
in | ||
{ | ||
options.${namespace}.archetypes.workstation = { | ||
enable = mkBoolOpt false "Whether or not to enable the workstation archetype."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
elyth = { | ||
suites = { | ||
common = enabled; | ||
desktop = enabled; | ||
development = enabled; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
config, | ||
inputs, | ||
lib, | ||
pkgs, | ||
system, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) | ||
types | ||
mkIf | ||
getExe | ||
getExe' | ||
; | ||
inherit (lib.${namespace}) mkBoolOpt mkOpt; | ||
inherit (inputs) hyprland; | ||
|
||
cfg = config.${namespace}.display-managers.regreet; | ||
themeCfg = config.${namespace}.theme; | ||
gtkCfg = config.${namespace}.desktop.addons.gtk; | ||
|
||
greetdHyprlandConfig = pkgs.writeText "greetd-hyprland-config" '' | ||
${cfg.hyprlandOutput} | ||
animations { | ||
enabled=false | ||
first_launch_animation=false | ||
} | ||
bind=SUPER, RETURN, exec, ${getExe pkgs.wezterm} | ||
bind=SUPER_SHIFT, RETURN, exec, ${getExe pkgs.nwg-hello} | ||
bind=SUPER_CTRL_SHIFT, RETURN, exec, ${getExe pkgs.greetd.regreet} | ||
exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE | ||
exec-once = ${getExe pkgs.greetd.regreet} -l debug && ${ | ||
getExe' hyprland.packages.${system}.hyprland-unwrapped "hyprctl" | ||
} exit | ||
''; | ||
in | ||
{ | ||
options.${namespace}.display-managers.regreet = with types; { | ||
enable = mkBoolOpt false "Whether or not to enable greetd."; | ||
hyprlandOutput = mkOpt lines "" "Hyprlands Outputs config."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ | ||
themeCfg.cursor.package | ||
themeCfg.icon.package | ||
gtkCfg.theme.package | ||
]; | ||
|
||
programs.regreet = { | ||
enable = true; | ||
|
||
settings = { | ||
background = { | ||
path = pkgs.${namespace}.wallpapers.flatppuccin_macchiato; | ||
fit = "Cover"; | ||
}; | ||
|
||
GTK = { | ||
application_prefer_dark_theme = true; | ||
cursor_theme_name = "${themeCfg.cursor.name}"; | ||
font_name = "${config.${namespace}.system.fonts.default} * 12"; | ||
icon_theme_name = "${themeCfg.icon.name}"; | ||
theme_name = "${gtkCfg.theme.name}"; | ||
}; | ||
}; | ||
}; | ||
|
||
services.greetd = { | ||
settings = { | ||
default_session = { | ||
command = "${ | ||
getExe hyprland.packages.${system}.hyprland-unwrapped | ||
} --config ${greetdHyprlandConfig} > /tmp/hyprland-log-out.txt 2>&1"; | ||
}; | ||
}; | ||
|
||
restart = false; | ||
}; | ||
|
||
security.pam.services.greetd = { | ||
enableGnomeKeyring = true; | ||
gnupg.enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf getExe; | ||
inherit (lib.${namespace}) mkBoolOpt; | ||
|
||
cfg = config.${namespace}.display-managers.tuigreet; | ||
in | ||
{ | ||
options.${namespace}.display-managers.tuigreet = { | ||
enable = mkBoolOpt false "Whether or not to enable tuigreet."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
services.greetd = { | ||
enable = true; | ||
settings = { | ||
default_session = { | ||
command = "${getExe pkgs.greetd.tuigreet} --time -r --cmd Hyprland"; | ||
user = "greeter"; | ||
}; | ||
}; | ||
}; | ||
|
||
security.pam.services.greetd = { | ||
enableGnomeKeyring = true; | ||
gnupg.enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) types mkIf mkForce; | ||
inherit (lib.${namespace}) mkBoolOpt mkOpt; | ||
|
||
cfg = config.${namespace}.hardware.audio; | ||
in | ||
{ | ||
options.${namespace}.hardware.audio = with types; { | ||
enable = mkBoolOpt false "Whether or not to enable audio support."; | ||
alsa-monitor = mkOpt attrs { } "Alsa configuration."; | ||
extra-packages = mkOpt (listOf package) [ | ||
pkgs.qjackctl | ||
# FIXME: broken nixpkgs | ||
pkgs.easyeffects | ||
] "Additional packages to install."; | ||
modules = mkOpt (listOf attrs) [ ] "Audio modules to pass to Pipewire as `context.modules`."; | ||
nodes = mkOpt (listOf attrs) [ ] "Audio nodes to pass to Pipewire as `context.objects`."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = | ||
with pkgs; | ||
[ | ||
pulsemixer | ||
pavucontrol | ||
helvum | ||
] | ||
++ cfg.extra-packages; | ||
|
||
hardware.pulseaudio.enable = mkForce false; | ||
|
||
elyth = { | ||
user.extraGroups = [ "audio" ]; | ||
}; | ||
|
||
security.rtkit.enable = true; | ||
|
||
services.pipewire = { | ||
enable = true; | ||
alsa.enable = true; | ||
audio.enable = true; | ||
jack.enable = true; | ||
pulse.enable = true; | ||
wireplumber.enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt; | ||
|
||
cfg = config.${namespace}.hardware.bluetooth; | ||
in | ||
{ | ||
options.${namespace}.hardware.bluetooth = { | ||
enable = mkBoolOpt false "Whether or not to enable support for extra bluetooth devices."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
hardware.bluetooth = { | ||
enable = true; | ||
|
||
package = pkgs.bluez-experimental; | ||
powerOnBoot = true; | ||
|
||
settings = { | ||
General = { | ||
Experimental = true; | ||
JustWorksRepairing = "always"; | ||
MultiProfile = "multiple"; | ||
}; | ||
}; | ||
}; | ||
|
||
boot.kernelParams = [ "btusb" ]; | ||
|
||
services.blueman = { | ||
enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ lib, namespace, ... }: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt; | ||
cfg = config.${namespace}.hardware.cpu.amd; | ||
in | ||
{ | ||
options.${namespace}.hardware.cpu = { | ||
enable = mkBoolOpt false "No-op used for setting up hierarchy."; | ||
}; | ||
options.${namespace}.hardware.cpu.amd = { | ||
enable = mkBoolOpt false "Whether or not to enable support for amd cpu."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
boot = { | ||
extraModulePackages = [ config.boot.kernelPackages.zenpower ]; | ||
|
||
kernelModules = [ | ||
"kvm-amd" # amd virtualization | ||
"amd-pstate" # load pstate module in case the device has a newer gpu | ||
"zenpower" # zenpower is for reading cpu info, i.e voltage | ||
"msr" # x86 CPU MSR access device | ||
]; | ||
|
||
kernelParams = [ "amd_pstate=active" ]; | ||
}; | ||
|
||
environment.systemPackages = [ pkgs.amdctl ]; | ||
|
||
hardware.cpu.amd.updateMicrocode = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt; | ||
|
||
cfg = config.${namespace}.hardware.opengl; | ||
in | ||
{ | ||
options.${namespace}.hardware.opengl = { | ||
enable = mkBoolOpt false "Whether or not to enable support for opengl."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = with pkgs; [ | ||
libva-utils | ||
vdpauinfo | ||
]; | ||
|
||
hardware.graphics = { | ||
enable = true; | ||
enable32Bit = true; | ||
|
||
extraPackages = with pkgs; [ | ||
vaapiVdpau | ||
libvdpau-va-gl | ||
libva | ||
libvdpau | ||
libdrm | ||
]; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
config, | ||
lib, | ||
namespace, | ||
... | ||
}: | ||
let | ||
inherit (lib) mkIf; | ||
inherit (lib.${namespace}) mkBoolOpt; | ||
|
||
cfg = config.${namespace}.hardware.power; | ||
in | ||
{ | ||
options.${namespace}.hardware.power = { | ||
enable = mkBoolOpt false "Whether or not to enable support for extra power devices."; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
services.upower = { | ||
enable = true; | ||
percentageAction = 5; | ||
percentageCritical = 10; | ||
percentageLow = 25; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.