diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 22:06:02 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 23:05:27 +0530 |
commit | aee9216af6875662235fd8839a827e724e53c845 (patch) | |
tree | c8c11981828c93f30475ed4dcc27aa9fd27696cb /os/common | |
parent | a41037ef644dbacb3d577933fb3d93c210439b38 (diff) |
feat(flake/nixosModules): init
Diffstat (limited to 'os/common')
-rw-r--r-- | os/common/configuration.nix | 8 | ||||
-rw-r--r-- | os/common/modules/home-manager.nix | 18 |
2 files changed, 25 insertions, 1 deletions
diff --git a/os/common/configuration.nix b/os/common/configuration.nix index b1dd263..d8d465e 100644 --- a/os/common/configuration.nix +++ b/os/common/configuration.nix @@ -16,11 +16,17 @@ in ./modules/user.nix ./modules/environment.nix ./modules/pppd.nix + ./modules/home-manager.nix + ../../global/common ]; system.stateVersion = "24.05"; time.timeZone = "Asia/Kolkata"; - networking.useDHCP = false; + + networking = { + useDHCP = false; + hostName = lib.mkOptionDefault "common"; + }; swapDevices = lib.mkDefault [ { diff --git a/os/common/modules/home-manager.nix b/os/common/modules/home-manager.nix new file mode 100644 index 0000000..d93df49 --- /dev/null +++ b/os/common/modules/home-manager.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +let + username = config.global.userdata.name; + host = config.networking.hostName; +in +{ + home-manager = { + useGlobalPkgs = true; + useUserPackages = false; + users.${username} = + { ... }: + { + imports = [ + ../../../home/common/home.nix + ] ++ lib.optional (builtins.pathExists ../../../home/${host}) ../../../home/${host}/home.nix; + }; + }; +} |