nixos-config/nixos/default.nix
2022-12-03 15:19:06 -05:00

46 lines
1.1 KiB
Nix

{ self, inputs, config, ... }:
let
mkHomeModule = name: extraModules: {
users.users.${name}.isNormalUser = true;
home-manager.users.${name} = {
imports = [
self.homeModules.common-linux
../home/git.nix
] ++ extraModules;
};
};
in
{
# Configuration common to all Linux systems
flake = {
nixosModules = {
guests.imports = [
# Temporarily sharing with Uday, until he gets better machine.
(mkHomeModule "uday" [ ])
];
myself = mkHomeModule config.people.myself [
../home/shellcommon.nix
];
default.imports = [
self.nixosModules.home-manager
self.nixosModules.myself
./caches
./self-ide.nix
./takemessh
./current-location.nix
];
};
lib.mkLinuxSystem = extraModules: inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
# Arguments to pass to all modules.
specialArgs = {
inherit system inputs;
flake = { inherit config; };
};
modules = [
self.nixosModules.default
] ++ extraModules;
};
};
}