nixos-config/flake.nix

68 lines
2.0 KiB
Nix

{
description = "My various NixOs configurations";
inputs = {
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
agda.url = "github:agda/agda/v2.6.4.1";
agda.inputs.nixpkgs.follows = "nixpkgs";
cornelis.url = "github:isovector/cornelis/";
cornelis.inputs.agda.follows = "agda";
cornelis.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, agda, cornelis }:
let nix-config-module =
{
nix.registry.nixpkgs.flake = nixpkgs;
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
};
rachel-home-module =
({ pkgs, ... }:
let system = pkgs.stdenv.system;
in {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.rachel = import ./home/rachel.nix {
pkgs = pkgs;
agda = agda.packages.${system}.Agda;
cornelis = cornelis.packages.${system}.cornelis;
cornelis-vim = cornelis.packages.${system}.cornelis-vim;
};
};
}
);
in
{
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
nix-config-module
./lambda/configuration.nix
./shared/desktop.nix
home-manager.nixosModules.home-manager
rachel-home-module
];
};
nixosConfigurations.computational = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
nix-config-module
./computational/configuration.nix
./shared/desktop.nix
home-manager.nixosModules.home-manager
rachel-home-module
];
};
keyboardLayouts.fox = ./shared/fox.xkb;
fonts.sax2nf = import ./shared/sax2nf.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
};
}