diff --git a/modules/common.nix b/modules/common.nix new file mode 100644 index 0000000..4e50b5b --- /dev/null +++ b/modules/common.nix @@ -0,0 +1,40 @@ +# Contains common configration for all machines + +{ + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Set your time zone. + time.timeZone = "Asia/Singapore"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_SG.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_SG.UTF-8"; + LC_IDENTIFICATION = "en_SG.UTF-8"; + LC_MEASUREMENT = "en_SG.UTF-8"; + LC_MONETARY = "en_SG.UTF-8"; + LC_NAME = "en_SG.UTF-8"; + LC_NUMERIC = "en_SG.UTF-8"; + LC_PAPER = "en_SG.UTF-8"; + LC_TELEPHONE = "en_SG.UTF-8"; + LC_TIME = "en_SG.UTF-8"; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.rafiq = { + isNormalUser = true; + description = "rafiq"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; +} diff --git a/systems/nemesis/default.nix b/systems/nemesis/default.nix index 1c0300f..ca04b62 100644 --- a/systems/nemesis/default.nix +++ b/systems/nemesis/default.nix @@ -7,6 +7,7 @@ { imports = [ # Include the results of the hardware scan. + ../../modules/common.nix ./hardware-configuration.nix ../../scripts/hyprland-tty-launch.nix ../../modules/nvidia.nix # Graphics settings for Nvidia GPUs @@ -23,43 +24,6 @@ options = [ "rw" "uid=rafiq" ]; }; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Set your time zone. - time.timeZone = "Asia/Singapore"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_SG.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_SG.UTF-8"; - LC_IDENTIFICATION = "en_SG.UTF-8"; - LC_MEASUREMENT = "en_SG.UTF-8"; - LC_MONETARY = "en_SG.UTF-8"; - LC_NAME = "en_SG.UTF-8"; - LC_NUMERIC = "en_SG.UTF-8"; - LC_PAPER = "en_SG.UTF-8"; - LC_TELEPHONE = "en_SG.UTF-8"; - LC_TIME = "en_SG.UTF-8"; - }; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.rafiq = { - isNormalUser = true; - description = "rafiq"; - extraGroups = [ "networkmanager" "wheel" ]; - }; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [