Skip to content

Commit

Permalink
Change hardware config and module
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiyq Widianto committed Sep 18, 2020
1 parent fb8fdc5 commit bd22d91
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 34 deletions.
20 changes: 10 additions & 10 deletions hosts/nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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";
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion hosts/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
}
8 changes: 4 additions & 4 deletions hosts/nixos/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
{ config, lib, pkgs, ... }:

{
#imports =
# [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
# ];
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];

boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
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";
};

Expand Down
File renamed without changes.
22 changes: 3 additions & 19 deletions modules/hardware.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit bd22d91

Please sign in to comment.