Fix flake.nix

This commit is contained in:
Riley Apeldoorn 2023-05-23 10:04:47 +02:00
parent 95a8ff974b
commit e1652df3d0

View file

@ -11,55 +11,57 @@
outputs = args@{ home-manager, nixpkgs, ... }: with nixpkgs; { outputs = args@{ home-manager, nixpkgs, ... }: with nixpkgs; {
# Configurations for NixOS machines. # Configurations for NixOS machines.
nixosConfigurations = nixosConfigurations =
let mkUserConfig = path: { let mkUserConfig = path: {
imports = [ home-manager.nixosModules.home-manager ]; imports = [ home-manager.nixosModules.home-manager ];
config = { config = {
home-manager.users."riley" = a: lib.pipe a [ home-manager.users."riley" = a: lib.pipe a [
(import "${path}/home.nix") (import "${path}/home.nix")
(x: x // { imports = [ ./shared/home ]; }) (x: x // { imports = [ ./shared/home ]; })
]; ];
}; };
}; in { };
in {
# Desktop system # Desktop system
"thor" = lib.nixosSystem { "thor" = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [
(mkUserConfig ./system/thor)
./system/thor/core.nix
./shared/core
];
specialArgs = args;
};
# Pinebook
"odin" = lib.nixosSystem {
system = "aarch64-linux";
modules = [
(mkUserConfig ./system/odin)
./system/odin/core.nix
./shared/core
];
specialArgs = args;
};
};
# Configurations for non-NixOS machines.
homeConfigurations = with home-manager.lib; {
"dev-lt-63" = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
modules = [ modules = [
(mkUserConfig ./system/thor) ./system/dev-lt-63/home.nix
./system/thor/core.nix ./shared/home
./shared/core
]; ];
specialArgs = args;
}; };
# Pinebook
"odin" = lib.nixosSystem {
system = "aarch64-linux";
modules = [
(mkUserConfig ./system/odin)
./system/odin/core.nix
./shared/core
];
specialArgs = args;
};
}; };
# Configurations for non-NixOS machines. overlays = {
homeConfigurations = with home-manager.lib; { default = (import ./shared/overlay.nix);
"dev-lt-63" = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
modules = [
(mkUserConfig ./system/dev-lt-63)
];
}; };
};
overlays = {
default = (import ./shared/overlay.nix);
};
}; };