so much organization

This commit is contained in:
mjallen18
2025-06-29 14:50:34 -05:00
parent ca155505be
commit 532c97cf00
58 changed files with 354 additions and 992 deletions

70
modules/amd/default.nix Executable file
View File

@@ -0,0 +1,70 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.share.hardware.amd;
pkgsVersion = pkgs;#.unstable;
in
{
imports = [ ./options.nix ];
config = lib.mkIf cfg.enable {
boot = {
kernelModules = [ "nct6775" ];
kernelParams = [ (if cfg.enable then "amdgpu.ppfeaturemask=0xffffffff" else null) ];
};
# Configure programs
programs.corectrl = {
enable = cfg.corectrl.enable;
package = pkgsVersion.corectrl;
};
# Configure environment
environment = {
# Force radv
variables = {
AMD_VULKAN_ICD = "RADV";
STEAM_FORCE_DESKTOPUI_SCALING = "1.0";
GDK_SCALE = "1";
};
};
# Configure polkit
security.polkit = lib.mkIf cfg.corectrl.enablePolkit {
extraConfig = ''
polkit.addRule(function(action, subject) {
if ((action.id == "org.corectrl.helper.init" ||
action.id == "org.corectrl.helperkiller.init") &&
subject.local == true &&
subject.active == true &&
subject.isInGroup("${cfg.corectrl.polkitGroup}")) {
return polkit.Result.YES;
}
});
'';
};
# nixpkg is broken so need to manually define
systemd.services.lactd = lib.mkIf cfg.lact.enable {
description = "AMDGPU Control Daemon";
path = with pkgsVersion; [
bash
lact
];
script = ''
lact daemon
'';
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
};
# Configure environment
environment = {
systemPackages = with pkgsVersion; lib.mkIf cfg.lact.enable [ lact ];
};
};
}

27
modules/amd/options.nix Executable file
View File

@@ -0,0 +1,27 @@
{ lib, ... }:
with lib;
{
options.share.hardware.amd = {
enable = mkEnableOption "amd hardware config";
corectrl.enable = mkOption {
type = types.bool;
default = false;
};
corectrl.enablePolkit = mkOption {
type = types.bool;
default = false;
};
corectrl.polkitGroup = mkOption {
type = types.str;
default = "wheel";
};
lact.enable = mkOption {
type = types.bool;
default = false;
};
};
}

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.btop = {
@@ -73,48 +73,48 @@ in
};
themes = {
nord = ''
theme[main_bg]="${theme.nord.polarNight.nord0}"
theme[main_fg]="${theme.nord.snowStorm.nord6}"
theme[title]="${theme.nord.snowStorm.nord6}"
theme[hi_fg]="${theme.nord.frost.nord7}"
theme[selected_bg]="${theme.nord.polarNight.nord1}"
theme[selected_fg]="${theme.nord.frost.nord7}"
theme[inactive_fg]="${theme.nord.polarNight.nord2}"
theme[graph_text]="${theme.nord.snowStorm.nord6}"
theme[meter_bg]="${theme.nord.polarNight.nord1}"
theme[proc_misc]="${theme.nord.snowStorm.nord6}"
theme[cpu_box]="${theme.nord.aurora.nord15}"
theme[mem_box]="${theme.nord.aurora.nord14}"
theme[net_box]="${theme.nord.aurora.nord12}"
theme[proc_box]="${theme.nord.aurora.nord11}"
theme[div_line]="${theme.nord.polarNight.nord1}"
theme[temp_start]="${theme.nord.aurora.nord14}"
theme[temp_mid]="${theme.nord.aurora.nord13}"
theme[temp_end]="${theme.nord.aurora.nord11}"
theme[cpu_start]="${theme.nord.aurora.nord15}"
theme[cpu_mid]="${theme.nord.aurora.nord12}"
theme[cpu_end]="${theme.nord.aurora.nord11}"
theme[free_start]="${theme.nord.aurora.nord14}"
theme[free_mid]="${theme.nord.aurora.nord13}"
theme[free_end]="${theme.nord.aurora.nord12}"
theme[cached_start]="${theme.nord.aurora.nord14}"
theme[cached_mid]="${theme.nord.aurora.nord13}"
theme[cached_end]="${theme.nord.aurora.nord12}"
theme[available_start]="${theme.nord.snowStorm.nord6}"
theme[available_mid]="${theme.nord.aurora.nord11}"
theme[available_end]="${theme.nord.aurora.nord11}"
theme[used_start]="${theme.nord.aurora.nord14}"
theme[used_mid]="${theme.nord.aurora.nord13}"
theme[used_end]="${theme.nord.aurora.nord11}"
theme[download_start]="${theme.nord.frost.nord8}"
theme[download_mid]="${theme.nord.frost.nord8}"
theme[download_end]="${theme.nord.aurora.nord12}"
theme[upload_start]="${theme.nord.frost.nord7}"
theme[upload_mid]="${theme.nord.frost.nord7}"
theme[upload_end]="${theme.nord.aurora.nord12}"
theme[process_start]="${theme.nord.aurora.nord15}"
theme[process_mid]="${theme.nord.aurora.nord12}"
theme[process_end]="${theme.nord.aurora.nord11}"
theme[main_bg]="${settings.nord.polarNight.nord0}"
theme[main_fg]="${settings.nord.snowStorm.nord6}"
theme[title]="${settings.nord.snowStorm.nord6}"
theme[hi_fg]="${settings.nord.frost.nord7}"
theme[selected_bg]="${settings.nord.polarNight.nord1}"
theme[selected_fg]="${settings.nord.frost.nord7}"
theme[inactive_fg]="${settings.nord.polarNight.nord2}"
theme[graph_text]="${settings.nord.snowStorm.nord6}"
theme[meter_bg]="${settings.nord.polarNight.nord1}"
theme[proc_misc]="${settings.nord.snowStorm.nord6}"
theme[cpu_box]="${settings.nord.aurora.nord15}"
theme[mem_box]="${settings.nord.aurora.nord14}"
theme[net_box]="${settings.nord.aurora.nord12}"
theme[proc_box]="${settings.nord.aurora.nord11}"
theme[div_line]="${settings.nord.polarNight.nord1}"
theme[temp_start]="${settings.nord.aurora.nord14}"
theme[temp_mid]="${settings.nord.aurora.nord13}"
theme[temp_end]="${settings.nord.aurora.nord11}"
theme[cpu_start]="${settings.nord.aurora.nord15}"
theme[cpu_mid]="${settings.nord.aurora.nord12}"
theme[cpu_end]="${settings.nord.aurora.nord11}"
theme[free_start]="${settings.nord.aurora.nord14}"
theme[free_mid]="${settings.nord.aurora.nord13}"
theme[free_end]="${settings.nord.aurora.nord12}"
theme[cached_start]="${settings.nord.aurora.nord14}"
theme[cached_mid]="${settings.nord.aurora.nord13}"
theme[cached_end]="${settings.nord.aurora.nord12}"
theme[available_start]="${settings.nord.snowStorm.nord6}"
theme[available_mid]="${settings.nord.aurora.nord11}"
theme[available_end]="${settings.nord.aurora.nord11}"
theme[used_start]="${settings.nord.aurora.nord14}"
theme[used_mid]="${settings.nord.aurora.nord13}"
theme[used_end]="${settings.nord.aurora.nord11}"
theme[download_start]="${settings.nord.frost.nord8}"
theme[download_mid]="${settings.nord.frost.nord8}"
theme[download_end]="${settings.nord.aurora.nord12}"
theme[upload_start]="${settings.nord.frost.nord7}"
theme[upload_mid]="${settings.nord.frost.nord7}"
theme[upload_end]="${settings.nord.aurora.nord12}"
theme[process_start]="${settings.nord.aurora.nord15}"
theme[process_mid]="${settings.nord.aurora.nord12}"
theme[process_end]="${settings.nord.aurora.nord11}"
'';
};
};

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${theme.iconTheme}";
settings = import ../../settings.nix { inherit pkgs; };
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${settings.iconTheme}";
in
{
wayland.windowManager.hyprland = {
@@ -33,7 +33,7 @@ in
# https://wiki.hyprland.org/Configuring/Binds/#mouse-buttons
bind = [
"$mod, Return, exec, ${theme.defaultApps.terminal.pname}"
"$mod, Return, exec, ${settings.defaultApps.terminal.pname}"
"$mod, SPACE, exec, wofi --show drun"
"$mod, Q, killactive, "
"$mod, M, exec, wlogout --protocol layer-shell"
@@ -47,8 +47,8 @@ in
"$mod,F,exec,hyprctl dispatch fullscreen active"
"$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${theme.displayLeft.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${theme.displayRight.input}"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${settings.displayLeft.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${settings.displayRight.input}"
# alt-tab between workspaces on active monitor
"$mod, Tab, workspace, m+1"
@@ -91,7 +91,7 @@ in
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod, b, exec, ${theme.defaultApps.browser.pname}"
"$mod, b, exec, ${settings.defaultApps.browser.pname}"
];
bindm = [
@@ -115,8 +115,8 @@ in
];
monitor = [
"${theme.displayLeft.input},${theme.displayLeft.resolution}@${theme.displayLeft.refreshRate},0x0,1"
"${theme.displayRight.input},${theme.displayRight.resolution}@${theme.displayRight.refreshRate},3840x0,1"
"${settings.displayLeft.input},${settings.displayLeft.resolution}@${settings.displayLeft.refreshRate},0x0,1"
"${settings.displayRight.input},${settings.displayRight.resolution}@${settings.displayRight.refreshRate},3840x0,1"
];
misc = {
@@ -180,9 +180,9 @@ in
};
workspace = [
"name:firefox, monitor:${theme.displayRight.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${theme.displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${theme.displayLeft.input}, default:false, special, class:(.*[Ss]team.*)"
"name:firefox, monitor:${settings.displayRight.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${settings.displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${settings.displayLeft.input}, default:false, special, class:(.*[Ss]team.*)"
];
windowrule = [
@@ -194,6 +194,7 @@ in
"float, title:(.*[Ee]rror.*)"
"float, title:(.*[Ss]plash.*)"
"float, title:(.*[Cc]onfirmreset.*)"
"float, title:(.*[Ss]ign [Ii]n - .*)"
"float, title:(.*[Oo]pen [Ff]ile.*)"
"float, title:(.*branchdialog.*)"
"float, class:(.*pavucontrol.*)"

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.kitty = {
@@ -8,9 +8,9 @@ in
shellIntegration.enableZshIntegration = true;
font = {
name = theme.fontName;
package = theme.fontPackage;
size = theme.fontSize;
name = settings.fontName;
package = settings.fontPackage;
size = settings.fontSize;
};
settings = {
@@ -24,77 +24,77 @@ in
background_opacity = "0.85";
# The basic colors
foreground = theme.nord.snowStorm.nord6;
background = theme.nord.polarNight.nord0;
selection_foreground = theme.nord.polarNight.nord0;
selection_background = theme.nord.aurora.nord15;
foreground = settings.nord.snowStorm.nord6;
background = settings.nord.polarNight.nord0;
selection_foreground = settings.nord.polarNight.nord0;
selection_background = settings.nord.aurora.nord15;
# Cursor colors
cursor = theme.nord.aurora.nord15;
cursor_text_color = theme.nord.polarNight.nord0;
cursor = settings.nord.aurora.nord15;
cursor_text_color = settings.nord.polarNight.nord0;
# URL underline color when hovering with mouse
url_color = theme.nord.aurora.nord15;
url_color = settings.nord.aurora.nord15;
# Kitty window border colors
active_border_color = theme.nord.frost.nord10;
inactive_border_color = theme.nord.polarNight.nord1;
bell_border_color = theme.nord.aurora.nord13;
active_border_color = settings.nord.frost.nord10;
inactive_border_color = settings.nord.polarNight.nord1;
bell_border_color = settings.nord.aurora.nord13;
# OS Window titlebar colors
wayland_titlebar_color = theme.nord.polarNight.nord0;
macos_titlebar_color = theme.nord.polarNight.nord0;
wayland_titlebar_color = settings.nord.polarNight.nord0;
macos_titlebar_color = settings.nord.polarNight.nord0;
# Tab bar colors
active_tab_foreground = theme.nord.polarNight.nord3;
active_tab_background = theme.nord.aurora.nord15;
inactive_tab_foreground = theme.nord.snowStorm.nord6;
inactive_tab_background = theme.nord.polarNight.nord1;
tab_bar_background = theme.nord.polarNight.nord3;
active_tab_foreground = settings.nord.polarNight.nord3;
active_tab_background = settings.nord.aurora.nord15;
inactive_tab_foreground = settings.nord.snowStorm.nord6;
inactive_tab_background = settings.nord.polarNight.nord1;
tab_bar_background = settings.nord.polarNight.nord3;
# Colors for marks (marked text in the terminal)
mark1_foreground = theme.nord.polarNight.nord0;
mark1_background = theme.nord.frost.nord10;
mark2_foreground = theme.nord.polarNight.nord0;
mark2_background = theme.nord.aurora.nord15;
mark3_foreground = theme.nord.polarNight.nord0;
mark3_background = theme.nord.frost.nord8;
mark1_foreground = settings.nord.polarNight.nord0;
mark1_background = settings.nord.frost.nord10;
mark2_foreground = settings.nord.polarNight.nord0;
mark2_background = settings.nord.aurora.nord15;
mark3_foreground = settings.nord.polarNight.nord0;
mark3_background = settings.nord.frost.nord8;
# The 16 terminal colors
# black
color0 = theme.nord.polarNight.nord0;
color0 = settings.nord.polarNight.nord0;
# Autosuggestion
color8 = theme.nord.frost.nord10;
color8 = settings.nord.frost.nord10;
# red
color1 = theme.nord.aurora.nord11;
color9 = theme.nord.aurora.nord11;
color1 = settings.nord.aurora.nord11;
color9 = settings.nord.aurora.nord11;
# green
color2 = theme.nord.aurora.nord14;
color10 = theme.nord.aurora.nord14;
color2 = settings.nord.aurora.nord14;
color10 = settings.nord.aurora.nord14;
# yellow
color3 = theme.nord.aurora.nord13;
color11 = theme.nord.aurora.nord13;
color3 = settings.nord.aurora.nord13;
color11 = settings.nord.aurora.nord13;
# blue
color4 = theme.nord.frost.nord10;
color12 = theme.nord.frost.nord10;
color4 = settings.nord.frost.nord10;
color12 = settings.nord.frost.nord10;
# magenta
color5 = theme.nord.aurora.nord15;
color13 = theme.nord.aurora.nord15;
color5 = settings.nord.aurora.nord15;
color13 = settings.nord.aurora.nord15;
# cyan
color6 = theme.nord.frost.nord8;
color14 = theme.nord.frost.nord8;
color6 = settings.nord.frost.nord8;
color14 = settings.nord.frost.nord8;
# white
color7 = theme.nord.snowStorm.nord5;
color15 = theme.nord.snowStorm.nord4;
color7 = settings.nord.snowStorm.nord5;
color15 = settings.nord.snowStorm.nord4;
};
};
}

View File

@@ -1,12 +1,12 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
services.mako = {
enable = true;
settings = {
font = theme.fontName;
font = settings.fontName;
icons = true;
ignore-timeout = true;
sort = "-time";
@@ -18,10 +18,10 @@ in
max-icon-size = 64;
default-timeout = 5000;
background-color = theme.nord.polarNight.nord0;
text-color = theme.nord.snowStorm.nord6;
border-color = theme.nord.frost.nord10;
progress-color = "over ${theme.nord.frost.nord8}";
background-color = settings.nord.polarNight.nord0;
text-color = settings.nord.snowStorm.nord6;
border-color = settings.nord.frost.nord10;
progress-color = "over ${settings.nord.frost.nord8}";
};
};
}

View File

@@ -1,16 +1,16 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
".config/nwg-dock-hyprland/drawer.css".text = ''
window {
background: ${theme.nord.polarNight.nord0};
background: ${settings.nord.polarNight.nord0};
border-radius: 10px;
border-style: none;
border-width: 1px;
border-color: ${theme.nord.aurora.nord15}b0
border-color: ${settings.nord.aurora.nord15}b0
}
#box {
@@ -21,14 +21,14 @@ in
active {
/* This is to underline the button representing the currently active window */
border-bottom: solid 1px;
border-color: ${theme.nord.aurora.nord14}1a
border-color: ${settings.nord.aurora.nord14}1a
}
button, image {
background: none;
border-style: none;
box-shadow: none;
color: ${theme.nord.frost.nord10}
color: ${settings.nord.frost.nord10}
}
button {
@@ -40,7 +40,7 @@ in
}
button:hover {
background-color: ${theme.nord.polarNight.nord0}1a;
background-color: ${settings.nord.polarNight.nord0}1a;
border-radius: 2px;
}

View File

@@ -1,18 +1,18 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
".config/nwg-drawer/drawer.css".text = ''
window {
background-color: ${theme.nord.polarNight.nord0}bf;
color: ${theme.nord.snowStorm.nord5}00
background-color: ${settings.nord.polarNight.nord0}bf;
color: ${settings.nord.snowStorm.nord5}00
}
/* search entry */
entry {
background-color: ${theme.nord.polarNight.nord1}0f
background-color: ${settings.nord.polarNight.nord1}0f
}
button, image {
@@ -21,7 +21,7 @@ in
}
button:hover {
background-color: ${theme.nord.frost.nord10}1a
background-color: ${settings.nord.frost.nord10}1a
}
/* in case you wanted to give category buttons a different look */
@@ -31,12 +31,12 @@ in
#pinned-box {
padding-bottom: 5px;
border-bottom: 1px dotted ${theme.nord.polarNight.nord3}
border-bottom: 1px dotted ${settings.nord.polarNight.nord3}
}
#files-box {
padding: 5px;
border: 1px dotted ${theme.nord.polarNight.nord3};
border: 1px dotted ${settings.nord.polarNight.nord3};
border-radius: 15px
}
'';

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
home.file = {
@@ -9,12 +9,12 @@ in
'';
".config/nwg-panel/preferred-apps.json".text = ''
{
"\\.pdf$": "${theme.defaultApps.browser.pname}",
"\\.pdf$": "${settings.defaultApps.browser.pname}",
"\\.svg$": "inkscape",
"\\.(jpg|png|tiff|gif)$": "${theme.defaultApps.imageViewer.pname}",
"\\.(jpg|png|tiff|gif)$": "${settings.defaultApps.imageViewer.pname}",
"\\.(mp3|ogg|flac|wav|wma)$": "audacious",
"\\.(avi|mp4|mkv|mov|wav)$": "${theme.defaultApps.video.pname}",
"\\.(doc|docx|xls|xlsx)$": "${theme.defaultApps.office.pname}"
"\\.(avi|mp4|mkv|mov|wav)$": "${settings.defaultApps.video.pname}",
"\\.(doc|docx|xls|xlsx)$": "${settings.defaultApps.office.pname}"
}
'';
};

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
defaultOpacity = "opacity: 0.85;";
defaultBorderRadius = "border-radius: 1rem;";
@@ -209,10 +209,10 @@ in
calendar = {
mode = "month";
format = {
months = "<span color='${theme.nord.frost.nord9}'><b>{}</b></span>";
days = "<span color='${theme.nord.frost.nord10}'><b>{}</b></span>";
weekdays = "<span color='${theme.nord.frost.nord8}'><b>{}</b></span>";
today = "<span color='${theme.nord.aurora.nord14}'><b><u>{}</u></b></span>";
months = "<span color='${settings.nord.frost.nord9}'><b>{}</b></span>";
days = "<span color='${settings.nord.frost.nord10}'><b>{}</b></span>";
weekdays = "<span color='${settings.nord.frost.nord8}'><b>{}</b></span>";
today = "<span color='${settings.nord.aurora.nord14}'><b><u>{}</u></b></span>";
};
};
};
@@ -238,12 +238,12 @@ in
#waybar {
background: transparent;
color: ${theme.nord.snowStorm.nord6};
color: ${settings.nord.snowStorm.nord6};
margin: 5px 5px;
}
#workspaces {
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
${defaultBorderRadius}
${defaultOpacity}
${defaultCenterOptions}
@@ -251,44 +251,44 @@ in
}
#workspaces button {
color: ${theme.nord.frost.nord10};
color: ${settings.nord.frost.nord10};
${defaultBorderRadius}
padding: 0.4rem;
}
#workspaces button.active {
color: ${theme.nord.frost.nord8};
color: ${settings.nord.frost.nord8};
${defaultBorderRadius}
}
#workspaces button:hover {
color: ${theme.nord.frost.nord7};
color: ${settings.nord.frost.nord7};
${defaultBorderRadius}
}
#workspaces button.focused {
color: ${theme.nord.snowStorm.nord6};
background: ${theme.nord.aurora.nord13};
color: ${settings.nord.snowStorm.nord6};
background: ${settings.nord.aurora.nord13};
${defaultBorderRadius}
}
#workspaces button.urgent {
color: ${theme.nord.polarNight.nord0};
background: ${theme.nord.snowStorm.nord6};
color: ${settings.nord.polarNight.nord0};
background: ${settings.nord.snowStorm.nord6};
${defaultBorderRadius}
}
#tooltip {
background: ${theme.nord.polarNight.nord0};
border-color: ${theme.nord.polarNight.nord0};
background: ${settings.nord.polarNight.nord0};
border-color: ${settings.nord.polarNight.nord0};
${defaultBorderRadius}
border-width: 1rem;
border-style: solid;
}
#window {
color: ${theme.nord.aurora.nord15};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.aurora.nord15};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultBorderRadius}
${defaultCenterOptions}
@@ -297,15 +297,15 @@ in
}
#custom-weather {
color: ${theme.nord.frost.nord10};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord10};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderRight}
}
#clock {
color: ${theme.nord.frost.nord9};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderLeft}
}
@@ -313,63 +313,63 @@ in
/* ------------- */
#bluetooth {
color: ${theme.nord.frost.nord9};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderRight}
}
#wireplumber.source {
color: ${theme.nord.frost.nord8};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#wireplumber.sink {
color: ${theme.nord.frost.nord7};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord7};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#keyboard-state.numlock {
color: ${theme.nord.frost.nord8};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#keyboard-state.capslock {
color: ${theme.nord.frost.nord9};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#temperature.gpu {
color: ${theme.nord.frost.nord10};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord10};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#temperature {
color: ${theme.nord.frost.nord9};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord9};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
border-radius: 0;
}
#custom-lights {
color: ${theme.nord.frost.nord8};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${borderLeft}
}
@@ -377,7 +377,7 @@ in
/* ------------- */
#tray {
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
${defaultOpacity}
${defaultCenterOptions}
${defaultBorderRadius}

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.wlogout = {
@@ -49,13 +49,13 @@ in
}
window {
background-color: ${theme.nord.polarNight.nord0}f0
background-color: ${settings.nord.polarNight.nord0}f0
}
button {
margin: 8px;
color: ${theme.nord.frost.nord7};
background-color: ${theme.nord.polarNight.nord1};
color: ${settings.nord.frost.nord7};
background-color: ${settings.nord.polarNight.nord1};
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
@@ -66,8 +66,8 @@ in
button:active,
button:focus,
button:hover {
color: ${theme.nord.frost.nord8};
background-color: ${theme.nord.polarNight.nord2};
color: ${settings.nord.frost.nord8};
background-color: ${settings.nord.polarNight.nord2};
outline-style: none;
}

View File

@@ -1,13 +1,13 @@
{ pkgs, ... }:
let
theme = import ../../theme.nix { inherit pkgs; };
settings = import ../../settings.nix { inherit pkgs; };
in
{
programs.wofi = {
enable = true;
style = ''
* {
font-family: "${theme.fontName}", monospace;
font-family: "${settings.fontName}", monospace;
font-size: 14px;
}
@@ -15,9 +15,9 @@ in
window {
margin: 0px;
padding: 10px;
border: 0.16em solid ${theme.nord.aurora.nord15};
border: 0.16em solid ${settings.nord.aurora.nord15};
border-radius: 0.1em;
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
}
/* Inner Box */
@@ -25,7 +25,7 @@ in
margin: 5px;
padding: 10px;
border: none;
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
}
/* Outer Box */
@@ -33,7 +33,7 @@ in
margin: 5px;
padding: 10px;
border: none;
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
}
/* Scroll */
@@ -41,7 +41,7 @@ in
margin: 0px;
padding: 10px;
border: none;
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
}
/* Input */
@@ -50,46 +50,46 @@ in
padding: 10px;
border: none;
border-radius: 0.1em;
color: ${theme.nord.snowStorm.nord6};
background-color: ${theme.nord.polarNight.nord0};
color: ${settings.nord.snowStorm.nord6};
background-color: ${settings.nord.polarNight.nord0};
}
#input image {
border: none;
color: ${theme.nord.aurora.nord11};
color: ${settings.nord.aurora.nord11};
}
#input * {
outline: 4px solid ${theme.nord.aurora.nord11}!important;
outline: 4px solid ${settings.nord.aurora.nord11}!important;
}
/* Text */
#text {
margin: 5px;
border: none;
color: ${theme.nord.snowStorm.nord6};
color: ${settings.nord.snowStorm.nord6};
}
#entry {
background-color: ${theme.nord.polarNight.nord0};
background-color: ${settings.nord.polarNight.nord0};
}
#entry arrow {
border: none;
color: ${theme.nord.aurora.nord15};
color: ${settings.nord.aurora.nord15};
}
/* Selected Entry */
#entry:selected {
border: 0.11em solid ${theme.nord.aurora.nord15};
border: 0.11em solid ${settings.nord.aurora.nord15};
}
#entry:selected #text {
color: ${theme.nord.frost.nord7};
color: ${settings.nord.frost.nord7};
}
#entry:drop(active) {
background-color: ${theme.nord.aurora.nord15}!important;
background-color: ${settings.nord.aurora.nord15}!important;
}
'';
};

View File

@@ -1,6 +1,6 @@
{ pkgs, lib, ... }:
let
theme = import ./theme.nix { inherit pkgs; };
settings = import ./settings.nix { inherit pkgs; };
bing-wallpaper = pkgs.writeScriptBin "bing-wallpaper" ''
# Directory to store wallpapers
@@ -19,19 +19,19 @@ in
./environment.nix
];
home-manager.users.matt = import ./home.nix;
home-manager.users."${settings.user}" = import ./home.nix;
services = {
displayManager = {
sddm = {
enable = true;
package = pkgs.kdePackages.sddm;
extraPackages = [ theme.sddm.package ];
theme = theme.sddm.themeName;
extraPackages = [ settings.sddm.package ];
theme = settings.sddm.themeName;
wayland.enable = true;
settings = {
Theme = {
ThemeDir = "${theme.sddm.package}/share/sddm/themes";
ThemeDir = "${settings.sddm.package}/share/sddm/themes";
};
};
};
@@ -89,19 +89,19 @@ in
};
};
};
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
# user.services.polkit-gnome-authentication-agent-1 = {
# description = "polkit-gnome-authentication-agent-1";
# wantedBy = [ "graphical-session.target" ];
# wants = [ "graphical-session.target" ];
# after = [ "graphical-session.target" ];
# serviceConfig = {
# Type = "simple";
# ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
# Restart = "on-failure";
# RestartSec = 1;
# TimeoutStopSec = 10;
# };
# };
extraConfig = ''
DefaultTimeoutStopSec=10s
'';

View File

@@ -20,6 +20,7 @@
hyprcursor
hyprland
hyprshot
hyprsysteminfo
kdePackages.qtmultimedia
libnotify
mako

View File

@@ -1,6 +1,6 @@
{ lib, pkgs, ... }:
let
theme = import ./theme.nix { inherit pkgs; };
settings = import ./settings.nix { inherit pkgs; };
wallpaper = "/run/wallpaper.jpg";
in
{
@@ -63,7 +63,7 @@ in
", edge:r:l, workspace, +1"
# swipe up from bottom edge
", edge:d:u, exec, ${theme.defaultApps.browser.pname}"
", edge:d:u, exec, ${settings.defaultApps.browser.pname}"
# swipe down from left edge
", edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -4%"
@@ -93,13 +93,14 @@ in
};
services = {
hyprpolkitagent.enable = true;
hyprpaper = {
enable = true;
settings = {
preload = [ "/run/wallpaper.jpg" wallpaper ];
wallpaper = [
"${theme.displayLeft.input}, /run/wallpaper.jpg"
"${theme.displayRight.input}, /run/wallpaper.jpg"
"${settings.displayLeft.input}, /run/wallpaper.jpg"
"${settings.displayRight.input}, /run/wallpaper.jpg"
];
splash = false;
};
@@ -121,16 +122,16 @@ in
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
{
timeout = theme.lockScreenTimer;
timeout = settings.lockScreenTimer;
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = theme.screenOffTimer;
timeout = settings.screenOffTimer;
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = theme.suspendTimer;
timeout = settings.suspendTimer;
on-timeout = "systemctl suspend"; # suspend pc
}
];
@@ -162,7 +163,7 @@ in
{
size = "200, 50";
position = "0, -80";
monitor = theme.displayLeft.input;
monitor = settings.displayLeft.input;
dots_center = true;
fade_on_empty = true;
font_color = "rgb(202, 211, 245)";
@@ -181,16 +182,16 @@ in
home = {
sessionVariables = {
BROWSER = "${theme.defaultApps.browser.pname}";
BROWSER = "${settings.defaultApps.browser.pname}";
CLUTTER_BACKEND = "wayland";
EDITOR = "${theme.defaultApps.editor.pname}";
VISUAL = "${theme.defaultApps.visual.pname}";
ICON_THEME = theme.iconTheme;
EDITOR = "${settings.defaultApps.editor.pname}";
VISUAL = "${settings.defaultApps.visual.pname}";
ICON_THEME = settings.iconTheme;
GTK_CSD = "0";
GTK_THEME = theme.gtkTheme;
GTK_THEME = settings.gtkTheme;
GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = theme.cursorTheme;
HYPRCURSOR_SIZE = theme.cursorSize;
HYPRCURSOR_THEME = settings.cursorTheme;
HYPRCURSOR_SIZE = settings.cursorSize;
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
@@ -200,9 +201,9 @@ in
QT_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
TERMINAL = "${theme.defaultApps.terminal.pname}";
XCURSOR_THEME = theme.cursorTheme;
XCURSOR_SIZE = theme.cursorSize;
TERMINAL = "${settings.defaultApps.terminal.pname}";
XCURSOR_THEME = settings.cursorTheme;
XCURSOR_SIZE = settings.cursorSize;
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_CURRENT_DESKTOP = "Hyprland";
@@ -213,21 +214,21 @@ in
pointerCursor = {
gtk.enable = true;
package = theme.cursorThemePkg;
name = theme.cursorTheme;
size = theme.cursorSize;
package = settings.cursorThemePkg;
name = settings.cursorTheme;
size = settings.cursorSize;
};
packages = theme.requiredPkgs;
packages = settings.requiredPkgs;
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = theme.cursorTheme;
"org/gnome/desktop/interface".gtk-theme = theme.gtkTheme;
"org/gnome/desktop/interface".icon-theme = theme.iconTheme;
"org/gnome/desktop/interface".cursor-theme = settings.cursorTheme;
"org/gnome/desktop/interface".gtk-theme = settings.gtkTheme;
"org/gnome/desktop/interface".icon-theme = settings.iconTheme;
};
};
@@ -235,18 +236,18 @@ in
enable = true;
cursorTheme = {
name = theme.cursorTheme;
package = theme.cursorThemePkg;
name = settings.cursorTheme;
package = settings.cursorThemePkg;
};
theme = {
name = theme.gtkTheme;
package = theme.gtkThemePkg;
name = settings.gtkTheme;
package = settings.gtkThemePkg;
};
iconTheme = {
name = theme.iconTheme;
package = theme.iconThemePkg;
name = settings.iconTheme;
package = settings.iconThemePkg;
};
gtk3.extraConfig = {
@@ -258,9 +259,9 @@ in
};
font = {
name = theme.fontName;
package = theme.fontPackage;
size = theme.fontSize;
name = settings.fontName;
package = settings.fontPackage;
size = settings.fontSize;
};
};
}

View File

@@ -15,6 +15,9 @@ let
};
in
{
# Username
user = "matt";
# Displays
displayLeft = {
input = "DP-1";

87
modules/disko/disko.nix Normal file
View File

@@ -0,0 +1,87 @@
{ ... }:
let
rootDisk = "/dev/nvme0n1";
in
{
disko.devices.disk.main.imageSize = "32G";
disko.devices = {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"mode=755"
"defaults"
"size=25%"
];
};
# root disk setup
disk.main = {
type = "disk";
device = rootDisk;
content = {
type = "gpt";
# specify partitions
partitions = {
# /boot
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "btrfs-root";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,102 @@
{ ... }:
let
rootDisk = "/dev/nvme0n1";
in
{
disko.devices.disk.main.imageSize = "15G";
disko.devices = {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"mode=755"
"defaults"
"size=2G"
];
};
# root disk setup
disk.main = {
type = "disk";
device = rootDisk;
content = {
type = "gpt";
# specify partitions
partitions = {
# /boot/firmware
FIRMWARE = {
priority = 1;
name = "FIRMWARE";
start = "1M";
end = "1G";
type = "0700";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot/firmware";
mountOptions = [ "umask=0077" ];
};
};
# /boot
ESP = {
priority = 2;
name = "ESP";
# start = "1G";
# end = "2G";
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
name = "btrfs-root";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/root";
};
"nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"etc" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/etc";
};
"log" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/var/log";
};
};
};
};
};
};
};
};
}

69
modules/gaming/default.nix Executable file
View File

@@ -0,0 +1,69 @@
{ lib, config, pkgs, ... }:
let
cfg = config.share.gaming;
pkgsVersion = pkgs; #.unstable;
in
{
imports = [ ./options.nix ];
config = lib.mkIf cfg.enable {
# Network option required using sysctl to let Ubisoft Connect work as of 7-12-2023
boot.kernel.sysctl."net.ipv4.tcp_mtu_probing" = 1;
# Configure programs
programs.steam = {
enable = true;
# Open ports in the firewall for Steam Remote Play
remotePlay.openFirewall = true;
# Open ports in the firewall for Source Dedicated Server
dedicatedServer.openFirewall = true;
extraCompatPackages = with pkgsVersion; [ proton-ge-bin];
gamescopeSession = {
enable = true;
args = [
"-f"
"-H 2160"
"-W 3840"
"-r 240"
"--hdr-enabled"
"--adaptive-sync"
];
};
}; # "gamescope -f -H 2160 -W 3840 -r 240 --adaptive-sync --hdr-enabled
programs.alvr = {
enable = true;
openFirewall = true;
};
programs.gamemode.enable = true;
# Hardware configs
hardware = {
# Xbox controllers
xpadneo.enable = false;
# Steam udev rules for remote play
steam-hardware.enable = true;
};
# Configure nixpkgs
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
extraPkgs =
pkgs: with pkgsVersion; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
};
};
};
}

7
modules/gaming/options.nix Executable file
View File

@@ -0,0 +1,7 @@
{ lib, ... }:
with lib;
{
options.share.gaming = {
enable = mkEnableOption "enable gaming stuffs";
};
}

106
modules/home/defaults.nix Normal file
View File

@@ -0,0 +1,106 @@
{ config, lib, pkgs, ... }:
{
home = {
enableNixpkgsReleaseCheck = lib.mkDefault false;
homeDirectory = lib.mkDefault "/home/${config.home.username}";
packages = with pkgs; [
age
chromium
clinfo
cpufetch
deadnix
direnv
firefox
gamescope
gamescope-wsi
goverlay
gparted
lm_sensors
mission-center
nano
nixfmt-rfc-style
pciutils
protonup
rsync
smartmontools
sops
tailscale
tree
usbutils
vesktop
vim
vulkan-tools
wget
];
stateVersion = lib.mkDefault "23.11";
};
programs = {
btop.enable = lib.mkDefault true;
fastfetch.enable = lib.mkDefault true;
home-manager.enable = lib.mkDefault true;
java.enable = lib.mkDefault true;
mangohud.enable = lib.mkDefault true;
password-store.enable = true;
nh = {
enable = true;
flake = "/etc/nixos";
};
micro = {
enable = true;
settings = {
autoindent = true;
autosu = true;
eofnewline = true;
tabsize = 4;
tabstospaces = true;
};
};
tmux = {
enable = true;
terminal = "screen-256color";
sensibleOnTop = true;
focusEvents = true;
newSession = true;
mouse = true;
plugins = with pkgs; [
tmuxPlugins.cpu
{
plugin = tmuxPlugins.resurrect;
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '60' # minutes
'';
}
tmuxPlugins.better-mouse-mode
];
extraConfig = ''
set -g status-right '#[fg=black,bg=color15] #{cpu_percentage} %H:%M '
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
};
services = {
nextcloud-client.enable = lib.mkDefault true;
pass-secret-service.enable = lib.mkDefault true;
};
}

21
modules/home/git.nix Normal file
View File

@@ -0,0 +1,21 @@
{ ... }:
let
gitAliases = {
co = "checkout";
ci = "commit";
cia = "commit --amend";
s = "status";
st = "status";
b = "branch";
p = "pull --rebase";
pu = "push";
};
in
{
programs.git = {
enable = true;
userName = "mjallen18";
userEmail = "matt.l.jallen@gmail.com";
aliases = gitAliases;
};
}

62
modules/home/gnome.nix Normal file
View File

@@ -0,0 +1,62 @@
{ lib, pkgs, ... }:
{
home.packages = with pkgs; [
apple-cursor
colloid-icon-theme
colloid-gtk-theme
gnome-tweaks
gnomeExtensions.allow-locked-remote-desktop
gnomeExtensions.appindicator
gnomeExtensions.arcmenu
gnomeExtensions.bing-wallpaper-changer
gnomeExtensions.dash-to-dock
gnomeExtensions.dash-to-panel
gnomeExtensions.gsconnect
gnomeExtensions.random-wallpaper
gnomeExtensions.tiling-assistant
gnomeExtensions.user-themes
gnomeExtensions.wikiart-wallpaper
papirus-icon-theme
pop-gtk-theme
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".cursor-theme = lib.mkDefault "macOS";
"org/gnome/desktop/interface".enable-hot-corners = false;
"org/gnome/desktop/interface".font-antialiasing = "grayscale";
"org/gnome/desktop/interface".font-hinting = "slight";
"org/gnome/desktop/interface".gtk-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/interface".icon-theme = lib.mkDefault "Colloid-Dark";
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
"org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/mutter".experimental-features = [
"scale-monitor-framebuffer"
"variable-refresh-rate"
];
"org/gnome/tweaks".show-extensions-notice = false;
"org/gnome/shell".enabled-extensions = [
"allowlockedremotedesktop@kamens.us"
"appindicatorsupport@rgcjonas.gmail.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"tiling-assistant@leleat-on-github"
"dash-to-dock@micxgx.gmail.com"
"BingWallpaper@ineffable-gmail.com"
"gsconnect@andyholmes.github.io"
];
"org/gnome/shell/extensions/bingwallpaper".override-lockscreen-blur = true;
"org/gnome/shell/extensions/bingwallpaper".random-mode-enabled = true;
"org/gnome/shell/extensions/bingwallpaper".revert-to-current-image = false;
"org/gnome/shell/extensions/dash-to-panel".primary-monitor = 1;
"org/gnome/shell/extensions/dash-to-panel".multi-monitors = false;
"org/gnome/shell/extensions/gsconnect".id = "4db35bd2-0dcd-42a3-9f77-ef3e8bb83182";
"org/gnome/shell/extensions/gsconnect".name = "matt-nixos";
"org/gnome/shell/extensions/user-theme".name = lib.mkDefault "Colloid-Dark";
"org/gtk/settings/file-chooser".clock-format = "12h";
};
};
}

View File

@@ -0,0 +1,42 @@
{ ... }:
{
programs.librewolf = {
enable = true;
settings = {
"identity.fxaccounts.enabled" = true; # Enable Firefox Accounts
"privacy.clearOnShutdown.history" = false; # Disable clearing history on shutdown
"privacy.clearOnShutdown.downloads" = false; # Disable clearing downloads on shutdown
"privacy.clearOnShutdown.cache" = false; # Disable clearing cache on shutdown
"privacy.clearOnShutdown.cookiesAndStorage" = false; # Disable clearing cookies and storage on shutdown
"privacy.clearOnShutdown.cookies" = false; # Disable clearing cookies on shutdown
"privacy.clearOnShutdown_v2.cache" = false; # Disable clearing cache on shutdown
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false; # Disable clearing cookies and storage on shutdown
"privacy.clearOnShutdown.formdata" = false; # Disable clearing form data on shutdown
"privacy.clearOnShutdown.offlineApps" = false; # Disable clearing offline apps on shutdown
"privacy.clearHistory.cache" = false; # Disable clearing cache on history clear
"privacy.clearHistory.cookiesAndStorage" = false; # Disable clearing cookies on history clear
"privacy.clearHistory.historyFormDataAndDownloads" = false; # Disable clearing history, form data, and downloads on history clear
"privacy.clearHistory.browsingHistoryAndDownloads" = false; # Disable clearing browsing history and downloads on history clear
"privacy.clearSiteData.cache" = false; # Disable clearing cache on site data clear
"privacy.clearSiteData.cookiesAndStorage" = false; # Disable clearing cookies on site data clear
"services.sync.prefs.sync.privacy.clearOnShutdown.cache" = true; # Enable syncing cache clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.cookies" = true; # Enable syncing cookies clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.downloads" = true; # Enable syncing downloads clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.formdata" = true; # Enable syncing form data clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.history" = true; # Enable syncing history clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.offlineApps" = true; # Enable syncing offline apps clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.sessions" = true; # Enable syncing sessions clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings" = true; # Enable syncing site settings clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cache" = true; # Enable syncing cache clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookiesAndStorage" = true; # Enable syncing cookies clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.downloads" = true; # Enable syncing downloads clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true; # Enable syncing form data clear on shutdown
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings" = true; # Enable syncing site settings clear on shutdown
"browser.newtabpage.activity-stream.feeds.topsites" = true; # Enable top sites on new tab page
"browser.newtabpage.activity-stream.topSitesRows" = 3; # Set number of rows for top sites on new tab page
"layout.css.light-dark.enabled" = true; # Enable light/dark theme support
"extensions.activeThemeID" = "default-theme@mozilla.org"; # Set active theme
"extensions.webextensions.uuids" = "{\"formautofill@mozilla.org\" =\"851c83b7-26d5-449c-8cc9-d8951a0ce78d\",\"pictureinpicture@mozilla.org\" =\"42fa2650-5134-4bef-bafa-b73f9ae51bad\",\"screenshots@mozilla.org\" =\"efd2b692-43c4-433a-aea5-0cb79f8312d4\",\"webcompat-reporter@mozilla.org\" =\"c43a6be2-fb56-4253-b384-ce8e09a89999\",\"webcompat@mozilla.org\" =\"e25fd1bb-7c53-413f-9528-bb922c322a56\",\"default-theme@mozilla.org\" =\"610b67c3-9145-46f7-814f-d8ee2cc8edff\",\"addons-search-detection@mozilla.com\:\"caedb3ca-5cf5-4e23-a251-d742f23e6fc8\",\"uBlock0@raymondhill.net\" =\"7e7d9fd9-12bf-42d3-9c7c-9ffd05420ec7\",\"78272b6fa58f4a1abaac99321d503a20@proton.me\" =\"7242a067-06d8-430b-94a3-00d264cdd57b\",\"addon@darkreader.org\" =\"2f02b112-6acd-4bdc-af2c-1432eb527339\",\"jid1-xUfzOsOFlzSOXg@jetpack\" =\"d0c72046-9903-4118-8160-a028840bf928\",\"chrome-gnome-shell@gnome.org\" =\"a1ab53e6-b765-4f25-8349-383cc04682a0\",\"user-agent-switcher@ninetailed.ninja\" =\"259d07cc-bb32-4ed5-b90f-6d73abdeb7bb\",\"firefoxdav@icloud.com\" =\"110e6e2c-18f8-461d-9f26-b8f04482b6f1\",\"ciscowebexstart1@cisco.com\" =\"a4062240-e73a-4353-bddb-d608d84881f7\",\"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}\" =\"9164e437-812b-4a07-8dfd-2fd73b39329b\",\"{036a55b4-5e72-4d05-a06c-cba2dfcc134a}\" =\"648fc678-a6fb-47cd-9792-fb9520678c17\",\"{446900e4-71c2-419f-a6a7-df9c091e268b}\" =\"f0b43422-070e-466e-85c9-6543f209f075\",\"jid1-MnnxcxisBPnSXQ@jetpack\" =\"4c448202-c843-4cae-b5c3-d11f2da58fa3\",\"soundfixer@unrelenting.technology\" =\"59b35eb8-1c85-4919-a905-80d120993ddc\",\"floccus@handmadeideas.org\" =\"8ad2956c-8091-41af-a689-7d2108f5958d\",\"{79b9dbcf-cc5a-4cda-89ef-c4ab097eb074}\" =\"c2a223a7-32e0-4726-9f20-17236702b1f5\",\"linkgopher@oooninja.com\" =\"a257858c-0dce-415b-b123-6222876cf843\"}";
};
};
}

11
modules/home/office.nix Normal file
View File

@@ -0,0 +1,11 @@
{ ... }:
{
programs.onlyoffice = {
enable = true;
settings = {
UITheme = "theme-contrast-dark";
forcedRtl = false;
maximized = true;
};
};
}

29
modules/home/shell.nix Normal file
View File

@@ -0,0 +1,29 @@
{ ... }:
let
defaultShellAliases = {
l = "ls -alh";
ducks = "du -cksh * | sort -hr | head -n 15";
};
in
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = defaultShellAliases;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "fishy";
};
# initContent = ''
# if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
# tmux attach-session -t default || tmux new-session -s default
# fi
# '';
};
}

138
modules/home/vscode.nix Normal file
View File

@@ -0,0 +1,138 @@
{ config, lib, pkgs, ... }:
let
open-remote-ssh = pkgs.vscode-utils.buildVscodeExtension {
pname = "open-remote-ssh";
version = "0.0.49";
vscodeExtPublisher = "jeanp413";
vscodeExtName = "open-remote-ssh";
vscodeExtUniqueId = "jeanp413.open-remote-ssh";
src = pkgs.fetchurl {
url = "https://open-vsx.org/api/jeanp413/open-remote-ssh/0.0.49/file/jeanp413.open-remote-ssh-0.0.49.vsix";
sha256 = "sha256-QfJnAAx+kO2iJ1EzWoO5HLogJKg3RiC3hg1/u2Jm6t4";
name = "open-remote-ssh.zip";
};
};
in
{
programs.vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
profiles = {
default = {
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
extensions = with pkgs; [
vscode-extensions.bbenoist.nix
vscode-extensions.brettm12345.nixfmt-vscode
vscode-extensions.cweijan.vscode-database-client2
vscode-extensions.dendron.dendron-markdown-preview-enhanced
vscode-extensions.jnoortheen.nix-ide
vscode-extensions.ms-python.debugpy
vscode-extensions.ms-python.pylint
vscode-extensions.ms-python.python
# vscode-extensions.ms-python.vscode-pylance
vscode-extensions.redhat.vscode-xml
vscode-extensions.redhat.vscode-yaml
vscode-extensions.yy0931.vscode-sqlite3-editor
open-remote-ssh
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "copilot-mcp";
publisher = "automatalabs";
version = "0.0.49";
sha256 = "sha256-+G2OQl5SCN7bh7MzGdYiRclIZefBE7lWnGg1kNpCvnA=";
}
{
name = "mcp-server-runner";
publisher = "zebradev";
version = "0.1.0";
sha256 = "sha256-StydVt3VzQUSS/pYp76jnIwtZlEj8gWAGzOARs93J+E=";
}
{
name = "claude-dev";
publisher = "saoudrizwan";
version = "3.17.9";
sha256 = "sha256-y3bFtMe5vZrO3DFb31KDvkzjD2jM76wK89mKhgJXC70=";
}
];
userSettings = {
"editor" = {
"defaultFormatter" = "brettm12345.nixfmt-vscode";
"fontFamily" = "fira-code-nerd, FiraCode Nerd Font, Consolas, 'Courier New', monospace";
"fontLigatures" = true;
"renderWhitespace" = "all";
};
"explorer" = {
"confirmDelete" = false;
"confirmDragAndDrop" = false;
};
"git" = {
"confirmSync" = false;
"enableSmartCommit" = true;
};
"github" = {
"copilot.nextEditSuggestions.enabled" = true;
"copilot.enable" = {
"nix" = true;
};
};
"[json]" = {
"editor.defaultFormatter" = "vscode.json-language-features";
};
"nix" = {
"enableLanguageServer" = true;
"formatterPath" = "nixpkgs-fmt";
"serverPath" = "nixd";
"serverSettings" = {
"nixd" = {
"formatting" = {
"command" = [ "nixpkgs-fmt" ];
};
"options" = {
# By default, this entriy will be read from `import <nixpkgs> { }`.
# You can write arbitary Nix expressions here, to produce valid "options" declaration result.
# Tip: for flake-based configuration, utilize `builtins.getFlake`
"nixos" = {
"expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").nixosConfigurations.<name>.options";
};
"home-manager" = {
"expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").homeConfigurations.<name>.options";
};
# # Tip: use ${workspaceFolder} variable to define path
# "nix-darwin" = {
# "expr" = "(builtins.getFlake \"${workspaceFolder}/path/to/flake\").darwinConfigurations.<name>.options"
# }
};
};
};
};
"[nix]" = {
"editor" = {
"defaultFormatter" = "brettm12345.nixfmt-vscode";
"tabSize" = 2;
};
};
"security.workspace.trust.untrustedFiles" = "open";
"workbench" = {
"colorCustomizations" = null;
"editorAssociations" = {
"*.db" = "default";
};
};
};
};
};
};
}

View File

@@ -0,0 +1,38 @@
{ ... }:
{
# Set up impernance configuration for things like bluetooth
# In this configuration with /etc and /var/log being persistent, only directories outside of that need to be done here. See hardware configuration for all mountpoints.
environment.persistence."/nix/persist/system" = {
hideMounts = true;
directories = [
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/libvirt"
"/var/lib/waydroid"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
{
directory = "/var/lib/colord";
user = "colord";
group = "colord";
mode = "u=rwx,g=rx,o=";
}
{
directory = "/etc/nix";
user = "root";
group = "root";
mode = "u=rwx,g=rx,o=rx";
}
];
files = [
"/etc/machine-id"
];
};
security.sudo.extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
}

58
modules/nvidia/default.nix Executable file
View File

@@ -0,0 +1,58 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.share.hardware.nvidia;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
hardware = {
# Nvidia
nvidia = {
package =
if cfg.enableBeta then
config.boot.kernelPackages.nvidiaPackages.beta
else
config.boot.kernelPackages.nvidiaPackages.latest;
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = cfg.enableOpen;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = cfg.nvidiaSettings;
};
};
# Services configs
services.xserver = {
# Load nvidia driver for Xorg and Wayland
videoDrivers = [ "nvidia" ];
};
# Virtualisation
hardware.nvidia-container-toolkit.enable = cfg.enableNvidiaDocker;
};
}

27
modules/nvidia/options.nix Executable file
View File

@@ -0,0 +1,27 @@
{ lib, ... }:
with lib;
{
options.share.hardware.nvidia = {
enable = mkEnableOption "nvidia hardware config";
enableOpen = mkOption {
type = types.bool;
default = false;
};
nvidiaSettings = mkOption {
type = types.bool;
default = false;
};
enableBeta = mkOption {
type = types.bool;
default = false;
};
enableNvidiaDocker = mkOption {
type = types.bool;
default = false;
};
};
}

20
modules/root-user/default.nix Executable file
View File

@@ -0,0 +1,20 @@
{ ... }:
let
shellAliases = {
update-boot = "nixos-rebuild boot --max-jobs 10";
update-switch = "nixos-rebuild switch --max-jobs 10";
};
in
{
imports = [
../home/defaults.nix
../home/git.nix
../home/shell.nix
];
home.username = "root";
programs = {
zsh.shellAliases = shellAliases;
};
}