nixos-config/flake.nix

88 lines
2.6 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";
2024-04-19 15:24:00 +02:00
nixpkgs-unstable.url = "github:NixOs/nixpkgs/nixos-unstable";
2023-12-01 17:00:30 +01:00
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";
2024-03-05 20:44:17 +01:00
ssbm-nix.url = "github:lytedev/ssbm-nix";
2023-07-31 14:18:02 +02:00
};
2024-04-19 15:24:00 +02:00
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agda, cornelis, ssbm-nix }:
2023-10-12 23:24:36 +02:00
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;
2024-04-26 15:21:28 +02:00
unstable = import nixpkgs-unstable {
system = system;
config.allowUnfree = true;
};
2023-10-12 23:24:36 +02:00
agda = agda.packages.${system}.Agda;
cornelis = cornelis.packages.${system}.cornelis;
cornelis-vim = cornelis.packages.${system}.cornelis-vim;
2024-03-05 20:44:17 +01:00
slippi-netplay = ssbm-nix.packages.${system}.slippi-netplay;
2023-10-12 23:24:36 +02:00
};
};
}
);
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
2024-03-05 20:44:17 +01:00
ssbm-nix.nixosModule
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
2024-03-05 20:44:17 +01:00
ssbm-nix.nixosModule
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
];
};
2024-04-17 15:41:01 +02:00
nixosConfigurations.cafe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nix-config-module
./cafe/host.nix
];
virtualisation.forwardPorts = [
{ from = "host"; host.port = 80; guest.port = 8080; }
];
};
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
};
}