Variable Re-Org and Rename

- Remove unused stylix module from flake
- Move desktop and desktopType from user to system settings
- Rename `hardwareConfiguration` to `hwConfig`
This commit is contained in:
Sravan Balaji 2024-03-28 15:19:53 -04:00
parent 9fdaf9bdbd
commit b6ed41211b
5 changed files with 12 additions and 17 deletions

View File

@ -9,13 +9,10 @@
home-manager.url = "github:nix-community/home-manager/master"; home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:danth/stylix";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, home-manager, stylix, disko, ... }:
let let
# --- SYSTEM SETTINGS --- # # --- SYSTEM SETTINGS --- #
systemSettings = { systemSettings = {
@ -25,7 +22,9 @@
timezone = "America/New_York"; # Time Zone timezone = "America/New_York"; # Time Zone
locale = "en_US.UTF-8"; # Locale locale = "en_US.UTF-8"; # Locale
diskoConfig = "luks-btrfs-subvolumes"; # Select the disko config that was used to partition drive diskoConfig = "luks-btrfs-subvolumes"; # Select the disko config that was used to partition drive
hardwareConfiguration = "system76-oryx-pro-7"; # Select the hardware config from hardware directory hwConfig = "oryp7"; # Select the hardware config from hardware directory
desktop = "dwm"; # Selected window manager or desktop environment
desktopType = "x11"; # x11 or wayland
}; };
# --- USER SETTINGS --- # # --- USER SETTINGS --- #
@ -35,8 +34,6 @@
email = "balajsra@umich.edu"; # Email (used for certain configurations) email = "balajsra@umich.edu"; # Email (used for certain configurations)
dotfilesDir = "~/.dotfiles"; # Absolute path of the local repo dotfilesDir = "~/.dotfiles"; # Absolute path of the local repo
theme = "dracula"; # Selected theme from themes directory theme = "dracula"; # Selected theme from themes directory
desktop = "dwm"; # Selected window manager or desktop environment
desktopType = "x11"; # x11 or wayland
browser = "vivaldi"; # Default browser browser = "vivaldi"; # Default browser
term = "kitty"; # Default terminal command term = "kitty"; # Default terminal command
editor = "vim"; # Default editor editor = "vim"; # Default editor
@ -80,7 +77,6 @@
inherit pkgs-stable; inherit pkgs-stable;
inherit systemSettings; inherit systemSettings;
inherit userSettings; inherit userSettings;
inherit (inputs) stylix;
}; };
}; };
}; };
@ -97,7 +93,6 @@
inherit pkgs-stable; inherit pkgs-stable;
inherit systemSettings; inherit systemSettings;
inherit userSettings; inherit userSettings;
inherit (inputs) stylix;
}; };
}; };
}; };

View File

@ -6,8 +6,8 @@
{ {
imports = [ imports = [
(../../hosts + "/${systemSettings.hardwareConfiguration}.nix") (../../hosts + "/${systemSettings.hwConfig}.nix")
(../../system/gui + "/${userSettings.desktop}.nix") (../../system/gui + "/${systemSettings.desktop}.nix")
../../system/hardware/default.nix ../../system/hardware/default.nix
../../system/security/default.nix ../../system/security/default.nix
../../system/utilities/default.nix ../../system/utilities/default.nix

View File

@ -1,14 +1,14 @@
{ config, lib, pkgs, userSettings, ... }: { config, lib, pkgs, systemSettings, ... }:
{ {
imports = [ imports = [
./default.nix ./default.nix
(if userSettings.desktopType == "x11" then ./x11.nix else "") (if systemSettings.desktopType == "x11" then ./x11.nix else "")
]; ];
services.xserver.displayManager.gdm = { services.xserver.displayManager.gdm = {
enable = true; enable = true;
wayland = (if userSettings.desktopType == "x11" then false else true); wayland = (if systemSettings.desktopType == "x11" then false else true);
}; };
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
} }

View File

@ -1,15 +1,15 @@
{ config, lib, pkgs, userSettings, ... }: { config, lib, pkgs, systemSettings, ... }:
{ {
imports = [ imports = [
./default.nix ./default.nix
(if userSettings.desktopType == "x11" then ./x11.nix else "") (if systemSettings.desktopType == "x11" then ./x11.nix else "")
]; ];
services.xserver.displayManager = { services.xserver.displayManager = {
sddm.enable = true; sddm.enable = true;
sddm.wayland.enable = (if userSettings.desktopType == "x11" then false else true); sddm.wayland.enable = (if systemSettings.desktopType == "x11" then false else true);
defaultSession = (if userSettings.desktopType == "x11" then "plasmax11" else "plasma"); defaultSession = (if systemSettings.desktopType == "x11" then "plasmax11" else "plasma");
}; };
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
} }