From bd22d91e876c2105435678293ef5e104708929f8 Mon Sep 17 00:00:00 2001 From: Rafiyq Widianto Date: Fri, 18 Sep 2020 06:25:04 +0000 Subject: [PATCH] Change hardware config and module --- hosts/nixos/configuration.nix | 20 ++++++++++---------- hosts/nixos/default.nix | 6 +++++- hosts/nixos/hardware-configuration.nix | 8 ++++---- modules/{configuration.nix => abcdw.nix} | 0 modules/hardware.nix | 22 +++------------------- 5 files changed, 22 insertions(+), 34 deletions(-) rename modules/{configuration.nix => abcdw.nix} (100%) diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index 1eec66b..2401b97 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -20,7 +20,7 @@ boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only networking.hostName = "nixos"; # Define your hostname. - networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config @@ -34,11 +34,11 @@ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "uk"; + }; # Set your time zone. time.timeZone = "Asia/Jakarta"; @@ -89,10 +89,10 @@ # services.xserver.desktopManager.plasma5.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.rafiyq = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - }; + #users.users.rafiyq = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + #}; nixpkgs.config = { allowUnfree = true; }; # This value determines the NixOS release from which the default diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index 1e55223..d32d2cb 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -3,6 +3,10 @@ { imports = [ ./configuration.nix - ./hardware-configuration.nix + ../../modules/fonts.nix + ../../modules/hardware.nix + ../../modules/nix-unstable.nix + ../../modules/users.nix + ../../modules/xserver.nix ]; } diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/nixos/hardware-configuration.nix index d4c9182..fe035d6 100644 --- a/hosts/nixos/hardware-configuration.nix +++ b/hosts/nixos/hardware-configuration.nix @@ -4,9 +4,9 @@ { config, lib, pkgs, ... }: { - #imports = - # [ - # ]; + imports = + [ + ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; @@ -14,7 +14,7 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/60bf9589-58a3-4bd4-89e6-c2130cde4a4e"; + { device = "/dev/disk/by-uuid/1963345d-5d7c-40c3-b75c-b34d7b8f9de7"; fsType = "ext4"; }; diff --git a/modules/configuration.nix b/modules/abcdw.nix similarity index 100% rename from modules/configuration.nix rename to modules/abcdw.nix diff --git a/modules/hardware.nix b/modules/hardware.nix index 83bf0e1..9fabd69 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -1,26 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs ... }: { -{ # Networking - networking = { - hostName = "nixos"; - networkmanager.enable = true; - firewall.enable = true; - useDHCP = false; - interfaces = { - enp0s25.useDHCP = true; - wlp3s0.useDHCP = true; - }; - }; + networking.networkmanager.enable = true; # Console - i18n.defaultLocale = "en_US.UTF-8"; - console = { - earlySetup = true; - font = "Lat2-Terminus16"; - keyMap = "uk"; - }; - + console.earlySetup = true; # Power management services.tlp.enable = true;