move duplicated hardware configuration to config.ar.hardware module

This commit is contained in:
Aly Raffauf 2024-06-26 22:13:02 -04:00
parent b0f9144bb7
commit 575149a3a0
105 changed files with 1220 additions and 1176 deletions

View file

@ -92,6 +92,9 @@
nixosModules.default = nixosModules.default =
import ./nixosModules inputs; import ./nixosModules inputs;
nixosModules.hardware =
import ./hardwareModules inputs;
nixosConfigurations = nixosConfigurations =
inputs.nixpkgs.lib.genAttrs [ inputs.nixpkgs.lib.genAttrs [
"fallarbor" "fallarbor"
@ -108,11 +111,12 @@
./hosts/${host} ./hosts/${host}
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
inputs.nur.nixosModules.nur inputs.nur.nixosModules.nur
inputs.home-manager.nixosModules.home-manager
self.nixosModules.default self.nixosModules.default
self.nixosModules.hardware
{ {
home-manager = { home-manager = {
backupFileExtension = "backup"; backupFileExtension = "backup";

View file

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.hardware.cpu.amd {
boot = {
kernelModules = ["kvm-amd"];
kernelParams =
lib.optional (config.ar.hardware.laptop) "amd_pstate=active";
};
hardware = {
cpu.amd.updateMicrocode = true;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
};
}

View file

@ -0,0 +1,12 @@
{
config,
inputs,
lib,
pkgs,
...
}: {
imports = [
./amd
./intel
];
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.hardware.cpu.intel {
boot.kernelModules = ["kvm-intel"];
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.powertop.enable = config.ar.hardware.laptop;
services.thermald.enable = config.ar.hardware.laptop;
};
}

View file

@ -0,0 +1,13 @@
inputs: {
config,
pkgs,
lib,
...
}: {
imports = [
./cpu
./gpu
./options.nix
./ssd
];
}

View file

@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.hardware.gpu.amd {
boot = {
initrd.kernelModules = ["amdgpu"];
kernelModules = ["amdgpu"];
# Disable AMD Backlight Management.
# ABM severely degrades display quality for miniscule power efficiency gains.
kernelParams = ["amdgpu.abmlevel=0"];
};
hardware.amdgpu = {
initrd.enable = true;
amdvlk = {
enable = true;
support32Bit.enable = true;
};
opencl.enable = true;
};
};
}

View file

@ -0,0 +1,12 @@
{
config,
inputs,
lib,
pkgs,
...
}: {
imports = [
./amd
./intel
];
}

View file

@ -0,0 +1,41 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.hardware.gpu.intel {
boot.initrd.kernelModules = ["i915"];
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
VDPAU_DRIVER = "va_gl";
};
hardware = {
enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
extraPackages32 = with pkgs.driversi686Linux; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
sensor.iio.enable = true; # Enable auto-rotate and tablet mode.
};
services.xserver.videoDrivers = ["modesetting"];
};
}

View file

@ -0,0 +1,21 @@
{
config,
inputs,
lib,
pkgs,
self,
...
}: {
options.ar.hardware = {
cpu = {
amd = lib.mkEnableOption "AMD CPU support.";
intel = lib.mkEnableOption "Intel CPU support.";
};
gpu = {
amd = lib.mkEnableOption "AMD GPU support.";
intel = lib.mkEnableOption "Intel GPU support.";
};
laptop = lib.mkEnableOption "Laptop optimizations.";
ssd = lib.mkEnableOption "SSD optimizations.";
};
}

View file

@ -0,0 +1,10 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.hardware.ssd {
services.fstrim.enable = true;
};
}

View file

@ -4,24 +4,24 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.alacritty.enable { config = lib.mkIf config.ar.home.apps.alacritty.enable {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
colors = { colors = {
primary = { primary = {
background = "${config.alyraffauf.theme.colors.background}"; background = "${config.ar.home.theme.colors.background}";
foreground = "${config.alyraffauf.theme.colors.text}"; foreground = "${config.ar.home.theme.colors.text}";
}; };
transparent_background_colors = true; transparent_background_colors = true;
draw_bold_text_with_bright_colors = true; draw_bold_text_with_bright_colors = true;
}; };
font = { font = {
normal = { normal = {
family = "${config.alyraffauf.theme.terminalFont.name}"; family = "${config.ar.home.theme.terminalFont.name}";
style = "Regular"; style = "Regular";
}; };
size = config.alyraffauf.theme.terminalFont.size; size = config.ar.home.theme.terminalFont.size;
}; };
selection.save_to_clipboard = true; selection.save_to_clipboard = true;
window = { window = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.bash.enable { config = lib.mkIf config.ar.home.apps.bash.enable {
home.shellAliases = { home.shellAliases = {
cat = lib.getExe pkgs.bat; cat = lib.getExe pkgs.bat;
grep = lib.getExe config.programs.ripgrep.package; grep = lib.getExe config.programs.ripgrep.package;

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.chromium.enable { config = lib.mkIf config.ar.home.apps.chromium.enable {
programs.chromium = { programs.chromium = {
enable = true; enable = true;
package = config.alyraffauf.apps.chromium.package; package = config.ar.home.apps.chromium.package;
extensions = [ extensions = [
{id = "enamippconapkdmgfgjchkhakpfinmaj";} # dearrow {id = "enamippconapkdmgfgjchkhakpfinmaj";} # dearrow
{id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # todoist {id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # todoist

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.emacs.enable { config = lib.mkIf config.ar.home.apps.emacs.enable {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
extraPackages = epkgs: (with epkgs; [ extraPackages = epkgs: (with epkgs; [

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.fastfetch.enable { config = lib.mkIf config.ar.home.apps.fastfetch.enable {
home.packages = [pkgs.fastfetch]; home.packages = [pkgs.fastfetch];
xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc; xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc;
}; };

View file

@ -4,12 +4,12 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.firefox.enable { config = lib.mkIf config.ar.home.apps.firefox.enable {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
nativeMessagingHosts = nativeMessagingHosts =
lib.optionals (config.alyraffauf.apps.keepassxc.enable) [pkgs.keepassxc] lib.optionals (config.ar.home.apps.keepassxc.enable) [pkgs.keepassxc]
++ lib.optionals (config.alyraffauf.desktop.gnome.enable) [pkgs.gnome-browser-connector]; ++ lib.optionals (config.ar.home.desktop.gnome.enable) [pkgs.gnome-browser-connector];
}; };
}; };
} }

View file

@ -4,16 +4,16 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.fuzzel.enable { config = lib.mkIf config.ar.home.apps.fuzzel.enable {
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
main = { main = {
font = "${config.alyraffauf.theme.terminalFont.name}:size=${toString config.alyraffauf.theme.terminalFont.size}"; font = "${config.ar.home.theme.terminalFont.name}:size=${toString config.ar.home.theme.terminalFont.size}";
icon-theme = "${config.alyraffauf.theme.iconTheme.name}"; icon-theme = "${config.ar.home.theme.iconTheme.name}";
layer = "overlay"; layer = "overlay";
lines = 3; lines = 3;
terminal = config.alyraffauf.defaultApps.terminal.exe; terminal = config.ar.home.defaultApps.terminal.exe;
width = 36; width = 36;
}; };
border = { border = {
@ -21,12 +21,12 @@
width = 2; width = 2;
}; };
colors = { colors = {
background = "${config.alyraffauf.theme.colors.background}CC"; background = "${config.ar.home.theme.colors.background}CC";
border = "${config.alyraffauf.theme.colors.primary}EE"; border = "${config.ar.home.theme.colors.primary}EE";
selection = "${config.alyraffauf.theme.colors.background}FF"; selection = "${config.ar.home.theme.colors.background}FF";
selection-match = "#e78284FF"; selection-match = "#e78284FF";
selection-text = "#f4b8e4FF"; selection-text = "#f4b8e4FF";
text = "${config.alyraffauf.theme.colors.text}FF"; text = "${config.ar.home.theme.colors.text}FF";
}; };
}; };
}; };

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.keepassxc.enable { config = lib.mkIf config.ar.home.apps.keepassxc.enable {
home.packages = [pkgs.keepassxc]; home.packages = [pkgs.keepassxc];
alyraffauf.apps.keepassxc.settings = lib.mkDefault { ar.home.apps.keepassxc.settings = lib.mkDefault {
Browser = { Browser = {
AlwaysAllowAccess = true; AlwaysAllowAccess = true;
Enabled = true; Enabled = true;
@ -47,6 +47,6 @@
xdg.configFile."keepassxc/keepassxc.ini".text = xdg.configFile."keepassxc/keepassxc.ini".text =
lib.generators.toINI {} lib.generators.toINI {}
config.alyraffauf.apps.keepassxc.settings; config.ar.home.apps.keepassxc.settings;
}; };
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.librewolf.enable { config = lib.mkIf config.ar.home.apps.librewolf.enable {
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;
settings = { settings = {

View file

@ -4,20 +4,20 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.mako.enable { config = lib.mkIf config.ar.home.apps.mako.enable {
services.mako = { services.mako = {
enable = true; enable = true;
anchor = "top-center"; anchor = "top-center";
backgroundColor = "${config.alyraffauf.theme.colors.background}CC"; backgroundColor = "${config.ar.home.theme.colors.background}CC";
borderColor = "${config.alyraffauf.theme.colors.primary}EE"; borderColor = "${config.ar.home.theme.colors.primary}EE";
borderSize = 2; borderSize = 2;
borderRadius = 10; borderRadius = 10;
defaultTimeout = 10000; defaultTimeout = 10000;
font = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; font = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}";
height = 300; height = 300;
layer = "top"; layer = "top";
padding = "15"; padding = "15";
textColor = "${config.alyraffauf.theme.colors.text}"; textColor = "${config.ar.home.theme.colors.text}";
width = 400; width = 400;
margin = "20,0"; margin = "20,0";
extraConfig = '' extraConfig = ''

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.nemo.enable { config = lib.mkIf config.ar.home.apps.nemo.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
cinnamon.nemo cinnamon.nemo
]; ];
@ -14,9 +14,9 @@
settings = { settings = {
"org/nemo/preferences".show-image-thumbnails = "always"; "org/nemo/preferences".show-image-thumbnails = "always";
"org/nemo/preferences/menu-config".background-menu-open-as-root = "org/nemo/preferences/menu-config".background-menu-open-as-root =
!(config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable); !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable);
"org/nemo/preferences/menu-config".selection-menu-open-as-root = "org/nemo/preferences/menu-config".selection-menu-open-as-root =
!(config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable); !(config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable);
}; };
}; };
}; };

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.neovim.enable { config = lib.mkIf config.ar.home.apps.neovim.enable {
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.swaylock.enable { config = lib.mkIf config.ar.home.apps.swaylock.enable {
home.packages = with pkgs; [swaylock]; home.packages = with pkgs; [swaylock];
programs.swaylock.enable = true; programs.swaylock.enable = true;
@ -15,8 +15,8 @@
caps-lock-key-hl-color=e78284 caps-lock-key-hl-color=e78284
color=303446 color=303446
daemonize daemonize
font="${config.alyraffauf.theme.terminalFont.name}-Regular" font="${config.ar.home.theme.terminalFont.name}-Regular"
image=${config.alyraffauf.theme.wallpaper} image=${config.ar.home.theme.wallpaper}
indicator-caps-lock indicator-caps-lock
indicator-idle-visible indicator-idle-visible
indicator-radius=120 indicator-radius=120
@ -27,17 +27,17 @@
inside-ver-color=303446cc inside-ver-color=303446cc
inside-wrong-color=303446cc inside-wrong-color=303446cc
key-hl-color=a6d189 key-hl-color=a6d189
line-caps-lock-color=${config.alyraffauf.theme.colors.background}CC line-caps-lock-color=${config.ar.home.theme.colors.background}CC
line-clear-color=${config.alyraffauf.theme.colors.background}CC line-clear-color=${config.ar.home.theme.colors.background}CC
line-color=${config.alyraffauf.theme.colors.background}CC line-color=${config.ar.home.theme.colors.background}CC
line-ver-color=${config.alyraffauf.theme.colors.background}CC line-ver-color=${config.ar.home.theme.colors.background}CC
line-wrong-color=${config.alyraffauf.theme.colors.background}CC line-wrong-color=${config.ar.home.theme.colors.background}CC
ring-caps-lock-color=e78284cc ring-caps-lock-color=e78284cc
ring-clear-color=85c1dccc ring-clear-color=85c1dccc
ring-color=${config.alyraffauf.theme.colors.primary}CC ring-color=${config.ar.home.theme.colors.primary}CC
ring-ver-color=a6d189cc ring-ver-color=a6d189cc
ring-wrong-color=e78284cc ring-wrong-color=e78284cc
separator-color=${config.alyraffauf.theme.colors.background}CC separator-color=${config.ar.home.theme.colors.background}CC
text-caps-lock-color=c6d0f5 text-caps-lock-color=c6d0f5
text-clear-color=c6d0f5 text-clear-color=c6d0f5
text-ver-color=c6d0f5 text-ver-color=c6d0f5

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.thunar.enable { config = lib.mkIf config.ar.home.apps.thunar.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
xfce.thunar xfce.thunar
xfce.thunar-archive-plugin xfce.thunar-archive-plugin

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.tmux.enable { config = lib.mkIf config.ar.home.apps.tmux.enable {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
mouse = true; mouse = true;

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.vsCodium.enable { config = lib.mkIf config.ar.home.apps.vsCodium.enable {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscodium;
@ -12,7 +12,7 @@
enableExtensionUpdateCheck = false; enableExtensionUpdateCheck = false;
userSettings = { userSettings = {
"diffEditor.ignoreTrimWhitespace" = false; "diffEditor.ignoreTrimWhitespace" = false;
"editor.fontFamily" = "'NotoSansM Nerd Font','${config.alyraffauf.theme.terminalFont.name}', 'monospace', monospace"; "editor.fontFamily" = "'NotoSansM Nerd Font','${config.ar.home.theme.terminalFont.name}', 'monospace', monospace";
"editor.fontSize" = lib.mkDefault 14; "editor.fontSize" = lib.mkDefault 14;
"terminal.integrated.fontSize" = lib.mkDefault 14; "terminal.integrated.fontSize" = lib.mkDefault 14;
"explorer.confirmDelete" = false; "explorer.confirmDelete" = false;
@ -20,20 +20,20 @@
"git.autofetch" = true; "git.autofetch" = true;
"git.confirmSync" = false; "git.confirmSync" = false;
"nix.formatterPath" = lib.getExe pkgs.alejandra; "nix.formatterPath" = lib.getExe pkgs.alejandra;
"terminal.external.linuxExec" = config.alyraffauf.defaultApps.terminal.exe; "terminal.external.linuxExec" = config.ar.home.defaultApps.terminal.exe;
"update.mode" = "none"; "update.mode" = "none";
"window.menuBarVisibility" = "hidden"; "window.menuBarVisibility" = "hidden";
"window.titleBarStyle" = "window.titleBarStyle" =
if config.alyraffauf.desktop.gnome.enable if config.ar.home.desktop.gnome.enable
then "custom" then "custom"
else "native"; else "native";
"window.zoomPerWindow" = false; "window.zoomPerWindow" = false;
"workbench.colorTheme" = "workbench.colorTheme" =
if config.alyraffauf.theme.colors.preferDark if config.ar.home.theme.colors.preferDark
then "Catppuccin Frappé" then "Catppuccin Frappé"
else "Catppuccin Latte"; else "Catppuccin Latte";
"workbench.iconTheme" = "workbench.iconTheme" =
if config.alyraffauf.theme.colors.preferDark if config.ar.home.theme.colors.preferDark
then "catppuccin-frappe" then "catppuccin-frappe"
else "catppuccin-latte"; else "catppuccin-latte";
"workbench.preferredDarkColorTheme" = "Catppuccin Frappé"; "workbench.preferredDarkColorTheme" = "Catppuccin Frappé";

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.waybar.enable { config = lib.mkIf config.ar.home.apps.waybar.enable {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
settings = { settings = {
@ -14,11 +14,11 @@
output = ["*"]; output = ["*"];
position = "top"; position = "top";
modules-left = modules-left =
lib.optionals (config.alyraffauf.desktop.hyprland.enable) lib.optionals (config.ar.home.desktop.hyprland.enable)
["hyprland/workspaces" "hyprland/submap"] ["hyprland/workspaces" "hyprland/submap"]
++ lib.optionals (config.alyraffauf.desktop.sway.enable) ++ lib.optionals (config.ar.home.desktop.sway.enable)
["sway/workspaces" "sway/scratchpad" "sway/mode"] ["sway/workspaces" "sway/scratchpad" "sway/mode"]
++ lib.optionals (config.alyraffauf.desktop.hyprland.tabletMode.menuButton) ++ lib.optionals (config.ar.home.desktop.hyprland.tabletMode.menuButton)
["custom/menu" "custom/hyprland-close"]; ["custom/menu" "custom/hyprland-close"];
modules-center = ["clock"]; modules-center = ["clock"];
modules-right = [ modules-right = [
@ -138,7 +138,7 @@
"tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}"; "tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}";
"tooltip-format-ethernet" = "{ifname} "; "tooltip-format-ethernet" = "{ifname} ";
"tooltip-format-disconnected" = "Disconnected"; "tooltip-format-disconnected" = "Disconnected";
"on-click" = "${config.alyraffauf.defaultApps.terminalEditor.exe} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; "on-click" = "${config.ar.home.defaultApps.terminalEditor.exe} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
}; };
"tray" = {"spacing" = 15;}; "tray" = {"spacing" = 15;};
"custom/logout" = { "custom/logout" = {
@ -174,25 +174,25 @@
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
font-family: "${config.alyraffauf.theme.terminalFont.name}"; font-family: "${config.ar.home.theme.terminalFont.name}";
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
window#waybar { window#waybar {
background: rgba (35, 38, 52, 0.0); background: rgba (35, 38, 52, 0.0);
color: ${config.alyraffauf.theme.colors.text}; color: ${config.ar.home.theme.colors.text};
} }
#workspaces button { #workspaces button {
padding: 0px 5px; padding: 0px 5px;
margin: 0 0px; margin: 0 0px;
color: ${config.alyraffauf.theme.colors.text}; color: ${config.ar.home.theme.colors.text};
} }
#workspaces button.active, #workspaces button.active,
#workspaces button.focused { #workspaces button.focused {
color: ${config.alyraffauf.theme.colors.primary}; color: ${config.ar.home.theme.colors.primary};
} }
#submap, #submap,
@ -205,11 +205,11 @@
#tags button { #tags button {
padding: 0px 5px; padding: 0px 5px;
margin: 0 0px; margin: 0 0px;
color: ${config.alyraffauf.theme.colors.text}; color: ${config.ar.home.theme.colors.text};
} }
#tags button.focused { #tags button.focused {
color: ${config.alyraffauf.theme.colors.primary}; color: ${config.ar.home.theme.colors.primary};
} }
#clock, #clock,
@ -229,11 +229,11 @@
} }
#battery { #battery {
color: ${config.alyraffauf.theme.colors.text}; color: ${config.ar.home.theme.colors.text};
} }
#battery.charging { #battery.charging {
color: ${config.alyraffauf.theme.colors.primary}; color: ${config.ar.home.theme.colors.primary};
} }
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
@ -252,7 +252,7 @@
#hardware { #hardware {
border-radius: 10; border-radius: 10;
background: rgba ${ background: rgba ${
if config.alyraffauf.theme.colors.preferDark if config.ar.home.theme.colors.preferDark
then "(35, 38, 52, 0.8);" then "(35, 38, 52, 0.8);"
else "(220, 224, 232, 0.8);" else "(220, 224, 232, 0.8);"
} }
@ -266,7 +266,7 @@
#submap, #submap,
#mode { #mode {
color: ${config.alyraffauf.theme.colors.text}; color: ${config.ar.home.theme.colors.text};
background: rgba(231, 130, 132, 0.8); background: rgba(231, 130, 132, 0.8);
} }
''; '';

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.wlogout.enable { config = lib.mkIf config.ar.home.apps.wlogout.enable {
programs.wlogout = { programs.wlogout = {
enable = true; enable = true;
layout = [ layout = [
@ -29,7 +29,7 @@
]; ];
style = '' style = ''
* { * {
font-family: "${config.alyraffauf.theme.font.name}", sans-serif; font-family: "${config.ar.home.theme.font.name}", sans-serif;
background-image: none; background-image: none;
box-shadow: none; box-shadow: none;
transition: 20ms; transition: 20ms;
@ -42,7 +42,7 @@
button { button {
text-decoration-color: #FAFAFA; text-decoration-color: #FAFAFA;
color: #FAFAFA; color: #FAFAFA;
background-color: ${config.alyraffauf.theme.colors.background}; background-color: ${config.ar.home.theme.colors.background};
background-color: rgba(12, 12, 12, 0.0); background-color: rgba(12, 12, 12, 0.0);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 10%; background-size: 10%;
@ -50,7 +50,7 @@
} }
button:active, button:hover { button:active, button:hover {
background-color: ${config.alyraffauf.theme.colors.primary}; background-color: ${config.ar.home.theme.colors.primary};
outline-style: none; outline-style: none;
} }

View file

@ -4,8 +4,8 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.defaultApps.enable { config = lib.mkIf config.ar.home.defaultApps.enable {
home.packages = with config.alyraffauf.defaultApps; [ home.packages = with config.ar.home.defaultApps; [
audioPlayer.package audioPlayer.package
editor.package editor.package
fileManager.package fileManager.package
@ -20,42 +20,42 @@
dconf = { dconf = {
enable = true; enable = true;
settings = { settings = {
"org/cinnamon/desktop/applications/terminal".exec = "${config.alyraffauf.defaultApps.terminal.exe}"; "org/cinnamon/desktop/applications/terminal".exec = "${config.ar.home.defaultApps.terminal.exe}";
"org/cinnamon/desktop/default-applications/terminal".exec = "${config.alyraffauf.defaultApps.terminal.exe}"; "org/cinnamon/desktop/default-applications/terminal".exec = "${config.ar.home.defaultApps.terminal.exe}";
}; };
}; };
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"application/json" = config.alyraffauf.defaultApps.editor.desktop; "application/json" = config.ar.home.defaultApps.editor.desktop;
"application/pdf" = config.alyraffauf.defaultApps.pdfViewer.desktop; "application/pdf" = config.ar.home.defaultApps.pdfViewer.desktop;
"application/x-extension-htm" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/x-extension-htm" = config.ar.home.defaultApps.webBrowser.desktop;
"application/x-extension-html" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/x-extension-html" = config.ar.home.defaultApps.webBrowser.desktop;
"application/x-extension-shtml" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/x-extension-shtml" = config.ar.home.defaultApps.webBrowser.desktop;
"application/x-extension-xht" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/x-extension-xht" = config.ar.home.defaultApps.webBrowser.desktop;
"application/x-extension-xhtml" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/x-extension-xhtml" = config.ar.home.defaultApps.webBrowser.desktop;
"application/x-shellscript" = config.alyraffauf.defaultApps.editor.desktop; "application/x-shellscript" = config.ar.home.defaultApps.editor.desktop;
"application/xhtml+xml" = config.alyraffauf.defaultApps.webBrowser.desktop; "application/xhtml+xml" = config.ar.home.defaultApps.webBrowser.desktop;
"audio/*" = config.alyraffauf.defaultApps.audioPlayer.desktop; "audio/*" = config.ar.home.defaultApps.audioPlayer.desktop;
"image/*" = config.alyraffauf.defaultApps.imageViewer.desktop; "image/*" = config.ar.home.defaultApps.imageViewer.desktop;
"inode/directory" = config.alyraffauf.defaultApps.fileManager.desktop; "inode/directory" = config.ar.home.defaultApps.fileManager.desktop;
"text/html" = config.alyraffauf.defaultApps.webBrowser.desktop; "text/html" = config.ar.home.defaultApps.webBrowser.desktop;
"text/markdown" = config.alyraffauf.defaultApps.editor.desktop; "text/markdown" = config.ar.home.defaultApps.editor.desktop;
"text/plain" = config.alyraffauf.defaultApps.editor.desktop; "text/plain" = config.ar.home.defaultApps.editor.desktop;
"text/x-python" = config.alyraffauf.defaultApps.editor.desktop; "text/x-python" = config.ar.home.defaultApps.editor.desktop;
"text/xml" = config.alyraffauf.defaultApps.webBrowser.desktop; "text/xml" = config.ar.home.defaultApps.webBrowser.desktop;
"video/*" = config.alyraffauf.defaultApps.videoPlayer.desktop; "video/*" = config.ar.home.defaultApps.videoPlayer.desktop;
"x-scheme-handler/chrome" = config.alyraffauf.defaultApps.webBrowser.desktop; "x-scheme-handler/chrome" = config.ar.home.defaultApps.webBrowser.desktop;
"x-scheme-handler/ftp" = config.alyraffauf.defaultApps.webBrowser.desktop; "x-scheme-handler/ftp" = config.ar.home.defaultApps.webBrowser.desktop;
"x-scheme-handler/http" = config.alyraffauf.defaultApps.webBrowser.desktop; "x-scheme-handler/http" = config.ar.home.defaultApps.webBrowser.desktop;
"x-scheme-handler/https" = config.alyraffauf.defaultApps.webBrowser.desktop; "x-scheme-handler/https" = config.ar.home.defaultApps.webBrowser.desktop;
}; };
}; };
home.sessionVariables = { home.sessionVariables = {
BROWSER = "${config.alyraffauf.defaultApps.webBrowser.exe}"; BROWSER = "${config.ar.home.defaultApps.webBrowser.exe}";
EDITOR = "${config.alyraffauf.defaultApps.terminalEditor.exe}"; EDITOR = "${config.ar.home.defaultApps.terminalEditor.exe}";
TERMINAL = "${config.alyraffauf.defaultApps.terminal.exe}"; TERMINAL = "${config.ar.home.defaultApps.terminal.exe}";
}; };
}; };
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.cinnamon.enable { config = lib.mkIf config.ar.home.desktop.cinnamon.enable {
dconf = { dconf = {
enable = true; enable = true;
settings = { settings = {
@ -56,7 +56,7 @@
"org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = { "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = {
binding = ["<Super>e"]; binding = ["<Super>e"];
name = "Open Editor"; name = "Open Editor";
command = "${config.alyraffauf.defaultApps.editor.exe}"; command = "${config.ar.home.defaultApps.editor.exe}";
}; };
}; };
}; };

View file

@ -14,7 +14,7 @@
./waylandComp.nix ./waylandComp.nix
]; ];
config = lib.mkIf config.alyraffauf.desktop.enable { config = lib.mkIf config.ar.home.desktop.enable {
dconf = { dconf = {
enable = true; enable = true;
settings = { settings = {
@ -37,8 +37,8 @@
"file://${config.home.homeDirectory}/src" "file://${config.home.homeDirectory}/src"
] ]
++ lib.optional ( ++ lib.optional (
osConfig.alyraffauf.services.syncthing.enable osConfig.ar.services.syncthing.enable
&& (osConfig.alyraffauf.services.syncthing.user == config.home.username) && (osConfig.ar.services.syncthing.user == config.home.username)
) "file://${config.home.homeDirectory}/sync"; ) "file://${config.home.homeDirectory}/sync";
xdg = { xdg = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.gnome.enable { config = lib.mkIf config.ar.home.desktop.gnome.enable {
dconf.enable = true; dconf.enable = true;
dconf.settings = { dconf.settings = {
"org/gnome/desktop/datetime".automatic-timezone = true; "org/gnome/desktop/datetime".automatic-timezone = true;

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { config = lib.mkIf config.ar.home.desktop.hyprland.enable {
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.extraConfig = let wayland.windowManager.hyprland.extraConfig = let
@ -16,19 +16,19 @@
# Default apps # Default apps
defaultApps = { defaultApps = {
browser = config.alyraffauf.defaultApps.webBrowser.exe; browser = config.ar.home.defaultApps.webBrowser.exe;
editor = config.alyraffauf.defaultApps.editor.exe; editor = config.ar.home.defaultApps.editor.exe;
fileManager = config.alyraffauf.defaultApps.fileManager.exe; fileManager = config.ar.home.defaultApps.fileManager.exe;
launcher = lib.getExe pkgs.fuzzel; launcher = lib.getExe pkgs.fuzzel;
lock = lib.getExe pkgs.swaylock; lock = lib.getExe pkgs.swaylock;
logout = lib.getExe pkgs.wlogout; logout = lib.getExe pkgs.wlogout;
passwordManager = lib.getExe' pkgs.keepassxc "keepassxc"; passwordManager = lib.getExe' pkgs.keepassxc "keepassxc";
terminal = config.alyraffauf.defaultApps.terminal.exe; terminal = config.ar.home.defaultApps.terminal.exe;
virtKeyboard = lib.getExe' pkgs.squeekboard "squeekboard"; virtKeyboard = lib.getExe' pkgs.squeekboard "squeekboard";
}; };
wallpaperd = wallpaperd =
if config.alyraffauf.desktop.hyprland.randomWallpaper if config.ar.home.desktop.hyprland.randomWallpaper
then then
pkgs.writers.writeRuby "hyprland-randomWallpaper" {} '' pkgs.writers.writeRuby "hyprland-randomWallpaper" {} ''
require 'fileutils' require 'fileutils'
@ -66,7 +66,7 @@
end end
end end
'' ''
else "${lib.getExe pkgs.swaybg} -i ${config.alyraffauf.theme.wallpaper}"; else "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}";
startupApps = startupApps =
[ [
@ -80,7 +80,7 @@
(lib.getExe pkgs.mako) (lib.getExe pkgs.mako)
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1" "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
] ]
++ lib.lists.optionals (config.alyraffauf.desktop.hyprland.redShift) [ ++ lib.lists.optionals (config.ar.home.desktop.hyprland.redShift) [
# "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent" # "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent"
"${lib.getExe pkgs.gammastep} -l 33.74:-84.38" "${lib.getExe pkgs.gammastep} -l 33.74:-84.38"
]; ];
@ -185,7 +185,7 @@
timeout 330 '${hyprctl} dispatch dpms off' \ timeout 330 '${hyprctl} dispatch dpms off' \
resume '${hyprctl} dispatch dpms on' \ resume '${hyprctl} dispatch dpms on' \
${ ${
if config.alyraffauf.desktop.hyprland.autoSuspend if config.ar.home.desktop.hyprland.autoSuspend
then ''timeout 900 'sleep 2 && ${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' then ''timeout 900 'sleep 2 && ${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\'' else ''\''
} }
@ -216,7 +216,7 @@
env = GDK_SCALE,${gdk_scale} env = GDK_SCALE,${gdk_scale}
# Some default env vars. # Some default env vars.
env = XCURSOR_SIZE,${toString config.alyraffauf.theme.cursorTheme.size} env = XCURSOR_SIZE,${toString config.ar.home.theme.cursorTheme.size}
env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_QPA_PLATFORMTHEME,qt6ct
# Execute necessary apps # Execute necessary apps
@ -257,8 +257,8 @@
gaps_in = 5 gaps_in = 5
gaps_out = 6 gaps_out = 6
border_size = 2 border_size = 2
col.active_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.primary}EE) 45deg col.active_border = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.primary}EE) 45deg
col.inactive_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.inactive}AA) col.inactive_border = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.inactive}AA)
layout = dwindle layout = dwindle
@ -275,7 +275,7 @@
drop_shadow = yes drop_shadow = yes
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(${lib.strings.removePrefix "#" config.alyraffauf.theme.colors.shadow}EE) col.shadow = rgba(${lib.strings.removePrefix "#" config.ar.home.theme.colors.shadow}EE)
dim_special = 0.5 dim_special = 0.5

View file

@ -10,7 +10,7 @@
lib.strings.concatMapStringsSep lib.strings.concatMapStringsSep
"\n" "\n"
(app: "exec-once = sleep 1 && ${app}") (app: "exec-once = sleep 1 && ${app}")
config.alyraffauf.desktop.startupApps config.ar.home.desktop.startupApps
} }
''; '';

View file

@ -6,14 +6,14 @@
}: { }: {
imports = [./randomWallpaper.nix ./redShift.nix]; imports = [./randomWallpaper.nix ./redShift.nix];
config = lib.mkIf config.alyraffauf.desktop.sway.enable { config = lib.mkIf config.ar.home.desktop.sway.enable {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
checkConfig = false; checkConfig = false;
}; };
alyraffauf.theme.gtk.hideTitleBar = ar.home.theme.gtk.hideTitleBar =
if config.wayland.windowManager.sway.package == pkgs.sway if config.wayland.windowManager.sway.package == pkgs.sway
then true then true
else false; else false;
@ -23,10 +23,10 @@
swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg"; swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg";
# Default apps # Default apps
browser = config.alyraffauf.defaultApps.webBrowser.exe; browser = config.ar.home.defaultApps.webBrowser.exe;
fileManager = config.alyraffauf.defaultApps.fileManager.exe; fileManager = config.ar.home.defaultApps.fileManager.exe;
editor = config.alyraffauf.defaultApps.editor.exe; editor = config.ar.home.defaultApps.editor.exe;
terminal = config.alyraffauf.defaultApps.terminal.exe; terminal = config.ar.home.defaultApps.terminal.exe;
brightness = lib.getExe' pkgs.swayosd "swayosd-client"; brightness = lib.getExe' pkgs.swayosd "swayosd-client";
brightness_up = "${brightness} --brightness=raise"; brightness_up = "${brightness} --brightness=raise";
@ -45,7 +45,7 @@
bar = lib.getExe pkgs.waybar; bar = lib.getExe pkgs.waybar;
launcher = lib.getExe pkgs.fuzzel; launcher = lib.getExe pkgs.fuzzel;
notifyd = lib.getExe pkgs.mako; notifyd = lib.getExe pkgs.mako;
wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.alyraffauf.theme.wallpaper}"; wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}";
logout = lib.getExe pkgs.wlogout; logout = lib.getExe pkgs.wlogout;
lock = lib.getExe pkgs.swaylock; lock = lib.getExe pkgs.swaylock;
idled = pkgs.writeShellScript "sway-idled" '' idled = pkgs.writeShellScript "sway-idled" ''
@ -58,7 +58,7 @@
timeout 330 '${swaymsg} "output * dpms off"' \ timeout 330 '${swaymsg} "output * dpms off"' \
resume '${swaymsg} "output * dpms on"' \ resume '${swaymsg} "output * dpms on"' \
${ ${
if config.alyraffauf.desktop.sway.autoSuspend if config.ar.home.desktop.sway.autoSuspend
then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\'' else ''\''
} }
@ -86,27 +86,27 @@
in { in {
bars = [{command = "${bar}";}]; bars = [{command = "${bar}";}];
modifier = "${modifier}"; modifier = "${modifier}";
colors.background = "${config.alyraffauf.theme.colors.primary}EE"; colors.background = "${config.ar.home.theme.colors.primary}EE";
colors.focused = { colors.focused = {
background = "${config.alyraffauf.theme.colors.primary}EE"; background = "${config.ar.home.theme.colors.primary}EE";
border = "${config.alyraffauf.theme.colors.primary}EE"; border = "${config.ar.home.theme.colors.primary}EE";
childBorder = "${config.alyraffauf.theme.colors.primary}EE"; childBorder = "${config.ar.home.theme.colors.primary}EE";
indicator = "${config.alyraffauf.theme.colors.primary}EE"; indicator = "${config.ar.home.theme.colors.primary}EE";
text = "${config.alyraffauf.theme.colors.text}"; text = "${config.ar.home.theme.colors.text}";
}; };
colors.focusedInactive = { colors.focusedInactive = {
background = "${config.alyraffauf.theme.colors.inactive}AA"; background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.alyraffauf.theme.colors.inactive}AA"; border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.alyraffauf.theme.colors.inactive}AA"; childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.alyraffauf.theme.colors.inactive}AA"; indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.alyraffauf.theme.colors.text}"; text = "${config.ar.home.theme.colors.text}";
}; };
colors.unfocused = { colors.unfocused = {
background = "${config.alyraffauf.theme.colors.inactive}AA"; background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.alyraffauf.theme.colors.inactive}AA"; border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.alyraffauf.theme.colors.inactive}AA"; childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.alyraffauf.theme.colors.inactive}AA"; indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.alyraffauf.theme.colors.text}"; text = "${config.ar.home.theme.colors.text}";
}; };
defaultWorkspace = "workspace number 1"; defaultWorkspace = "workspace number 1";
focus = { focus = {
@ -115,9 +115,9 @@
# mouseWarping = "container"; # mouseWarping = "container";
}; };
fonts = { fonts = {
names = ["${config.alyraffauf.theme.font.name}"]; names = ["${config.ar.home.theme.font.name}"];
style = "Bold"; style = "Bold";
size = config.alyraffauf.theme.font.size + 0.0; size = config.ar.home.theme.font.size + 0.0;
}; };
gaps.inner = 5; gaps.inner = 5;
gaps.outer = 5; gaps.outer = 5;
@ -279,7 +279,7 @@
startup = [ startup = [
{ {
command = command =
if config.alyraffauf.desktop.sway.randomWallpaper if config.ar.home.desktop.sway.randomWallpaper
then "true" then "true"
else "${wallpaperd}"; else "${wallpaperd}";
} }
@ -423,7 +423,7 @@
corner_radius 10 corner_radius 10
shadows enable shadows enable
shadows_on_csd enable shadows_on_csd enable
shadow_color ${config.alyraffauf.theme.colors.shadow} shadow_color ${config.ar.home.theme.colors.shadow}
default_dim_inactive 0.05 default_dim_inactive 0.05

View file

@ -36,7 +36,7 @@
fi fi
''; '';
in { in {
config = lib.mkIf config.alyraffauf.desktop.sway.randomWallpaper { config = lib.mkIf config.ar.home.desktop.sway.randomWallpaper {
# Packages that should be installed to the user profile. # Packages that should be installed to the user profile.
home.packages = with pkgs; [swaybg sway-randomWallpaper]; home.packages = with pkgs; [swaybg sway-randomWallpaper];

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.sway.redShift { config = lib.mkIf config.ar.home.desktop.sway.redShift {
home.packages = with pkgs; [gammastep]; home.packages = with pkgs; [gammastep];
wayland.windowManager.sway.config.startup = [ wayland.windowManager.sway.config.startup = [
# {command = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent";} # {command = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent";}

View file

@ -4,16 +4,14 @@
config, config,
... ...
}: { }: {
config = lib.mkIf (config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable) { config = lib.mkIf (config.ar.home.desktop.hyprland.enable || config.ar.home.desktop.sway.enable) {
alyraffauf = { ar.home.apps = {
apps = {
fuzzel.enable = lib.mkDefault true; fuzzel.enable = lib.mkDefault true;
mako.enable = lib.mkDefault true; mako.enable = lib.mkDefault true;
swaylock.enable = lib.mkDefault true; swaylock.enable = lib.mkDefault true;
waybar.enable = lib.mkDefault true; waybar.enable = lib.mkDefault true;
wlogout.enable = lib.mkDefault true; wlogout.enable = lib.mkDefault true;
}; };
};
dconf = { dconf = {
enable = true; enable = true;
@ -34,9 +32,9 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
configPackages = configPackages =
lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; lib.optionals (config.ar.home.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland];
extraPortals = extraPortals =
lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; lib.optionals (config.ar.home.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland];
}; };
}; };
} }

View file

@ -5,8 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
options = { options.ar.home = {
alyraffauf = {
apps = { apps = {
alacritty.enable = lib.mkEnableOption "Alacritty terminal."; alacritty.enable = lib.mkEnableOption "Alacritty terminal.";
bash.enable = lib.mkEnableOption "Bash defaults."; bash.enable = lib.mkEnableOption "Bash defaults.";
@ -34,14 +33,14 @@
mako.enable = lib.mkEnableOption "Mako notification daemon."; mako.enable = lib.mkEnableOption "Mako notification daemon.";
nemo.enable = lib.mkOption { nemo.enable = lib.mkOption {
description = "Cinnamon Nemo file manager."; description = "Cinnamon Nemo file manager.";
default = config.alyraffauf.defaultApps.fileManager.package == pkgs.cinnamon.nemo; default = config.ar.home.defaultApps.fileManager.package == pkgs.cinnamon.nemo;
type = lib.types.bool; type = lib.types.bool;
}; };
neovim.enable = lib.mkEnableOption "Neovim text editor."; neovim.enable = lib.mkEnableOption "Neovim text editor.";
swaylock.enable = lib.mkEnableOption "Swaylock screen locker."; swaylock.enable = lib.mkEnableOption "Swaylock screen locker.";
thunar.enable = lib.mkOption { thunar.enable = lib.mkOption {
description = "Thunar file manager."; description = "Thunar file manager.";
default = config.alyraffauf.defaultApps.fileManager.package == pkgs.xfce.thunar; default = config.ar.home.defaultApps.fileManager.package == pkgs.xfce.thunar;
type = lib.types.bool; type = lib.types.bool;
}; };
tmux.enable = lib.mkEnableOption "Tmux shell session manager."; tmux.enable = lib.mkEnableOption "Tmux shell session manager.";
@ -52,30 +51,30 @@
defaultApps = { defaultApps = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Declaratively set default apps and file associations."; description = "Declaratively set default apps and file associations.";
default = config.alyraffauf.desktop.enable; default = config.ar.home.desktop.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
audioPlayer = { audioPlayer = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default audio player executable."; description = "Default audio player executable.";
default = lib.getExe config.alyraffauf.defaultApps.audioPlayer.package; default = lib.getExe config.ar.home.defaultApps.audioPlayer.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
description = "Default audio player desktop file."; description = "Default audio player desktop file.";
default = config.alyraffauf.defaultApps.videoPlayer.desktop; default = config.ar.home.defaultApps.videoPlayer.desktop;
type = lib.types.str; type = lib.types.str;
}; };
package = lib.mkOption { package = lib.mkOption {
description = "Default audio player package."; description = "Default audio player package.";
default = config.alyraffauf.defaultApps.videoPlayer.package; default = config.ar.home.defaultApps.videoPlayer.package;
type = lib.types.package; type = lib.types.package;
}; };
}; };
editor = { editor = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default editor executable."; description = "Default editor executable.";
default = lib.getExe config.alyraffauf.defaultApps.editor.package; default = lib.getExe config.ar.home.defaultApps.editor.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -92,7 +91,7 @@
fileManager = { fileManager = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default file manager executable."; description = "Default file manager executable.";
default = lib.getExe config.alyraffauf.defaultApps.fileManager.package; default = lib.getExe config.ar.home.defaultApps.fileManager.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -109,7 +108,7 @@
imageViewer = { imageViewer = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default image viewer executable."; description = "Default image viewer executable.";
default = lib.getExe config.alyraffauf.defaultApps.imageViewer.package; default = lib.getExe config.ar.home.defaultApps.imageViewer.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -126,7 +125,7 @@
pdfViewer = { pdfViewer = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default PDF viewer executable."; description = "Default PDF viewer executable.";
default = lib.getExe config.alyraffauf.defaultApps.pdfEditor.package; default = lib.getExe config.ar.home.defaultApps.pdfEditor.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -143,7 +142,7 @@
terminal = { terminal = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default terminal executable."; description = "Default terminal executable.";
default = lib.getExe config.alyraffauf.defaultApps.terminal.package; default = lib.getExe config.ar.home.defaultApps.terminal.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -160,7 +159,7 @@
terminalEditor = { terminalEditor = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default terminal editor executable."; description = "Default terminal editor executable.";
default = lib.getExe config.alyraffauf.defaultApps.terminalEditor.package; default = lib.getExe config.ar.home.defaultApps.terminalEditor.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -177,7 +176,7 @@
videoPlayer = { videoPlayer = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default video player executable."; description = "Default video player executable.";
default = lib.getExe config.alyraffauf.defaultApps.videoPlayer.package; default = lib.getExe config.ar.home.defaultApps.videoPlayer.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -194,7 +193,7 @@
webBrowser = { webBrowser = {
exe = lib.mkOption { exe = lib.mkOption {
description = "Default web browser executable."; description = "Default web browser executable.";
default = lib.getExe config.alyraffauf.defaultApps.webBrowser.package; default = lib.getExe config.ar.home.defaultApps.webBrowser.package;
type = lib.types.str; type = lib.types.str;
}; };
desktop = lib.mkOption { desktop = lib.mkOption {
@ -212,55 +211,55 @@
desktop = { desktop = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Graphical desktop."; description = "Graphical desktop.";
default = osConfig.alyraffauf.desktop.enable; default = osConfig.ar.desktop.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
cinnamon.enable = lib.mkOption { cinnamon.enable = lib.mkOption {
description = "Cinnamon with sane defaults"; description = "Cinnamon with sane defaults";
default = osConfig.alyraffauf.desktop.cinnamon.enable; default = osConfig.ar.desktop.cinnamon.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
gnome.enable = lib.mkOption { gnome.enable = lib.mkOption {
description = "GNOME with sane defaults."; description = "GNOME with sane defaults.";
default = osConfig.alyraffauf.desktop.gnome.enable; default = osConfig.ar.desktop.gnome.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
hyprland = { hyprland = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Hyprland with full desktop session components."; description = "Hyprland with full desktop session components.";
default = osConfig.alyraffauf.desktop.hyprland.enable; default = osConfig.ar.desktop.hyprland.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
autoSuspend = lib.mkOption { autoSuspend = lib.mkOption {
description = "Whether to autosuspend on idle."; description = "Whether to autosuspend on idle.";
default = config.alyraffauf.desktop.hyprland.enable; default = config.ar.home.desktop.hyprland.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
randomWallpaper = lib.mkOption { randomWallpaper = lib.mkOption {
description = "Whether to enable random wallpaper script."; description = "Whether to enable random wallpaper script.";
default = config.alyraffauf.desktop.hyprland.enable; default = config.ar.home.desktop.hyprland.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
redShift = lib.mkOption { redShift = lib.mkOption {
description = "Whether to redshift display colors at night."; description = "Whether to redshift display colors at night.";
default = config.alyraffauf.desktop.hyprland.enable; default = config.ar.home.desktop.hyprland.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
tabletMode = { tabletMode = {
enable = lib.mkEnableOption "Tablet mode for hyprland."; enable = lib.mkEnableOption "Tablet mode for hyprland.";
autoRotate = lib.mkOption { autoRotate = lib.mkOption {
description = "Whether to autorotate screen."; description = "Whether to autorotate screen.";
default = config.alyraffauf.desktop.hyprland.tabletMode.enable; default = config.ar.home.desktop.hyprland.tabletMode.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
menuButton = lib.mkOption { menuButton = lib.mkOption {
description = "Whether to add menu button for waybar."; description = "Whether to add menu button for waybar.";
default = config.alyraffauf.desktop.hyprland.tabletMode.enable; default = config.ar.home.desktop.hyprland.tabletMode.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
virtKeyboard = lib.mkOption { virtKeyboard = lib.mkOption {
description = "Whether to enable dynamic virtual keyboard."; description = "Whether to enable dynamic virtual keyboard.";
default = config.alyraffauf.desktop.hyprland.tabletMode.enable; default = config.ar.home.desktop.hyprland.tabletMode.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
}; };
@ -268,22 +267,22 @@
sway = { sway = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Sway with full desktop session components."; description = "Sway with full desktop session components.";
default = osConfig.alyraffauf.desktop.sway.enable; default = osConfig.ar.desktop.sway.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
autoSuspend = lib.mkOption { autoSuspend = lib.mkOption {
description = "Whether to autosuspend on idle."; description = "Whether to autosuspend on idle.";
default = config.alyraffauf.desktop.sway.enable; default = config.ar.home.desktop.sway.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
randomWallpaper = lib.mkOption { randomWallpaper = lib.mkOption {
description = "Whether to enable random wallpaper script."; description = "Whether to enable random wallpaper script.";
default = config.alyraffauf.desktop.sway.enable; default = config.ar.home.desktop.sway.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
redShift = lib.mkOption { redShift = lib.mkOption {
description = "Whether to redshift display colors at night."; description = "Whether to redshift display colors at night.";
default = config.alyraffauf.desktop.sway.enable; default = config.ar.home.desktop.sway.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
}; };
@ -319,7 +318,7 @@
theme = { theme = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Gtk, Qt, and application colors."; description = "Gtk, Qt, and application colors.";
default = config.alyraffauf.desktop.enable; default = config.ar.home.desktop.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
gtk = { gtk = {
@ -417,7 +416,7 @@
colors = { colors = {
preferDark = lib.mkOption { preferDark = lib.mkOption {
description = "Whether to prefer dark mode apps or not."; description = "Whether to prefer dark mode apps or not.";
default = config.alyraffauf.theme.enable; default = config.ar.home.theme.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
text = lib.mkOption { text = lib.mkOption {
@ -458,5 +457,4 @@
}; };
}; };
}; };
};
} }

View file

@ -19,7 +19,7 @@
${lib.getExe pkgs.libnotify} "Power profile set to $new_profile." ${lib.getExe pkgs.libnotify} "Power profile set to $new_profile."
''; '';
in { in {
config = lib.mkIf config.alyraffauf.scripts.pp-adjuster.enable { config = lib.mkIf config.ar.home.scripts.pp-adjuster.enable {
home.packages = [pp-adjuster]; home.packages = [pp-adjuster];
}; };
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.services.easyeffects.enable { config = lib.mkIf config.ar.home.services.easyeffects.enable {
xdg.configFile = { xdg.configFile = {
"easyeffects/output/framework13.json".source = "easyeffects/output/framework13.json".source =
./framework13.json; ./framework13.json;
@ -15,7 +15,7 @@
services.easyeffects = { services.easyeffects = {
enable = true; enable = true;
preset = config.alyraffauf.services.easyeffects.preset; preset = config.ar.home.services.easyeffects.preset;
}; };
}; };
} }

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.services.mpd.enable { config = lib.mkIf config.ar.home.services.mpd.enable {
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = config.alyraffauf.services.mpd.musicDirectory; musicDirectory = config.ar.home.services.mpd.musicDirectory;
}; };
services.mpd-mpris = { services.mpd-mpris = {
enable = true; enable = true;

View file

@ -4,16 +4,16 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.theme.enable { config = lib.mkIf config.ar.home.theme.enable {
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
x11 = { x11 = {
enable = true; enable = true;
defaultCursor = config.alyraffauf.theme.cursorTheme.name; defaultCursor = config.ar.home.theme.cursorTheme.name;
}; };
name = config.alyraffauf.theme.cursorTheme.name; name = config.ar.home.theme.cursorTheme.name;
package = config.alyraffauf.theme.cursorTheme.package; package = config.ar.home.theme.cursorTheme.package;
size = config.alyraffauf.theme.cursorTheme.size; size = config.ar.home.theme.cursorTheme.size;
}; };
qt = { qt = {
@ -23,18 +23,18 @@
}; };
xdg.configFile = { xdg.configFile = {
"Kvantum/${config.alyraffauf.theme.qt.name}".source = "${config.alyraffauf.theme.qt.package}/share/Kvantum/${config.alyraffauf.theme.qt.name}"; "Kvantum/${config.ar.home.theme.qt.name}".source = "${config.ar.home.theme.qt.package}/share/Kvantum/${config.ar.home.theme.qt.name}";
"Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { "Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
General.theme = config.alyraffauf.theme.qt.name; General.theme = config.ar.home.theme.qt.name;
}; };
}; };
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
monospace = [config.alyraffauf.theme.terminalFont.name]; monospace = [config.ar.home.theme.terminalFont.name];
serif = ["NotoSerif Nerd Font"]; serif = ["NotoSerif Nerd Font"];
sansSerif = [config.alyraffauf.theme.font.name]; sansSerif = [config.ar.home.theme.font.name];
}; };
}; };
@ -42,27 +42,27 @@
enable = true; enable = true;
theme = { theme = {
package = config.alyraffauf.theme.gtk.package; package = config.ar.home.theme.gtk.package;
name = config.alyraffauf.theme.gtk.name; name = config.ar.home.theme.gtk.name;
}; };
iconTheme = { iconTheme = {
package = config.alyraffauf.theme.iconTheme.package; package = config.ar.home.theme.iconTheme.package;
name = config.alyraffauf.theme.iconTheme.name; name = config.ar.home.theme.iconTheme.name;
}; };
font = { font = {
name = "${config.alyraffauf.theme.font.name} Regular"; name = "${config.ar.home.theme.font.name} Regular";
package = config.alyraffauf.theme.font.package; package = config.ar.home.theme.font.package;
size = config.alyraffauf.theme.font.size; size = config.ar.home.theme.font.size;
}; };
gtk3.extraConfig = lib.attrsets.optionalAttrs (config.alyraffauf.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
gtk4.extraConfig = lib.attrsets.optionalAttrs (config.alyraffauf.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;}; gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
gtk3.extraCss = gtk3.extraCss =
if config.alyraffauf.theme.gtk.hideTitleBar if config.ar.home.theme.gtk.hideTitleBar
then '' then ''
/* No (default) title bar on wayland */ /* No (default) title bar on wayland */
headerbar.default-decoration { headerbar.default-decoration {
@ -90,34 +90,34 @@
}; };
dconf.settings = { dconf.settings = {
"org/cinnamon/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; "org/cinnamon/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
"org/cinnamon/desktop/interface" = { "org/cinnamon/desktop/interface" = {
cursor-size = config.alyraffauf.theme.cursorTheme.size; cursor-size = config.ar.home.theme.cursorTheme.size;
cursor-theme = config.alyraffauf.theme.cursorTheme.name; cursor-theme = config.ar.home.theme.cursorTheme.name;
font-name = "${config.alyraffauf.theme.font.name} Regular ${toString config.alyraffauf.theme.font.size}"; font-name = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}";
gtk-theme = config.alyraffauf.theme.gtk.name; gtk-theme = config.ar.home.theme.gtk.name;
icon-theme = config.alyraffauf.theme.iconTheme.name; icon-theme = config.ar.home.theme.iconTheme.name;
}; };
"org/cinnamon/theme".name = config.alyraffauf.theme.gtk.name; "org/cinnamon/theme".name = config.ar.home.theme.gtk.name;
"org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; "org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}";
"org/gnome/desktop/background".picture-uri = "file://${config.alyraffauf.theme.wallpaper}"; "org/gnome/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
"org/gnome/desktop/background".picture-uri-dark = "file://${config.alyraffauf.theme.wallpaper}"; "org/gnome/desktop/background".picture-uri-dark = "file://${config.ar.home.theme.wallpaper}";
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
color-scheme = color-scheme =
if config.alyraffauf.theme.colors.preferDark if config.ar.home.theme.colors.preferDark
then "prefer-dark" then "prefer-dark"
else "prefer-light"; else "prefer-light";
cursor-theme = config.alyraffauf.theme.cursorTheme.name; cursor-theme = config.ar.home.theme.cursorTheme.name;
cursor-size = config.alyraffauf.theme.cursorTheme.size; cursor-size = config.ar.home.theme.cursorTheme.size;
gtk-theme = config.alyraffauf.theme.gtk.name; gtk-theme = config.ar.home.theme.gtk.name;
icon-theme = config.alyraffauf.theme.iconTheme.name; icon-theme = config.ar.home.theme.iconTheme.name;
monospace-font-name = "${config.alyraffauf.theme.terminalFont.name} Regular ${toString config.alyraffauf.theme.terminalFont.size}"; monospace-font-name = "${config.ar.home.theme.terminalFont.name} Regular ${toString config.ar.home.theme.terminalFont.size}";
}; };
"org/gnome/desktop/wm/preferences".titlebar-font = "${config.alyraffauf.theme.font.name} ${toString config.alyraffauf.theme.font.size}"; "org/gnome/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}";
}; };
}; };
} }

View file

@ -212,12 +212,12 @@
hyprland.extraConfig = '' hyprland.extraConfig = ''
# Workspace - Browser # Workspace - Browser
workspace = 1, defaultName:web, on-created-empty:${config.alyraffauf.defaultApps.webBrowser.exe} workspace = 1, defaultName:web, on-created-empty:${config.ar.home.defaultApps.webBrowser.exe}
windowrulev2 = workspace 1,class:(firefox) windowrulev2 = workspace 1,class:(firefox)
windowrulev2 = workspace 1,class:(brave-browser) windowrulev2 = workspace 1,class:(brave-browser)
# Workspace - Coding # Workspace - Coding
workspace = 2, defaultName:code, on-created-empty:${config.alyraffauf.defaultApps.editor.exe} workspace = 2, defaultName:code, on-created-empty:${config.ar.home.defaultApps.editor.exe}
windowrulev2 = workspace 2,class:(codium-url-handler) windowrulev2 = workspace 2,class:(codium-url-handler)
# Workspace - Chrome # Workspace - Chrome
@ -244,7 +244,7 @@
''; '';
}; };
alyraffauf = { ar.home = {
apps = { apps = {
alacritty.enable = true; alacritty.enable = true;
bash.enable = true; bash.enable = true;

View file

@ -30,7 +30,7 @@
}; };
}; };
alyraffauf = { ar.home = {
apps = { apps = {
alacritty.enable = true; alacritty.enable = true;
bash.enable = true; bash.enable = true;

View file

@ -28,7 +28,7 @@
}; };
}; };
alyraffauf = { ar.home = {
apps = { apps = {
alacritty.enable = true; alacritty.enable = true;
bash.enable = true; bash.enable = true;

View file

@ -22,7 +22,7 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
alyraffauf = { ar = {
apps.steam.enable = true; apps.steam.enable = true;
base = { base = {
enable = true; enable = true;

View file

@ -12,17 +12,12 @@
framework-laptop-kmod framework-laptop-kmod
]; ];
initrd = { initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
kernelModules = ["i915"];
};
kernelModules = [ kernelModules = [
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
"cros_ec_lpcs" "cros_ec_lpcs"
"cros_ec" "cros_ec"
"i915"
"kvm-intel"
]; ];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
@ -32,55 +27,29 @@
]; ];
}; };
environment = { environment.systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool;
sessionVariables = {
LIBVA_DRIVER_NAME = "iHD"; # Force intel-media-driver
VDPAU_DRIVER = "va_gl";
};
systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool;
};
hardware = { hardware = {
acpilight.enable = true; acpilight.enable = true;
cpu.intel.updateMicrocode = true;
enableAllFirmware = true; enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
extraPackages32 = with pkgs.driversi686Linux; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
sensor.iio.enable = true; sensor.iio.enable = true;
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# Save power/better manage heat & fans.
powerManagement.powertop.enable = true;
services = { services = {
fprintd.enable = true; fprintd.enable = true;
fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
thermald.enable = true;
udev.extraRules = '' udev.extraRules = ''
# Ethernet expansion card support # Ethernet expansion card support
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
''; '';
}; };
ar.hardware = {
cpu.intel = true;
gpu.intel = true;
laptop = true;
ssd = true;
};
} }

View file

@ -22,7 +22,7 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
alyraffauf = { ar = {
apps = { apps = {
steam.enable = true; steam.enable = true;
podman.enable = true; podman.enable = true;

View file

@ -10,38 +10,21 @@
framework-laptop-kmod framework-laptop-kmod
]; ];
initrd = { initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
kernelModules = ["amdgpu"];
};
kernelModules = ["amdgpu" "cros_ec" "cros_ec_lpcs" "kvm-amd"]; kernelModules = ["cros_ec" "cros_ec_lpcs"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["amdgpu.abmlevel=0" "amd_pstate=active"];
}; };
environment.systemPackages = [pkgs.framework-tool]; environment.systemPackages = [pkgs.framework-tool];
hardware = { hardware = {
cpu.amd.updateMicrocode = true;
enableAllFirmware = true; enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk];
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
};
sensor.iio.enable = true; sensor.iio.enable = true;
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services = { services = {
fprintd.enable = true; fprintd.enable = true;
fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
udev.extraRules = '' udev.extraRules = ''
@ -49,4 +32,11 @@
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
''; '';
}; };
ar.hardware = {
cpu.amd = true;
gpu.amd = true;
laptop = true;
ssd = true;
};
} }

View file

@ -8,7 +8,7 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
alyraffauf = { ar.home = {
services.easyeffects = { services.easyeffects = {
enable = true; enable = true;
preset = "framework13"; preset = "framework13";

View file

@ -22,7 +22,7 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
alyraffauf = { ar = {
apps = { apps = {
podman.enable = true; podman.enable = true;
steam.enable = true; steam.enable = true;

View file

@ -6,30 +6,17 @@
... ...
}: { }: {
boot = { boot = {
initrd = { initrd.availableKernelModules = ["nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"];
availableKernelModules = ["nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci"];
kernelModules = ["amdgpu"];
};
kernelModules = ["kvm-amd" "amdgpu"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };
hardware = { hardware.enableAllFirmware = true;
cpu.amd.updateMicrocode = true;
enableAllFirmware = true;
opengl = { ar.hardware = {
enable = true; cpu.amd = true;
driSupport = true; gpu.amd = true;
driSupport32Bit = true; laptop = false;
extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk]; ssd = true;
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
}; };
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.fstrim.enable = true;
} }

View file

@ -8,7 +8,7 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
alyraffauf = { ar.home = {
desktop = { desktop = {
hyprland.autoSuspend = false; hyprland.autoSuspend = false;
sway.autoSuspend = false; sway.autoSuspend = false;

View file

@ -33,11 +33,11 @@ in {
allowedTCPPorts = [ allowedTCPPorts = [
80 80
443 443
config.alyraffauf.containers.oci.transmission.port config.ar.containers.oci.transmission.port
config.alyraffauf.containers.oci.transmission.bitTorrentPort config.ar.containers.oci.transmission.bitTorrentPort
]; ];
allowedUDPPorts = [config.alyraffauf.containers.oci.transmission.bitTorrentPort]; allowedUDPPorts = [config.ar.containers.oci.transmission.bitTorrentPort];
}; };
# My router doesn't expose settings for NAT loopback # My router doesn't expose settings for NAT loopback
@ -104,7 +104,7 @@ in {
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.freshRSS.port}"; proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.freshRSS.port}";
proxyWebsockets = true; # needed if you need to use WebSocket proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = '' extraConfig = ''
@ -131,7 +131,7 @@ in {
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.plexMediaServer.port}"; proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.plexMediaServer.port}";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
@ -145,7 +145,7 @@ in {
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.alyraffauf.containers.oci.audiobookshelf.port}"; proxyPass = "http://127.0.0.1:${toString config.ar.containers.oci.audiobookshelf.port}";
extraConfig = '' extraConfig = ''
client_max_body_size 500M; client_max_body_size 500M;
@ -195,7 +195,7 @@ in {
}; };
}; };
alyraffauf = { ar = {
apps = { apps = {
nicotine-plus.enable = true; nicotine-plus.enable = true;
podman.enable = true; podman.enable = true;
@ -234,6 +234,7 @@ in {
hyprland.enable = true; hyprland.enable = true;
steam.enable = true; steam.enable = true;
}; };
users = { users = {
aly = { aly = {
enable = true; enable = true;

View file

@ -5,30 +5,14 @@
pkgs, pkgs,
... ...
}: { }: {
boot = { boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
initrd = {
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; hardware.enableAllFirmware = true;
kernelModules = ["amdgpu"];
ar.hardware = {
cpu.amd = true;
gpu.amd = true;
laptop = false;
ssd = true;
}; };
kernelModules = ["kvm-amd" "amdgpu"];
};
hardware = {
cpu.amd.updateMicrocode = true;
enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk];
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.fstrim.enable = true;
} }

View file

@ -14,7 +14,7 @@
}; };
xdg.userDirs.music = "/mnt/Media/Music"; xdg.userDirs.music = "/mnt/Media/Music";
alyraffauf = { ar.home = {
desktop = { desktop = {
hyprland.autoSuspend = false; hyprland.autoSuspend = false;
sway.autoSuspend = false; sway.autoSuspend = false;

View file

@ -22,7 +22,7 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
alyraffauf = { ar = {
apps.steam.enable = true; apps.steam.enable = true;
base.enable = true; base.enable = true;

View file

@ -6,53 +6,20 @@
... ...
}: { }: {
boot = { boot = {
initrd = { initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
kernelModules = ["i915"];
};
kernelModules = ["kvm-intel"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
VDPAU_DRIVER = "va_gl";
};
hardware = { hardware = {
cpu.intel.updateMicrocode = true;
enableAllFirmware = true; enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
extraPackages32 = with pkgs.driversi686Linux; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
sensor.iio.enable = true; # Enable auto-rotate and tablet mode. sensor.iio.enable = true; # Enable auto-rotate and tablet mode.
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; ar.hardware = {
cpu.intel = true;
# Save power/better manage heat & fans. gpu.intel = true;
powerManagement.powertop.enable = true; laptop = true;
ssd = true;
services = {
fstrim.enable = true;
thermald.enable = true;
}; };
} }

View file

@ -8,7 +8,7 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
alyraffauf.desktop.hyprland = { ar.home.desktop.hyprland = {
tabletMode.enable = true; tabletMode.enable = true;
}; };
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''

View file

@ -22,7 +22,7 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
alyraffauf = { ar = {
base = { base = {
enable = true; enable = true;
zramSwap.size = 100; zramSwap.size = 100;

View file

@ -11,57 +11,34 @@
options thinkpad_acpi force_load=1 fan_control=1 options thinkpad_acpi force_load=1 fan_control=1
''; '';
initrd = { initrd.availableKernelModules = [
availableKernelModules = ["ahci" "ehci_pci" "i915" "rtsx_pci_sdmmc" "sd_mod" "sr_mod" "usb_storage" "xhci_pci"]; "ahci"
kernelModules = ["i915"]; "ehci_pci"
"rtsx_pci_sdmmc"
"sd_mod"
"sr_mod"
"usb_storage"
"xhci_pci"
];
}; };
kernelModules = ["i915" "kvm-intel"]; powerManagement.cpuFreqGovernor = "ondemand"; # Otherwise, CPU doesn't automatically clock down.
};
powerManagement = {
cpuFreqGovernor = "ondemand"; # Otherwise, CPU doesn't automatically clock down.
powertop.enable = true;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = { hardware = {
cpu.intel.updateMicrocode = true;
enableAllFirmware = true; enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
extraPackages32 = with pkgs.driversi686Linux; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
trackpoint = { trackpoint = {
enable = true; enable = true;
emulateWheel = true; emulateWheel = true;
}; };
}; };
environment.sessionVariables = { services.fwupd.enable = true;
LIBVA_DRIVER_NAME = "iHD";
VDPAU_DRIVER = "va_gl";
};
services = { ar.hardware = {
fstrim.enable = true; cpu.intel = true;
fwupd.enable = true; gpu.intel = true;
laptop = true;
ssd = true;
}; };
} }

View file

@ -11,7 +11,7 @@
programs.vscode.userSettings = { programs.vscode.userSettings = {
"editor.fontSize" = lib.mkForce "16"; "editor.fontSize" = lib.mkForce "16";
}; };
alyraffauf = { ar.home = {
services.easyeffects = { services.easyeffects = {
enable = true; enable = true;
preset = "LoudnessEqualizer"; preset = "LoudnessEqualizer";

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.firefox.enable { config = lib.mkIf config.ar.apps.firefox.enable {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { policies = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.nicotine-plus.enable { config = lib.mkIf config.ar.apps.nicotine-plus.enable {
environment.systemPackages = [pkgs.nicotine-plus]; environment.systemPackages = [pkgs.nicotine-plus];
networking = { networking = {
firewall.allowedTCPPortRanges = [ firewall.allowedTCPPortRanges = [

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.podman.enable { config = lib.mkIf config.ar.apps.podman.enable {
virtualisation = { virtualisation = {
oci-containers = {backend = "podman";}; oci-containers = {backend = "podman";};
podman = { podman = {

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.steam.enable { config = lib.mkIf config.ar.apps.steam.enable {
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
programs = { programs = {
gamescope.enable = config.alyraffauf.desktop.steam.enable; gamescope.enable = config.ar.desktop.steam.enable;
steam = { steam = {
enable = true; enable = true;
@ -15,7 +15,7 @@
extraCompatPackages = with pkgs; [ extraCompatPackages = with pkgs; [
proton-ge-bin proton-ge-bin
]; ];
gamescopeSession.enable = config.alyraffauf.desktop.steam.enable; gamescopeSession.enable = config.ar.desktop.steam.enable;
localNetworkGameTransfers.openFirewall = true; localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
}; };

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.apps.virt-manager.enable { config = lib.mkIf config.ar.apps.virt-manager.enable {
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
virtualisation = {libvirtd.enable = true;}; virtualisation = {libvirtd.enable = true;};

View file

@ -15,7 +15,7 @@
./zramSwap ./zramSwap
]; ];
config = lib.mkIf config.alyraffauf.base.enable { config = lib.mkIf config.ar.base.enable {
console = { console = {
colors = [ colors = [
"303446" "303446"

View file

@ -6,7 +6,7 @@
... ...
}: { }: {
imports = [./sambaAutoMount.nix]; imports = [./sambaAutoMount.nix];
config = lib.mkIf config.alyraffauf.base.enable { config = lib.mkIf config.ar.base.enable {
age.secrets.wifi.file = ../../../secrets/wifi.age; age.secrets.wifi.file = ../../../secrets/wifi.age;
hardware = { hardware = {

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.sambaAutoMount { config = lib.mkIf config.ar.base.sambaAutoMount {
fileSystems = { fileSystems = {
"/mnt/Archive" = { "/mnt/Archive" = {
device = "//mauville/Archive"; device = "//mauville/Archive";

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.enable { config = lib.mkIf config.ar.base.enable {
environment.variables = { environment.variables = {
FLAKE = "github:alyraffauf/nixcfg"; FLAKE = "github:alyraffauf/nixcfg";
}; };

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.enable { config = lib.mkIf config.ar.base.enable {
nixpkgs = let nixpkgs = let
unstable = import inputs.nixpkgsUnstable { unstable = import inputs.nixpkgsUnstable {
system = pkgs.system; system = pkgs.system;

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.plymouth.enable { config = lib.mkIf config.ar.base.plymouth.enable {
boot = { boot = {
consoleLogLevel = 0; consoleLogLevel = 0;
initrd.verbose = false; initrd.verbose = false;

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.power-profiles-daemon.enable { config = lib.mkIf config.ar.base.power-profiles-daemon.enable {
services = { services = {
power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
upower.enable = true; upower.enable = true;

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.enable { config = lib.mkIf config.ar.base.enable {
hardware.pulseaudio = { hardware.pulseaudio = {
enable = lib.mkForce false; enable = lib.mkForce false;
package = pkgs.pulseaudioFull; package = pkgs.pulseaudioFull;

View file

@ -4,10 +4,10 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.base.zramSwap.enable { config = lib.mkIf config.ar.base.zramSwap.enable {
zramSwap = { zramSwap = {
enable = true; enable = true;
memoryPercent = config.alyraffauf.base.zramSwap.size; memoryPercent = config.ar.base.zramSwap.size;
}; };
}; };
} }

View file

@ -4,15 +4,15 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.nixos.audiobookshelf.enable { config = lib.mkIf config.ar.containers.nixos.audiobookshelf.enable {
containers.audiobookshelf = { containers.audiobookshelf = {
autoStart = true; autoStart = true;
bindMounts."/Media" = { bindMounts."/Media" = {
hostPath = config.alyraffauf.containers.nixos.audiobookshelf.mediaDirectory; hostPath = config.ar.containers.nixos.audiobookshelf.mediaDirectory;
isReadOnly = false; isReadOnly = false;
}; };
config = let config = let
port = config.alyraffauf.containers.nixos.audiobookshelf.port; port = config.ar.containers.nixos.audiobookshelf.port;
in in
{ {
config, config,

View file

@ -6,7 +6,7 @@
self, self,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.nixos.navidrome.enable { config = lib.mkIf config.ar.containers.nixos.navidrome.enable {
age.secrets.lastFMApiKey.file = ../../../../secrets/lastFM/apiKey.age; age.secrets.lastFMApiKey.file = ../../../../secrets/lastFM/apiKey.age;
age.secrets.lastFMSecret.file = ../../../../secrets/lastFM/secret.age; age.secrets.lastFMSecret.file = ../../../../secrets/lastFM/secret.age;
age.secrets.spotifyClientId.file = ../../../../secrets/spotify/clientId.age; age.secrets.spotifyClientId.file = ../../../../secrets/spotify/clientId.age;
@ -17,7 +17,7 @@
Address = "0.0.0.0"; Address = "0.0.0.0";
DefaultTheme = "Auto"; DefaultTheme = "Auto";
MusicFolder = "/Music"; MusicFolder = "/Music";
Port = config.alyraffauf.containers.nixos.navidrome.port; Port = config.ar.containers.nixos.navidrome.port;
SubsonicArtistParticipations = true; SubsonicArtistParticipations = true;
UIWelcomeMessage = "Welcome to Navidrome @ RaffaufLabs.com"; UIWelcomeMessage = "Welcome to Navidrome @ RaffaufLabs.com";
"Spotify.ID" = "@spotifyClientId@"; "Spotify.ID" = "@spotifyClientId@";
@ -30,7 +30,7 @@
in { in {
autoStart = true; autoStart = true;
bindMounts = { bindMounts = {
"/Music".hostPath = config.alyraffauf.containers.nixos.navidrome.musicDirectory; "/Music".hostPath = config.ar.containers.nixos.navidrome.musicDirectory;
"/var/lib/navidrome/rawNavidrome.json".hostPath = navidromeConfig; "/var/lib/navidrome/rawNavidrome.json".hostPath = navidromeConfig;
"${config.age.secrets.lastFMApiKey.path}".isReadOnly = true; "${config.age.secrets.lastFMApiKey.path}".isReadOnly = true;
"${config.age.secrets.lastFMSecret.path}".isReadOnly = true; "${config.age.secrets.lastFMSecret.path}".isReadOnly = true;

View file

@ -4,13 +4,13 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.oci.audiobookshelf.enable { config = lib.mkIf config.ar.containers.oci.audiobookshelf.enable {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
audiobookshelf = { audiobookshelf = {
ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.audiobookshelf.port}:80"]; ports = ["0.0.0.0:${toString config.ar.containers.oci.audiobookshelf.port}:80"];
image = "ghcr.io/advplyr/audiobookshelf:latest"; image = "ghcr.io/advplyr/audiobookshelf:latest";
environment = {TZ = "America/New_York";}; environment = {TZ = "America/New_York";};
volumes = ["abs_config:/config" "abs_metadata:/metadata" "${config.alyraffauf.containers.oci.audiobookshelf.mediaDirectory}:/Media"]; volumes = ["abs_config:/config" "abs_metadata:/metadata" "${config.ar.containers.oci.audiobookshelf.mediaDirectory}:/Media"];
}; };
}; };
}; };

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.oci.freshRSS.enable { config = lib.mkIf config.ar.containers.oci.freshRSS.enable {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
freshrss = { freshrss = {
ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.freshRSS.port}:80"]; ports = ["0.0.0.0:${toString config.ar.containers.oci.freshRSS.port}:80"];
image = "freshrss/freshrss:latest"; image = "freshrss/freshrss:latest";
environment = { environment = {
TZ = "America/New_York"; TZ = "America/New_York";

View file

@ -4,17 +4,17 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.oci.jellyfin.enable { config = lib.mkIf config.ar.containers.oci.jellyfin.enable {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
jellyfin = { jellyfin = {
ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.jellyfin.port}:8096"]; ports = ["0.0.0.0:${toString config.ar.containers.oci.jellyfin.port}:8096"];
image = "jellyfin/jellyfin"; image = "jellyfin/jellyfin";
environment = {TZ = "America/New_York";}; environment = {TZ = "America/New_York";};
volumes = [ volumes = [
"jellyfin_config:/config" "jellyfin_config:/config"
"jellyfin_cache:/cache" "jellyfin_cache:/cache"
"${config.alyraffauf.containers.oci.jellyfin.mediaDirectory}:/Media" "${config.ar.containers.oci.jellyfin.mediaDirectory}:/Media"
"${config.alyraffauf.containers.oci.jellyfin.archiveDirectory}:/Archive" "${config.ar.containers.oci.jellyfin.archiveDirectory}:/Archive"
]; ];
}; };
}; };

View file

@ -4,17 +4,17 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.oci.plexMediaServer.enable { config = lib.mkIf config.ar.containers.oci.plexMediaServer.enable {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
plexMediaServer = { plexMediaServer = {
ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.plexMediaServer.port}:32400"]; ports = ["0.0.0.0:${toString config.ar.containers.oci.plexMediaServer.port}:32400"];
image = "plexinc/pms-docker:public"; image = "plexinc/pms-docker:public";
environment = {TZ = "America/New_York";}; environment = {TZ = "America/New_York";};
volumes = [ volumes = [
"plex_config:/config" "plex_config:/config"
"plex_transcode:/transcode" "plex_transcode:/transcode"
"${config.alyraffauf.containers.oci.plexMediaServer.mediaDirectory}:/Media" "${config.ar.containers.oci.plexMediaServer.mediaDirectory}:/Media"
"${config.alyraffauf.containers.oci.plexMediaServer.archiveDirectory}:/Archive" "${config.ar.containers.oci.plexMediaServer.archiveDirectory}:/Archive"
]; ];
}; };
}; };

View file

@ -4,10 +4,10 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.containers.oci.transmission.enable { config = lib.mkIf config.ar.containers.oci.transmission.enable {
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
transmission = { transmission = {
ports = ["0.0.0.0:${toString config.alyraffauf.containers.oci.transmission.port}:9091" "0.0.0.0:${toString config.alyraffauf.containers.oci.transmission.bitTorrentPort}:51413"]; ports = ["0.0.0.0:${toString config.ar.containers.oci.transmission.port}:9091" "0.0.0.0:${toString config.ar.containers.oci.transmission.bitTorrentPort}:51413"];
image = "linuxserver/transmission:latest"; image = "linuxserver/transmission:latest";
environment = { environment = {
PGID = "1000"; PGID = "1000";
@ -16,8 +16,8 @@
}; };
volumes = [ volumes = [
"transmission_config:/config" "transmission_config:/config"
"${config.alyraffauf.containers.oci.transmission.mediaDirectory}:/Media" "${config.ar.containers.oci.transmission.mediaDirectory}:/Media"
"${config.alyraffauf.containers.oci.transmission.archiveDirectory}:/Archive" "${config.ar.containers.oci.transmission.archiveDirectory}:/Archive"
]; ];
}; };
}; };

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.cinnamon.enable { config = lib.mkIf config.ar.desktop.cinnamon.enable {
services = { services = {
xserver = { xserver = {
enable = true; enable = true;

View file

@ -15,7 +15,7 @@
./waylandComp.nix ./waylandComp.nix
]; ];
config = lib.mkIf config.alyraffauf.desktop.enable { config = lib.mkIf config.ar.desktop.enable {
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [

View file

@ -23,7 +23,7 @@ in {
./fprintdFix.nix ./fprintdFix.nix
]; ];
config = lib.mkIf config.alyraffauf.desktop.gnome.enable { config = lib.mkIf config.ar.desktop.gnome.enable {
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
[ [
gnomeExtensions.appindicator gnomeExtensions.appindicator

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.gnome.fprintdFix.enable { config = lib.mkIf config.ar.desktop.gnome.fprintdFix.enable {
# Need to change the order pam loads its modules # Need to change the order pam loads its modules
# to get proper fingerprint behavior on GDM and the lockscreen. # to get proper fingerprint behavior on GDM and the lockscreen.
security.pam.services = { security.pam.services = {

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.greetd.enable { config = lib.mkIf config.ar.desktop.greetd.enable {
security.pam.services.greetd = { security.pam.services.greetd = {
enableGnomeKeyring = true; enableGnomeKeyring = true;
gnupg.enable = true; gnupg.enable = true;
@ -15,19 +15,19 @@
greetd = { greetd = {
enable = true; enable = true;
settings = settings =
if config.alyraffauf.desktop.greetd.autologin.enable if config.ar.desktop.greetd.autologin.enable
then { then {
default_session = { default_session = {
command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.ar.desktop.greetd.session}";
}; };
initial_session = { initial_session = {
command = config.alyraffauf.desktop.greetd.session; command = config.ar.desktop.greetd.session;
user = config.alyraffauf.desktop.greetd.autologin.user; user = config.ar.desktop.greetd.autologin.user;
}; };
} }
else { else {
default_session = { default_session = {
command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}"; command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.ar.desktop.greetd.session}";
}; };
}; };
}; };

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { config = lib.mkIf config.ar.desktop.hyprland.enable {
programs = { programs = {
hyprland = { hyprland = {
enable = true; enable = true;

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.lightdm.enable { config = lib.mkIf config.ar.desktop.lightdm.enable {
security.pam.services.lightdm = { security.pam.services.lightdm = {
enableGnomeKeyring = true; enableGnomeKeyring = true;
gnupg.enable = true; gnupg.enable = true;

View file

@ -16,7 +16,7 @@
fi fi
''; '';
in { in {
config = lib.mkIf config.alyraffauf.desktop.plasma.enable { config = lib.mkIf config.ar.desktop.plasma.enable {
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
[ [
kdePackages.kate kdePackages.kate

View file

@ -5,7 +5,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.desktop.sway.enable { config = lib.mkIf config.ar.desktop.sway.enable {
programs = { programs = {
sway = { sway = {
enable = true; enable = true;

View file

@ -5,7 +5,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf (config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable) { config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) {
programs = { programs = {
gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3; gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
}; };

View file

@ -6,12 +6,11 @@
self, self,
... ...
}: { }: {
options = { options.ar = {
alyraffauf = {
apps = { apps = {
firefox.enable = lib.mkOption { firefox.enable = lib.mkOption {
description = "Firefox Web Browser."; description = "Firefox Web Browser.";
default = config.alyraffauf.desktop.enable; default = config.ar.desktop.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
nicotine-plus.enable = nicotine-plus.enable =
@ -20,7 +19,7 @@
lib.mkEnableOption "Podman for OCI container support."; lib.mkEnableOption "Podman for OCI container support.";
steam.enable = lib.mkOption { steam.enable = lib.mkOption {
description = "Valve's Steam for video games."; description = "Valve's Steam for video games.";
default = config.alyraffauf.desktop.steam.enable; default = config.ar.desktop.steam.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
virt-manager.enable = virt-manager.enable =
@ -194,7 +193,7 @@
}; };
scripts.hoenn.enable = lib.mkOption { scripts.hoenn.enable = lib.mkOption {
description = "Hoenn system configuration script"; description = "Hoenn system configuration script";
default = config.alyraffauf.base.enable; default = config.ar.base.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
services = { services = {
@ -223,12 +222,12 @@
}; };
syncMusic = lib.mkOption { syncMusic = lib.mkOption {
description = "Whether to sync music folder."; description = "Whether to sync music folder.";
default = config.alyraffauf.services.syncthing.enable; default = config.ar.services.syncthing.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
musicPath = lib.mkOption { musicPath = lib.mkOption {
description = "Whether to sync music folder."; description = "Whether to sync music folder.";
default = "/home/${config.alyraffauf.services.syncthing.user}/music"; default = "/home/${config.ar.services.syncthing.user}/music";
type = lib.types.str; type = lib.types.str;
}; };
}; };
@ -240,23 +239,23 @@
sambaAutoMount = lib.mkOption { sambaAutoMount = lib.mkOption {
description = "Automounting of mauville Samba Shares."; description = "Automounting of mauville Samba Shares.";
default = default =
config.alyraffauf.services.tailscale.enable && !(config.networking.hostName == "mauville"); config.ar.services.tailscale.enable && !(config.networking.hostName == "mauville");
type = lib.types.bool; type = lib.types.bool;
}; };
plymouth.enable = lib.mkOption { plymouth.enable = lib.mkOption {
description = "Plymouth boot screen with catppuccin theme."; description = "Plymouth boot screen with catppuccin theme.";
default = config.alyraffauf.base.enable; default = config.ar.base.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
power-profiles-daemon.enable = lib.mkOption { power-profiles-daemon.enable = lib.mkOption {
description = "Power Profiles Daemon for power management."; description = "Power Profiles Daemon for power management.";
default = config.alyraffauf.base.enable; default = config.ar.base.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
zramSwap = { zramSwap = {
enable = lib.mkOption { enable = lib.mkOption {
description = "zram swap."; description = "zram swap.";
default = config.alyraffauf.base.enable; default = config.ar.base.enable;
type = lib.types.bool; type = lib.types.bool;
}; };
size = lib.mkOption { size = lib.mkOption {
@ -290,5 +289,4 @@
}; };
}; };
}; };
};
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.scripts.hoenn.enable { config = lib.mkIf config.ar.scripts.hoenn.enable {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writeShellScriptBin "hoenn" '' (pkgs.writeShellScriptBin "hoenn" ''
FLAKE=''${2:-"github:alyraffauf/nixcfg"} FLAKE=''${2:-"github:alyraffauf/nixcfg"}

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.services.binaryCache.enable { config = lib.mkIf config.ar.services.binaryCache.enable {
services.nix-serve = { services.nix-serve = {
enable = true; enable = true;
secretKeyFile = "/var/cache-priv-key.pem"; secretKeyFile = "/var/cache-priv-key.pem";

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.services.flatpak.enable { config = lib.mkIf config.ar.services.flatpak.enable {
environment.systemPackages = with pkgs; [gnome.gnome-software]; environment.systemPackages = with pkgs; [gnome.gnome-software];
fileSystems = let fileSystems = let

View file

@ -4,16 +4,16 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.alyraffauf.services.ollama.enable { config = lib.mkIf config.ar.services.ollama.enable {
services.ollama = { services.ollama = {
enable = true; enable = true;
acceleration = acceleration =
if config.alyraffauf.services.ollama.gpu == "amd" if config.ar.services.ollama.gpu == "amd"
then "rocm" then "rocm"
else if config.alyraffauf.services.ollama.gpu == "nvidia" else if config.ar.services.ollama.gpu == "nvidia"
then "cuda" then "cuda"
else null; else null;
listenAddress = config.alyraffauf.services.ollama.listenAddress; listenAddress = config.ar.services.ollama.listenAddress;
}; };
}; };
} }

View file

@ -6,7 +6,7 @@
}: { }: {
imports = [./syncMusic.nix]; imports = [./syncMusic.nix];
config = lib.mkIf config.alyraffauf.services.syncthing.enable { config = lib.mkIf config.ar.services.syncthing.enable {
age.secrets = { age.secrets = {
syncthingCert.file = ../../../secrets/syncthing + "/${config.networking.hostName}/cert.age"; syncthingCert.file = ../../../secrets/syncthing + "/${config.networking.hostName}/cert.age";
syncthingKey.file = ../../../secrets/syncthing + "/${config.networking.hostName}/key.age"; syncthingKey.file = ../../../secrets/syncthing + "/${config.networking.hostName}/key.age";
@ -17,10 +17,10 @@
services.syncthing = { services.syncthing = {
enable = true; enable = true;
cert = config.age.secrets.syncthingCert.path; cert = config.age.secrets.syncthingCert.path;
dataDir = "/home/${config.alyraffauf.services.syncthing.user}"; dataDir = "/home/${config.ar.services.syncthing.user}";
key = config.age.secrets.syncthingKey.path; key = config.age.secrets.syncthingKey.path;
openDefaultPorts = true; openDefaultPorts = true;
user = config.alyraffauf.services.syncthing.user; user = config.ar.services.syncthing.user;
settings = { settings = {
options = { options = {
localAnnounceEnabled = true; localAnnounceEnabled = true;
@ -43,7 +43,7 @@
folders = { folders = {
"sync" = { "sync" = {
id = "default"; id = "default";
path = "/home/${config.alyraffauf.services.syncthing.user}/sync"; path = "/home/${config.ar.services.syncthing.user}/sync";
devices = ["brawly" "fallarbor" "gsgmba" "iphone12" "lavaridge" "mauville" "petalburg" "rustboro" "mossdeep" "wallace" "winona"]; devices = ["brawly" "fallarbor" "gsgmba" "iphone12" "lavaridge" "mauville" "petalburg" "rustboro" "mossdeep" "wallace" "winona"];
versioning = { versioning = {
type = "staggered"; type = "staggered";
@ -55,7 +55,7 @@
}; };
"camera" = { "camera" = {
id = "fcsgh-dlxys"; id = "fcsgh-dlxys";
path = "/home/${config.alyraffauf.services.syncthing.user}/pics/camera"; path = "/home/${config.ar.services.syncthing.user}/pics/camera";
devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"]; devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"];
versioning = { versioning = {
params.cleanoutDays = "5"; params.cleanoutDays = "5";
@ -64,7 +64,7 @@
}; };
"screenshots" = { "screenshots" = {
id = "screenshots"; id = "screenshots";
path = "/home/${config.alyraffauf.services.syncthing.user}/pics/screenshots"; path = "/home/${config.ar.services.syncthing.user}/pics/screenshots";
devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"]; devices = ["brawly" "fallarbor" "lavaridge" "mauville" "petalburg" "rustboro" "wallace" "winona"];
versioning = { versioning = {
params.cleanoutDays = "5"; params.cleanoutDays = "5";

Some files were not shown because too many files have changed in this diff Show more