nixos-config/flake.nix

58 lines
1.7 KiB
Nix
Raw Normal View History

2022-01-06 21:14:02 -05:00
{
description = "System conf";
inputs = rec {
2022-04-20 23:40:29 -04:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2022-01-06 21:14:02 -05:00
nur.url = "github:nix-community/NUR";
2022-03-04 13:25:16 -05:00
nixos-hardware.url = "github:NixOS/nixos-hardware";
2022-01-06 21:14:02 -05:00
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self,
nixpkgs,
home-manager,
nixos-hardware,
2022-01-06 21:14:02 -05:00
...}@inputs:
let
system = "x86_64-linux";
username = "kiana";
moduleArgs = inputs // { inherit system username; };
lib = nixpkgs.lib;
in {
nixosConfigurations = {
2022-01-06 22:17:01 -05:00
"kiana-desktop" = lib.makeOverridable lib.nixosSystem {
2022-01-06 21:14:02 -05:00
inherit system;
modules = [
{ _module.args = moduleArgs; }
./desktop/config
2022-03-04 09:50:43 -05:00
./common/config
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./desktop/home-manager;
home-manager.extraSpecialArgs = moduleArgs;
}
];
2022-01-06 21:14:02 -05:00
};
2022-01-06 22:16:45 -05:00
2022-01-06 22:17:01 -05:00
"kiana-laptop" = lib.makeOverridable lib.nixosSystem {
2022-01-06 22:16:45 -05:00
inherit system;
modules = [
{ _module.args = moduleArgs; }
./laptop/config
2022-03-04 09:50:43 -05:00
./common/config
home-manager.nixosModules.home-manager
nixos-hardware.nixosModules.microsoft-surface
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./laptop/home-manager;
home-manager.extraSpecialArgs = moduleArgs;
}
];
2022-01-06 22:16:45 -05:00
};
2022-01-06 21:14:02 -05:00
};
};
}