Merge branch 'master' of github.com:pagedMov/nixos-config

This commit is contained in:
2024-11-11 18:27:02 -05:00
6 changed files with 94 additions and 59 deletions

View File

@@ -60,7 +60,7 @@
mercuryHome = home-manager.lib.homeManagerConfiguration { mercuryHome = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { extraSpecialArgs = {
host = "oganesson"; host = "mercury";
inherit self username inputs; inherit self username inputs;
}; };
@@ -76,7 +76,7 @@
xenonHome = home-manager.lib.homeManagerConfiguration { xenonHome = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { extraSpecialArgs = {
host = "oganesson"; host = "xenon";
inherit self username inputs; inherit self username inputs;
}; };

View File

@@ -59,5 +59,4 @@
nix.settings.allowed-users = [ "${username}" ]; nix.settings.allowed-users = [ "${username}" ];
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
} }

View File

@@ -1,22 +1,30 @@
{ pkgs, config, ... }: { { username, pkgs, config, ... }: {
imports = [ ./hardware.nix ./home.nix ]; imports = [ ./hardware.nix ];
powerProfiles.enable = true;
boot = { boot = {
kernelModules = [ "acpi_call" ]; kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; extraModulePackages = with config.boot.kernelPackages;
[ acpi_call cpupower ] ++ [ pkgs.cpupower-gui ]; [ acpi_call cpupower ] ++ [ pkgs.cpupower-gui ];
}; };
networkModule.enable = true; movOpts = {
nixSettings.enable = true; sysEnv = {
bootLoader.enable = true;
issue.enable = true; issue.enable = true;
sddmConfig.enable = true; sddmConfig.enable = true;
stylixConfig.enable = true; stylixConfig.enable = true;
nixSettings.enable = true;
};
hardwareCfg = {
networkModule.enable = true;
bootLoader.enable = true;
powerProfiles.enable = true;
};
softwareCfg = {
sysPkgs.enable = true; sysPkgs.enable = true;
sysProgs.enable = true; sysProgs.enable = true;
sysServices.enable = true; sysServices.enable = true;
};
};
environment = { environment = {
variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; }; variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; };
@@ -24,4 +32,36 @@
systemPackages = with pkgs; [ acpi brightnessctl cpupower-gui powertop ]; systemPackages = with pkgs; [ acpi brightnessctl cpupower-gui powertop ];
}; };
nix = {
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://nix-gaming.cachix.org" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
users = {
groups.persist = { };
users = {
root.initialPassword = "1234";
${username} = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = [ "wheel" "persist" "libvirtd" ];
};
};
};
security.sudo.extraConfig = ''
${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild
'';
nix.settings.allowed-users = [ "${username}" ];
time.timeZone = "America/New_York";
} }

View File

@@ -12,22 +12,26 @@
homeFiles.enable = true; homeFiles.enable = true;
# modules/home/environment # modules/home/environment
envConfig = {
hyprlandConfig = { hyprlandConfig = {
enable = true; enable = true;
workspaceLayout = "singlemonitor"; workspaceLayout = "singlemonitor";
monitorNames = [ "eDP-1" ]; monitorNames = [ "eDP-1" ];
}; };
autojumpConfig.enable = true; userPkgs.enable = true;
stylixHomeConfig.enable = true; stylixHomeConfig.enable = true;
waybarConfig.enable = true; waybarConfig.enable = true;
gtkConfig.enable = true; gtkConfig.enable = true;
spicetifyConfig.enable = true; spicetifyConfig.enable = true;
starshipConfig.enable = true; starshipConfig.enable = true;
swayncConfig.enable = true;
zshConfig.enable = true;
};
# modules/home/programs # modules/home/programs
programConfigs = {
autojumpConfig.enable = true;
btopConfig.enable = true; btopConfig.enable = true;
swayncConfig.enable = true;
userPkgs.enable = true;
cavaConfig.enable = true; cavaConfig.enable = true;
ezaConfig.enable = true; ezaConfig.enable = true;
firefoxConfig.enable = true; firefoxConfig.enable = true;
@@ -36,9 +40,9 @@
gitConfig.enable = true; gitConfig.enable = true;
kittyConfig.enable = true; kittyConfig.enable = true;
yaziConfig.enable = true; yaziConfig.enable = true;
zshConfig.enable = true;
passConfig.enable = true; passConfig.enable = true;
batConfig.enable = true; batConfig.enable = true;
};
# modules/home/scripts # modules/home/scripts
movScripts = { movScripts = {

View File

@@ -67,30 +67,26 @@ in {
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
]; ];
workspace = if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout workspace = if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [
== "dualmonitor") then [
"1,persistent=true,monitor:${builtins.elemAt mons 0}" "1,persistent=true,monitor:${builtins.elemAt mons 0}"
"2,persistent=true,monitor:${builtins.elemAt mons 0}" "2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}" "3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 1}" "4,persistent=true,monitor:${builtins.elemAt mons 1}"
"5,persistent=true,monitor:${builtins.elemAt mons 1}" "5,persistent=true,monitor:${builtins.elemAt mons 1}"
"6,persistent=true,monitor:${builtins.elemAt mons 1}" "6,persistent=true,monitor:${builtins.elemAt mons 1}"
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then [
== "singlemonitor") then [
"1,persistent=true,monitor:${builtins.elemAt mons 0} " "1,persistent=true,monitor:${builtins.elemAt mons 0} "
"2,persistent=true,monitor:${builtins.elemAt mons 0}" "2,persistent=true,monitor:${builtins.elemAt mons 0}"
"3,persistent=true,monitor:${builtins.elemAt mons 0}" "3,persistent=true,monitor:${builtins.elemAt mons 0}"
"4,persistent=true,monitor:${builtins.elemAt mons 0}" "4,persistent=true,monitor:${builtins.elemAt mons 0}"
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then [
== "trimonitor") then [
"1,persistent=true,monitor:${builtins.elemAt mons 2}" "1,persistent=true,monitor:${builtins.elemAt mons 2}"
"2,persistent=true,monitor:${builtins.elemAt mons 2}" "2,persistent=true,monitor:${builtins.elemAt mons 2}"
"3,persistent=true,monitor:${builtins.elemAt mons 1}" "3,persistent=true,monitor:${builtins.elemAt mons 1}"
"4,persistent=true,monitor:${builtins.elemAt mons 1}" "4,persistent=true,monitor:${builtins.elemAt mons 1}"
"5,persistent=true,monitor:${builtins.elemAt mons 0}" "5,persistent=true,monitor:${builtins.elemAt mons 0}"
"6,persistent=true,monitor:${builtins.elemAt mons 0}" "6,persistent=true,monitor:${builtins.elemAt mons 0}"
] else ] else [ ];
[ ];
env = [ env = [
"XDG_CONFIG_HOME,$HOME/.config" "XDG_CONFIG_HOME,$HOME/.config"

View File

@@ -1,7 +1,8 @@
{ pkgs, host, lib, config, ... }: { pkgs, host, lib, config, ... }:
let let
desktop = host == "oganesson"; desktop = (host == "oganesson");
layout = config.movOpts.envConfig.hyprlandConfig.workspaceLayout;
workspaces = { workspaces = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
@@ -13,15 +14,12 @@ let
"6" = ""; "6" = "";
}; };
persistent-workspaces = persistent-workspaces =
if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout if (layout == "singlemonitor") then {
== "singlemonitor") then {
"${builtins.elemAt monitors 0}" = [ 1 2 3 4 ]; "${builtins.elemAt monitors 0}" = [ 1 2 3 4 ];
} else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout } else if (layout == "dualmonitor") then {
== "dualmonitor") then {
"${builtins.elemAt monitors 0}" = [ 1 2 3 ]; "${builtins.elemAt monitors 0}" = [ 1 2 3 ];
"${builtins.elemAt monitors 1}" = [ 4 5 6 ]; "${builtins.elemAt monitors 1}" = [ 4 5 6 ];
} else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout } else if (layout == "trimonitor") then {
== "trimonitor") then {
"${builtins.elemAt monitors 2}" = [ 1 2 ]; "${builtins.elemAt monitors 2}" = [ 1 2 ];
"${builtins.elemAt monitors 1}" = [ 3 4 ]; "${builtins.elemAt monitors 1}" = [ 3 4 ];
"${builtins.elemAt monitors 0}" = [ 5 6 ]; "${builtins.elemAt monitors 0}" = [ 5 6 ];
@@ -71,7 +69,8 @@ in {
settings = { settings = {
mainBar = { mainBar = {
layer = "bottom"; layer = "bottom";
output = builtins.elemAt monitors 1; output = if layout == "singlemonitor" then builtins.elemAt monitors 0
else builtins.elemAt monitors 1;
position = "top"; position = "top";
name = "mainBar"; name = "mainBar";
margin-left = 8; margin-left = 8;
@@ -193,10 +192,7 @@ in {
}; };
sideBar = { sideBar = {
layer = "bottom"; layer = "bottom";
output = if desktop then output = builtins.elemAt monitors 0;
builtins.elemAt monitors 0
else
builtins.elemAt monitors 1;
position = "right"; position = "right";
margin-top = 8; margin-top = 8;
margin-right = 5; margin-right = 5;