From 7c0f8e4f79803ed9b4218801b00d64725bdd1737 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Wed, 5 Mar 2025 06:37:18 +0800 Subject: [PATCH] refactor: move all common settings into its own file --- systems/modules/common.nix | 14 ++++++++++++++ systems/nemesis.nix | 14 +------------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 systems/modules/common.nix diff --git a/systems/modules/common.nix b/systems/modules/common.nix new file mode 100644 index 0000000..c7bf9cf --- /dev/null +++ b/systems/modules/common.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + users.users.rafiq = { + isNormalUser = true; + description = "rafiq"; + extraGroups = ["networkmanager" "wheel"]; + }; + + nixpkgs.config.allowUnfree = true; + nix.settings.experimental-features = ["nix-command" "flakes"]; + + environment.systemPackages = with pkgs; [ + git + ]; +} diff --git a/systems/nemesis.nix b/systems/nemesis.nix index 8ca0e04..1878f18 100644 --- a/systems/nemesis.nix +++ b/systems/nemesis.nix @@ -3,8 +3,8 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). {pkgs, ...}: { imports = [ - # Include the results of the hardware scan. ./hw-nemesis.nix + ./modules/common.nix ./modules/networking.nix ./modules/locale.nix ./modules/systemd-boot.nix @@ -12,18 +12,6 @@ networking.hostName = "nemesis"; # Define your hostname. - users.users.rafiq = { - isNormalUser = true; - description = "rafiq"; - extraGroups = ["networkmanager" "wheel"]; - }; - - nixpkgs.config.allowUnfree = true; - - environment.systemPackages = with pkgs; [ - git - ]; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave