nixos-config/flake.nix

66 lines
1.9 KiB
Nix
Raw Normal View History

2023-07-31 14:27:24 +02:00
{
2023-07-31 14:18:02 +02:00
description = "My various NixOs configurations";
inputs = {
2023-12-01 17:00:30 +01:00
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
2023-07-31 14:18:02 +02:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-12-01 17:00:30 +01:00
agda.url = "github:agda/agda/v2.6.4.1";
2023-10-12 23:24:36 +02:00
agda.inputs.nixpkgs.follows = "nixpkgs";
2023-12-01 19:48:02 +01:00
cornelis.url = "github:isovector/cornelis/";
cornelis.inputs.nixpkgs.follows = "nixpkgs";
2023-07-31 14:18:02 +02:00
};
2023-10-12 23:24:36 +02:00
outputs = { self, nixpkgs, home-manager, agda, cornelis }:
let nix-config-module =
2023-07-31 14:18:02 +02:00
{
nix.registry.nixpkgs.flake = nixpkgs;
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
2023-10-12 23:24:36 +02:00
};
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;
};
};
}
);
2024-01-03 17:22:32 +01:00
in rec {
2023-10-12 23:24:36 +02:00
2024-01-03 17:22:32 +01:00
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem {
2023-10-12 23:24:36 +02:00
system = "x86_64-linux";
modules = [
nix-config-module
2023-07-31 14:18:02 +02:00
./lambda/configuration.nix
2023-11-18 11:29:47 +01:00
./shared/desktop.nix
2023-07-31 14:18:02 +02:00
home-manager.nixosModules.home-manager
2023-10-12 23:24:36 +02:00
rachel-home-module
2023-07-31 14:18:02 +02:00
];
};
2023-08-19 16:58:57 +02:00
2024-01-03 17:22:32 +01:00
nixosConfigurations.computational = nixpkgs.lib.nixosSystem {
2023-08-19 16:58:57 +02:00
system = "x86_64-linux";
modules = [
2023-10-12 23:24:36 +02:00
nix-config-module
2023-08-19 16:58:57 +02:00
./computational/configuration.nix
2023-11-18 11:29:47 +01:00
./shared/desktop.nix
2023-08-19 16:58:57 +02:00
home-manager.nixosModules.home-manager
2023-10-12 23:24:36 +02:00
rachel-home-module
2023-08-19 16:58:57 +02:00
];
};
2023-10-27 23:32:43 +02:00
keyboardLayouts.fox = ./shared/fox.xkb;
2023-11-18 23:30:05 +01:00
fonts.sax2nf = import ./shared/sax2nf.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
2023-07-31 14:18:02 +02:00
};
}