os/flake.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

2023-05-21 21:15:04 +02:00
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
home-manager.url = github:nix-community/home-manager;
pwnix = {
inputs.nixpkgs.follows = "nixpkgs";
url = git+https://im.badat.dev/bad/pwnix.git;
};
};
outputs = args@{ home-manager, nixpkgs, ... }: with nixpkgs; {
2023-05-23 10:04:47 +02:00
# Configurations for NixOS machines.
nixosConfigurations =
let mkUserConfig = path: {
imports = [ home-manager.nixosModules.home-manager ];
config = {
home-manager.users."riley" = a: lib.pipe a [
(import "${path}/home.nix")
(x: x // {
imports = [ ./shared/home ];
isNixos = true;
})
2023-05-23 10:04:47 +02:00
];
};
};
in {
# Desktop system
2023-06-06 15:38:06 +02:00
"strawberry" = lib.nixosSystem {
2023-05-23 10:04:47 +02:00
system = "x86_64-linux";
modules = [
2023-06-06 15:38:06 +02:00
(mkUserConfig ./system/strawberry)
./system/strawberry/core.nix
2023-05-23 10:04:47 +02:00
./shared/core
];
specialArgs = args;
};
2023-05-21 21:15:04 +02:00
};
2023-05-23 10:04:47 +02:00
# Configurations for non-NixOS machines.
homeConfigurations = with home-manager.lib; {
"dev-lt-63" = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
2023-05-21 21:15:04 +02:00
modules = [
2023-05-23 10:04:47 +02:00
./system/dev-lt-63/home.nix
./shared/home
2023-05-21 21:15:04 +02:00
];
};
};
2023-05-23 10:04:47 +02:00
overlays = {
default = (import ./shared/overlay.nix);
2023-05-21 21:15:04 +02:00
};
};
}