From fe512e2175bed9f697a77f4cba651c3892be3fe5 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Sun, 4 Jun 2023 13:17:17 -0400 Subject: [PATCH] in progress --- flake.nix | 6 +++++- .../desktop/hardware-configuration.nix | 17 ++++++++++------- modules/system/configuration.nix | 18 ++++++++++++++++++ sysConfig/locale.nix | 19 ------------------- sysConfig/{users.nix => me.nix} | 0 5 files changed, 33 insertions(+), 27 deletions(-) rename sysConfig/hardware.nix => machines/desktop/hardware-configuration.nix (54%) create mode 100644 modules/system/configuration.nix rename sysConfig/{users.nix => me.nix} (100%) diff --git a/flake.nix b/flake.nix index becf72c..6d548d7 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,10 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; @@ -23,7 +27,7 @@ allowUnfree = true; }; }; - + in { nixosConfigurations.socrates = nixpkgs.lib.nixosSystem { diff --git a/sysConfig/hardware.nix b/machines/desktop/hardware-configuration.nix similarity index 54% rename from sysConfig/hardware.nix rename to machines/desktop/hardware-configuration.nix index 82081a7..92f4f5b 100644 --- a/sysConfig/hardware.nix +++ b/machines/desktop/hardware-configuration.nix @@ -1,12 +1,8 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; -# KERNEL MODULES boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "coretemp" ]; @@ -14,7 +10,6 @@ boot.kernelPackages = pkgs.linuxPackages_latest; -# FSTAB fileSystems."/" = { device = "/dev/disk/by-uuid/af24c5b3-8a6e-4333-a61d-922a97928cae"; fsType = "ext4"; @@ -30,8 +25,16 @@ fsType = "vfat"; }; + services.xserver.videoDrivers = [ "nvidia" ]; # Uncomment + hardware = { # this + opengl.enable = true; # codeblock + nvidia = { # for + package = config.boot.kernelPackages.nvidiaPackages.stable; # NVIDIA + modesetting.enable = true; # proprietary + }; # driver + }; # support -# CPU powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } + diff --git a/modules/system/configuration.nix b/modules/system/configuration.nix new file mode 100644 index 0000000..b8cf9bd --- /dev/null +++ b/modules/system/configuration.nix @@ -0,0 +1,18 @@ +{ + time = { + timeZone = "America/New_York"; + }; + + services.timesyncd = { + enable = true; + servers = [ + "0.pool.ntp.org" + "1.pool.ntp.org" + "2.pool.ntp.org" + "3.pool.ntp.org" + ]; + }; + + i18n.defaultLocale = "en_US.UTF-8"; # Change locale +} + diff --git a/sysConfig/locale.nix b/sysConfig/locale.nix index 397351a..e69de29 100644 --- a/sysConfig/locale.nix +++ b/sysConfig/locale.nix @@ -1,19 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - time = { - timeZone = "America/New_York"; - }; - - services.timesyncd = { - enable = true; - servers = [ - "0.pool.ntp.org" - "1.pool.ntp.org" - "2.pool.ntp.org" - "3.pool.ntp.org" - ]; - }; - - i18n.defaultLocale = "en_US.UTF-8"; # Change locale -} diff --git a/sysConfig/users.nix b/sysConfig/me.nix similarity index 100% rename from sysConfig/users.nix rename to sysConfig/me.nix