From abce019203b916d183387b971cae3ad2ca14d2ba Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Wed, 3 Apr 2024 19:01:52 -0500 Subject: [PATCH] Adding changes for complete support of multiple host setups --- config/home/alacritty.nix | 4 +- config/home/bash.nix | 4 +- config/home/blender.nix | 4 +- config/home/hyprland.nix | 4 +- config/home/kdenlive.nix | 4 +- config/home/kitty.nix | 4 +- config/home/packages.nix | 8 +-- config/home/swappy.nix | 4 +- config/home/waybar.nix | 4 +- config/home/wezterm.nix | 4 +- config/home/zeroad.nix | 4 +- config/home/zsh.nix | 4 +- config/scripts/list-hypr-bindings.nix | 4 +- config/scripts/themechange.nix | 4 +- config/system/amd-gpu.nix | 4 +- config/system/autorun.nix | 4 +- config/system/displaymanager.nix | 4 +- config/system/distrobox.nix | 4 +- config/system/flatpak.nix | 4 +- config/system/hwclock.nix | 4 +- config/system/intel-amd.nix | 4 +- config/system/intel-gpu.nix | 4 +- config/system/intel-nvidia.nix | 4 +- config/system/kernel/default.nix | 4 +- config/system/kernel/latest.nix | 4 +- config/system/kernel/lqx.nix | 4 +- config/system/kernel/testing.nix | 4 +- config/system/kernel/xanmod.nix | 4 +- config/system/kernel/zen.nix | 4 +- config/system/logitech.nix | 4 +- config/system/nfs.nix | 4 +- config/system/ntp.nix | 4 +- config/system/nvidia.nix | 4 +- config/system/persistence.nix | 4 +- config/system/printer.nix | 4 +- config/system/python.nix | 4 +- config/system/syncthing.nix | 4 +- config/system/vm.nix | 4 +- flake.nix | 2 +- home.nix | 4 +- hosts/default/hardware.nix | 51 +++++++++++++++ hosts/default/options.nix | 91 +++++++++++++++++++++++++++ system.nix | 4 +- 43 files changed, 225 insertions(+), 83 deletions(-) create mode 100644 hosts/default/hardware.nix create mode 100644 hosts/default/options.nix diff --git a/config/home/alacritty.nix b/config/home/alacritty.nix index 8849159..9ab22c1 100644 --- a/config/home/alacritty.nix +++ b/config/home/alacritty.nix @@ -1,8 +1,8 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: let palette = config.colorScheme.palette; - inherit (import ../../options.nix) alacritty; + inherit (import ../../hosts/${host}/options.nix) alacritty; in lib.mkIf (alacritty == true) { programs.alacritty = { enable = true; diff --git a/config/home/bash.nix b/config/home/bash.nix index 6208637..78b84f9 100644 --- a/config/home/bash.nix +++ b/config/home/bash.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../options.nix) flakeDir flakePrev +let inherit (import ../../hosts/${host}/options.nix) flakeDir flakePrev hostname flakeBackup theShell; in lib.mkIf (theShell == "bash") { # Configure Bash diff --git a/config/home/blender.nix b/config/home/blender.nix index 130b5ae..85948ff 100644 --- a/config/home/blender.nix +++ b/config/home/blender.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) blender; in +let inherit (import ../../hosts/${host}/options.nix) blender; in lib.mkIf (blender == true) { home.packages = with pkgs; [ pkgs.blender-hip diff --git a/config/home/hyprland.nix b/config/home/hyprland.nix index a42b46a..69f39af 100644 --- a/config/home/hyprland.nix +++ b/config/home/hyprland.nix @@ -1,9 +1,9 @@ -{ pkgs, config, lib, inputs, ... }: +{ pkgs, config, lib, inputs, host, ... }: let theme = config.colorScheme.palette; hyprplugins = inputs.hyprland-plugins.packages.${pkgs.system}; - inherit (import ../../options.nix) + inherit (import ../../hosts/${host}/options.nix) browser cpuType gpuType wallpaperDir borderAnim theKBDLayout terminal diff --git a/config/home/kdenlive.nix b/config/home/kdenlive.nix index d2cd5af..d7aa37e 100644 --- a/config/home/kdenlive.nix +++ b/config/home/kdenlive.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) kdenlive; in +let inherit (import ../../hosts/${host}/options.nix) kdenlive; in lib.mkIf (kdenlive == true) { home.packages = with pkgs; [ pkgs.kdenlive diff --git a/config/home/kitty.nix b/config/home/kitty.nix index 406948d..19946f6 100644 --- a/config/home/kitty.nix +++ b/config/home/kitty.nix @@ -1,8 +1,8 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: let palette = config.colorScheme.palette; - inherit (import ../../options.nix) alacritty wezterm kitty; + inherit (import ../../hosts/${host}/options.nix) alacritty wezterm kitty; in lib.mkIf (wezterm == false && alacritty == false || kitty == true) { # Configure Kitty diff --git a/config/home/packages.nix b/config/home/packages.nix index 69c798f..146e6f8 100644 --- a/config/home/packages.nix +++ b/config/home/packages.nix @@ -1,7 +1,7 @@ -{ pkgs, config, username, ... }: +{ pkgs, config, username, host, ... }: let - inherit (import ../../options.nix) + inherit (import ../../hosts/${host}/options.nix) browser wallpaperDir wallpaperGit flakeDir; in { # Install Packages For The User @@ -17,13 +17,13 @@ in { (import ./../scripts/squirtle.nix { inherit pkgs; }) (import ./../scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir; inherit username; inherit wallpaperGit; }) - (import ./../scripts/themechange.nix { inherit pkgs; inherit flakeDir; }) + (import ./../scripts/themechange.nix { inherit pkgs; inherit flakeDir; inherit host; }) (import ./../scripts/theme-selector.nix { inherit pkgs; }) (import ./../scripts/nvidia-offload.nix { inherit pkgs; }) (import ./../scripts/web-search.nix { inherit pkgs; }) (import ./../scripts/rofi-launcher.nix { inherit pkgs; }) (import ./../scripts/screenshootin.nix { inherit pkgs; }) - (import ./../scripts/list-hypr-bindings.nix { inherit pkgs; }) + (import ./../scripts/list-hypr-bindings.nix { inherit pkgs; inherit host; }) ]; programs.gh.enable = true; diff --git a/config/home/swappy.nix b/config/home/swappy.nix index 8ac8dbd..ca2d69f 100644 --- a/config/home/swappy.nix +++ b/config/home/swappy.nix @@ -1,7 +1,7 @@ -{ pkgs, config, ... }: +{ pkgs, config, host, ... }: let - inherit (import ../../options.nix) screenshotDir; + inherit (import ../../hosts/${host}/options.nix) screenshotDir; in { home.file.".config/swappy/config".text = '' [Default] diff --git a/config/home/waybar.nix b/config/home/waybar.nix index dba7d32..b11c80b 100644 --- a/config/home/waybar.nix +++ b/config/home/waybar.nix @@ -1,9 +1,9 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: let palette = config.colorScheme.palette; betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; - inherit (import ../../options.nix) bar-number clock24h waybarAnim; + inherit (import ../../hosts/${host}/options.nix) bar-number clock24h waybarAnim; in with lib; { # Configure & Theme Waybar programs.waybar = { diff --git a/config/home/wezterm.nix b/config/home/wezterm.nix index f5da93e..506bb55 100644 --- a/config/home/wezterm.nix +++ b/config/home/wezterm.nix @@ -1,8 +1,8 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: let palette = config.colorScheme.palette; - inherit (import ../../options.nix) wezterm; + inherit (import ../../hosts/${host}/options.nix) wezterm; in lib.mkIf (wezterm == true) { home.packages = with pkgs; [ pkgs.wezterm diff --git a/config/home/zeroad.nix b/config/home/zeroad.nix index 977feb0..e6bb6f7 100644 --- a/config/home/zeroad.nix +++ b/config/home/zeroad.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) enableZeroAD; in +let inherit (import ../../hosts/${host}/options.nix) enableZeroAD; in lib.mkIf (enableZeroAD == true) { home.packages = with pkgs; [ zeroad diff --git a/config/home/zsh.nix b/config/home/zsh.nix index 396ee99..88ffda9 100644 --- a/config/home/zsh.nix +++ b/config/home/zsh.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../options.nix) flakeDir theShell hostname; in +let inherit (import ../../hosts/${host}/options.nix) flakeDir theShell hostname; in lib.mkIf (theShell == "zsh") { programs.zsh = { enable = true; diff --git a/config/scripts/list-hypr-bindings.nix b/config/scripts/list-hypr-bindings.nix index 4318ce6..f4d3573 100755 --- a/config/scripts/list-hypr-bindings.nix +++ b/config/scripts/list-hypr-bindings.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: +{ pkgs, host, ... }: let - inherit ( import ../../options.nix ) terminal browser; + inherit ( import ../../hosts/${host}/options.nix ) terminal browser; in pkgs.writeShellScriptBin "list-hypr-bindings" '' yad --width=800 --height=650 \ diff --git a/config/scripts/themechange.nix b/config/scripts/themechange.nix index 1db590f..3405995 100644 --- a/config/scripts/themechange.nix +++ b/config/scripts/themechange.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: +{ pkgs, host, ... }: let - inherit (import ../../options.nix) flakeDir hostname; + inherit (import ../../hosts/${host}/options.nix) flakeDir hostname; in pkgs.writeShellScriptBin "themechange" '' if [[ ! $@ ]];then diff --git a/config/system/amd-gpu.nix b/config/system/amd-gpu.nix index 03ebf07..d02b40e 100644 --- a/config/system/amd-gpu.nix +++ b/config/system/amd-gpu.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) gpuType; in +let inherit (import ../../hosts/${host}/options.nix) gpuType; in lib.mkIf ("${gpuType}" == "amd") { systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" diff --git a/config/system/autorun.nix b/config/system/autorun.nix index 50f6613..469fa91 100644 --- a/config/system/autorun.nix +++ b/config/system/autorun.nix @@ -1,6 +1,6 @@ -{ pkgs, config, username, ... }: +{ pkgs, config, username, host, ... }: -let inherit (import ../../options.nix) wallpaperDir wallpaperGit; in +let inherit (import ../../hosts/${host}/options.nix) wallpaperDir wallpaperGit; in { # system.userActivationScripts = { # gitwallpapers.text = '' diff --git a/config/system/displaymanager.nix b/config/system/displaymanager.nix index 0eca4db..ff58ed6 100644 --- a/config/system/displaymanager.nix +++ b/config/system/displaymanager.nix @@ -1,6 +1,6 @@ -{ pkgs, config, ... }: +{ pkgs, config, host, ... }: -let inherit (import ../../options.nix) theKBDVariant +let inherit (import ../../hosts/${host}/options.nix) theKBDVariant theKBDLayout theSecondKBDLayout; in { services.xserver = { diff --git a/config/system/distrobox.nix b/config/system/distrobox.nix index a1969ec..c177c01 100644 --- a/config/system/distrobox.nix +++ b/config/system/distrobox.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../options.nix) distrobox; in +let inherit (import ../../hosts/${host}/options.nix) distrobox; in lib.mkIf (distrobox == true) { virtualisation.podman = { enable = true; diff --git a/config/system/flatpak.nix b/config/system/flatpak.nix index 13d40ba..c663a5c 100644 --- a/config/system/flatpak.nix +++ b/config/system/flatpak.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) flatpak; in +let inherit (import ../../hosts/${host}/options.nix) flatpak; in lib.mkIf (flatpak == true) { services.flatpak.enable = true; diff --git a/config/system/hwclock.nix b/config/system/hwclock.nix index dda50cc..14c996c 100644 --- a/config/system/hwclock.nix +++ b/config/system/hwclock.nix @@ -1,6 +1,6 @@ -{ config, lib, ... }: +{ config, lib, host, ... }: -let inherit (import ../../options.nix) localHWClock; in +let inherit (import ../../hosts/${host}/options.nix) localHWClock; in lib.mkIf (localHWClock == true) { time.hardwareClockInLocalTime = true; } diff --git a/config/system/intel-amd.nix b/config/system/intel-amd.nix index da6c887..a9e9e38 100644 --- a/config/system/intel-amd.nix +++ b/config/system/intel-amd.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) gpuType; in +let inherit (import ../../hosts/${host}/options.nix) gpuType; in lib.mkIf ("${gpuType}" == "intel-amd") { nixpkgs.config.packageOverrides = pkgs: { diff --git a/config/system/intel-gpu.nix b/config/system/intel-gpu.nix index e18e552..00aa0d7 100644 --- a/config/system/intel-gpu.nix +++ b/config/system/intel-gpu.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) gpuType; in +let inherit (import ../../hosts/${host}/options.nix) gpuType; in lib.mkIf ("${gpuType}" == "intel") { nixpkgs.config.packageOverrides = pkgs: { diff --git a/config/system/intel-nvidia.nix b/config/system/intel-nvidia.nix index fe4cbc4..7d57d76 100644 --- a/config/system/intel-nvidia.nix +++ b/config/system/intel-nvidia.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) intel-bus-id nvidia-bus-id gpuType; in +let inherit (import ../../hosts/${host}/options.nix) intel-bus-id nvidia-bus-id gpuType; in lib.mkIf ("${gpuType}" == "intel-nvidia") { nixpkgs.config.packageOverrides = pkgs: { diff --git a/config/system/kernel/default.nix b/config/system/kernel/default.nix index e3b4bfd..a8b1efe 100644 --- a/config/system/kernel/default.nix +++ b/config/system/kernel/default.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "default") { boot.kernelPackages = pkgs.linuxPackages; } diff --git a/config/system/kernel/latest.nix b/config/system/kernel/latest.nix index c1a5503..f5c0568 100644 --- a/config/system/kernel/latest.nix +++ b/config/system/kernel/latest.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "latest") { boot.kernelPackages = pkgs.linuxPackages_latest; } diff --git a/config/system/kernel/lqx.nix b/config/system/kernel/lqx.nix index b83d112..ed1d6b3 100644 --- a/config/system/kernel/lqx.nix +++ b/config/system/kernel/lqx.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "lqx") { boot.kernelPackages = pkgs.linuxPackages_lqx; } diff --git a/config/system/kernel/testing.nix b/config/system/kernel/testing.nix index f4455c0..2db765f 100644 --- a/config/system/kernel/testing.nix +++ b/config/system/kernel/testing.nix @@ -1,9 +1,9 @@ # For the adventurous people # It's not listed in the list of possible options, # but the ones who want to try it can do so. -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "testing") { boot.kernelPackages = pkgs.linuxPackages_testing; } diff --git a/config/system/kernel/xanmod.nix b/config/system/kernel/xanmod.nix index e751d21..b22cc99 100644 --- a/config/system/kernel/xanmod.nix +++ b/config/system/kernel/xanmod.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "xanmod") { boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; } diff --git a/config/system/kernel/zen.nix b/config/system/kernel/zen.nix index 9f227d6..9572cf4 100644 --- a/config/system/kernel/zen.nix +++ b/config/system/kernel/zen.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, host, ... }: -let inherit (import ../../../options.nix) theKernel; in +let inherit (import ../../../hosts/${host}/options.nix) theKernel; in lib.mkIf (theKernel == "zen") { boot.kernelPackages = pkgs.linuxPackages_zen; } diff --git a/config/system/logitech.nix b/config/system/logitech.nix index 14157a9..96a72ae 100644 --- a/config/system/logitech.nix +++ b/config/system/logitech.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) logitech; in +let inherit (import ../../hosts/${host}/options.nix) logitech; in lib.mkIf (logitech == true) { hardware.logitech.wireless.enable = true; hardware.logitech.wireless.enableGraphical = true; diff --git a/config/system/nfs.nix b/config/system/nfs.nix index fb09be4..86b4a70 100644 --- a/config/system/nfs.nix +++ b/config/system/nfs.nix @@ -1,6 +1,6 @@ -{ config, lib, ... }: +{ config, lib, host, ... }: -let inherit (import ../../options.nix) nfs nfsMountPoint nfsDevice; in +let inherit (import ../../hosts/${host}/options.nix) nfs nfsMountPoint nfsDevice; in lib.mkIf (nfs == true) { fileSystems."${nfsMountPoint}" = { device = "${nfsDevice}"; diff --git a/config/system/ntp.nix b/config/system/ntp.nix index 1cfe126..69c1be3 100644 --- a/config/system/ntp.nix +++ b/config/system/ntp.nix @@ -1,6 +1,6 @@ -{ config, lib, options, ... }: +{ config, lib, options, host, ... }: -let inherit (import ../../options.nix) ntp; in +let inherit (import ../../hosts/${host}/options.nix) ntp; in lib.mkIf (ntp == true) { networking.timeServers = options.networking.timeServers.default ++ [ "pool.ntp.org" ]; } diff --git a/config/system/nvidia.nix b/config/system/nvidia.nix index 0ab56bf..f852333 100644 --- a/config/system/nvidia.nix +++ b/config/system/nvidia.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, gpuType, ... }: +{ pkgs, config, lib, gpuType, host, ... }: -let inherit (import ../../options.nix) gpuType; in +let inherit (import ../../hosts/${host}/options.nix) gpuType; in lib.mkIf ("${gpuType}" == "nvidia") { environment.systemPackages = with pkgs; [ nvtop diff --git a/config/system/persistence.nix b/config/system/persistence.nix index fdf808a..45cdb6b 100644 --- a/config/system/persistence.nix +++ b/config/system/persistence.nix @@ -1,7 +1,7 @@ -{ config, pkgs, lib, username, ... }: +{ config, pkgs, lib, username, host, ... }: let - inherit ( import ../../options.nix ) username; + inherit ( import ../../hosts/${host}/options.nix ) username; in { environment.persistence."/nix/persist" = { diff --git a/config/system/printer.nix b/config/system/printer.nix index 3d6ac04..8df03b7 100644 --- a/config/system/printer.nix +++ b/config/system/printer.nix @@ -1,6 +1,6 @@ -{ config, lib, pkgs, username, ... }: +{ config, lib, pkgs, username, host, ... }: -let inherit (import ../../options.nix) printer; in +let inherit (import ../../hosts/${host}/options.nix) printer; in lib.mkIf (printer == true) { services = { printing.enable = true; diff --git a/config/system/python.nix b/config/system/python.nix index cd33362..70553b5 100644 --- a/config/system/python.nix +++ b/config/system/python.nix @@ -1,7 +1,7 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: let - inherit (import ../../options.nix) python; + inherit (import ../../hosts/${host}/options.nix) python; my-python-packages = ps: with ps; [ pandas requests diff --git a/config/system/syncthing.nix b/config/system/syncthing.nix index 85e4605..cee2707 100644 --- a/config/system/syncthing.nix +++ b/config/system/syncthing.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) syncthing username userHome; in +let inherit (import ../../hosts/${host}/options.nix) syncthing username userHome; in lib.mkIf (syncthing == true) { services = { syncthing = { diff --git a/config/system/vm.nix b/config/system/vm.nix index 07831c6..8db987c 100644 --- a/config/system/vm.nix +++ b/config/system/vm.nix @@ -1,6 +1,6 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, host, ... }: -let inherit (import ../../options.nix) cpuType; in +let inherit (import ../../hosts/${host}/options.nix) cpuType; in lib.mkIf ("${cpuType}" == "vm") { services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; diff --git a/flake.nix b/flake.nix index 0e98643..fcde650 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ let system = "x86_64-linux"; host = "hyprnix"; - inherit (import ./${host}/options.nix) username hostname; + inherit (import ./hosts/${host}/options.nix) username hostname; pkgs = import nixpkgs { inherit system; diff --git a/home.nix b/home.nix index 581b886..77b8915 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,7 @@ { config, pkgs, inputs, username, - gtkThemeFromScheme, ... }: + host, gtkThemeFromScheme, ... }: let - inherit (import ./options.nix) + inherit (import ./hosts/${host}/options.nix) gitUsername gitEmail theme browser wallpaperDir wallpaperGit flakeDir waybarStyle; diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix new file mode 100644 index 0000000..decd5e5 --- /dev/null +++ b/hosts/default/hardware.nix @@ -0,0 +1,51 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/362d23fa-3cbd-4ee1-9c27-ea8c30242ec3"; + fsType = "ext4"; + }; + + fileSystems."/home/zaney/Documents" = + { device = "/dev/disk/by-uuid/35f6d96f-0837-4868-8ce5-8e1df5e3b2f3"; + fsType = "ext4"; + }; + + fileSystems."/home/zaney/Videos" = + { device = "/dev/disk/by-uuid/cbe1beaf-6c7f-4251-ad5c-2897aecc367d"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-cdf913d6-7149-4a8f-9461-61c394b2f5af".device = "/dev/disk/by-uuid/cdf913d6-7149-4a8f-9461-61c394b2f5af"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C598-AF28"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/8160cef0-c5eb-4caa-9ef5-56a5b4eb51b8"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/default/options.nix b/hosts/default/options.nix new file mode 100644 index 0000000..6237342 --- /dev/null +++ b/hosts/default/options.nix @@ -0,0 +1,91 @@ +# PLEASE READ THE WIKI FOR DETERMINING +# WHAT TO PUT HERE AS OPTIONS. +# https://gitlab.com/Zaney/zaneyos/-/wikis/Setting-Options + +let + setUsername = "defaultuser"; + setHostname = "nixos"; +in { + # No Change Needed Below + username = "${setUsername}"; + hostname = "${setHostname}"; + userHome = "/home/${setUsername}"; + flakeDir = "/home/${setUsername}/zaneyos"; + wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; # Can be changed IF you know what your doing + wallpaperDir = "/home/${setUsername}/Pictures/Wallpapers"; + screenshotDir = "/home/${setUsername}/Pictures/Screenshots"; + flakePrev = "/home/${setUsername}/.zaneyos-previous"; + flakeBackup = "/home/${setUsername}/.zaneyos-backup"; + + # Git Configuration ( For Pulling Software Repos ) + gitUsername = "John Smith"; + gitEmail = "johnsmith@gmail.com"; + + # Base16 Theme + theme = "atelier-cave"; + + # Hyprland Settings + borderAnim = true; # Enable / Disable Hyprland Border Animation + extraMonitorSettings = ""; + + # Waybar Settings + waybarAnim = true; # Enable / Disable Waybar Animation CSS + bar-number = true; # Enable / Disable Workspace Numbers In Waybar + + # System Settings + clock24h = false; + theLocale = "en_US.UTF-8"; + theKBDLayout = "us"; + theSecondKBDLayout = "de"; + theKBDVariant = ""; + theLCVariables = "en_US.UTF-8"; + theTimezone = "America/Chicago"; + theShell = "bash"; # Possible options: bash, zsh + theKernel = "zen"; # Possible options: default, latest, lqx, xanmod, zen + sdl-videodriver = "x11"; # Either x11 or wayland ONLY. Games might require x11 set here + # For Hybrid Systems intel-nvidia + # Should Be Used As gpuType + cpuType = "intel"; + gpuType = "intel"; + + # Nvidia Hybrid Devices ONLY NEEDED FOR HYBRID SYSTEMS! + intel-bus-id = "PCI:1:0:0"; + nvidia-bus-id = "PCI:0:2:0"; + + # Enable / Setup NFS + nfs = false; + nfsMountPoint = "/mnt/nas"; + nfsDevice = "nas:/volume1/nas"; + + # NTP & HWClock Settings + ntp = true; + localHWClock = false; + + # Enable Printer & Scanner Support + printer = true; + + # Program Options + browser = "firefox"; # Install & Set Default Browser + terminal = "kitty"; # Set Default System Terminal + distrobox = false; + flatpak = false; + kdenlive = false; + blender = false; + enableZeroAD = false; + + # Enable Support For + # Logitech Devices + logitech = false; + + # Enable Terminals ( If You Disable All You Get Kitty ) + wezterm = false; + alacritty = false; + kitty = true; + + # Enable Python & PyCharm + python = false; + + # Enable SyncThing + syncthing = false; + +} diff --git a/system.nix b/system.nix index 20cc072..ff371f6 100644 --- a/system.nix +++ b/system.nix @@ -2,7 +2,7 @@ username, hostname, host, ... }: let - inherit (import ./options.nix) + inherit (import ./hosts/${host}/options.nix) theLocale theTimezone gitUsername theShell wallpaperDir wallpaperGit theLCVariables theKBDLayout flakeDir @@ -10,7 +10,7 @@ let in { imports = [ - ./${host}/hardware.nix + ./hosts/${host}/hardware.nix ./config/system ];