nixos-config/flake.nix

62 lines
1.8 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";
2022-10-26 15:54:00 -04:00
tokyo-night-sddm-src.url = "github:rototrash/tokyo-night-sddm";
tokyo-night-sddm-src.flake = false;
2022-01-06 21:14:02 -05:00
};
outputs = { self,
nixpkgs,
home-manager,
nixos-hardware,
2022-01-06 21:14:02 -05:00
...}@inputs:
let
system = "x86_64-linux";
username = "kiana";
2022-10-26 15:54:00 -04:00
fullname = "Kiana Sheibani";
moduleArgs = inputs // { inherit system username fullname; };
2022-01-06 21:14:02 -05:00
lib = nixpkgs.lib;
in {
nixosConfigurations = {
2022-10-26 15:54:00 -04:00
"${username}-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-10-26 15:54:00 -04:00
"${username}-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
};
};
}