nixos-config/flake.nix

107 lines
3.5 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 = {
2024-06-04 00:26:34 +02:00
nixpkgs.url = "github:NixOs/nixpkgs/nixos-24.05";
2024-04-19 15:24:00 +02:00
nixpkgs-unstable.url = "github:NixOs/nixpkgs/nixos-unstable";
2024-06-24 21:53:35 +02:00
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
agda = {
url = "github:agda/agda/v2.6.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
cornelis = {
url = "github:isovector/cornelis/";
inputs.nixpkgs.follows = "nixpkgs";
};
ssbm-nix = {
url = "github:lytedev/ssbm-nix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
2023-07-31 14:18:02 +02:00
};
2024-06-24 21:53:35 +02:00
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agda, cornelis, ssbm-nix, plasma-manager, flake-utils }:
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;
2024-06-24 18:19:10 +02:00
nix.registry.unstable.flake = nixpkgs-unstable;
2023-07-31 14:18:02 +02:00
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
2023-10-12 23:24:36 +02:00
};
2024-06-24 21:53:35 +02:00
rachel-home-module =
system: {
2023-10-12 23:24:36 +02:00
home-manager = {
2024-06-24 21:53:35 +02:00
sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
2023-10-12 23:24:36 +02:00
useGlobalPkgs = true;
useUserPackages = true;
2024-06-24 21:53:35 +02:00
users.rachel = import ./home/all.nix {
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
2024-04-26 15:21:28 +02:00
unstable = import nixpkgs-unstable {
system = system;
config.allowUnfree = true;
};
2024-06-24 21:53:35 +02:00
extra = {
agda = agda.packages.${system}.Agda;
cornelis = cornelis.packages.${system}.cornelis;
cornelis-vim = cornelis.packages.${system}.cornelis-vim;
slippi-netplay = ssbm-nix.packages.${system}.slippi-netplay;
sax2nf = self.packages.${system}.sax2nf;
bqn-vim = self.packages.${system}.bqn-vim;
bqn-nvim = self.packages.${system}.bqn-nvim;
shell-menu = self.packages.${system}.bqn-nvim;
};
2023-10-12 23:24:36 +02:00
};
};
2024-06-24 21:53:35 +02:00
};
base-modules = [
nix-config-module
ssbm-nix.nixosModule
home-manager.nixosModules.home-manager
];
2024-06-18 11:57:43 +02:00
in {
2023-10-12 23:24:36 +02:00
2024-06-24 21:53:35 +02:00
nixosConfigurations.lambda = nixpkgs.lib.nixosSystem rec {
2023-10-12 23:24:36 +02:00
system = "x86_64-linux";
2024-06-24 21:53:35 +02:00
modules = base-modules ++ [
2023-07-31 14:18:02 +02:00
./lambda/configuration.nix
2024-06-24 21:53:35 +02:00
./shared/user-system.nix
./shared/graphical.nix
(rachel-home-module system)
2023-07-31 14:18:02 +02:00
];
};
2023-08-19 16:58:57 +02:00
2024-06-24 21:53:35 +02:00
nixosConfigurations.computational = nixpkgs.lib.nixosSystem rec {
2023-08-19 16:58:57 +02:00
system = "x86_64-linux";
2024-06-24 21:53:35 +02:00
modules = base-modules ++ [
2023-08-19 16:58:57 +02:00
./computational/configuration.nix
2024-06-24 21:53:35 +02:00
./shared/user-system.nix
./shared/graphical.nix
(rachel-home-module system)
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
2024-06-24 21:53:35 +02:00
} // flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages = {
bqn-vim = import ./pkgs/bqn-vim.nix { inherit pkgs; };
bqn-nvim = import ./pkgs/bqn-nvim.nix { inherit pkgs; };
sax2nf = import ./pkgs/sax2nf.nix { inherit pkgs; };
shell-menu = import ./pkgs/shell-menu.nix { inherit pkgs; };
};
});
2023-07-31 14:18:02 +02:00
}