nixos-config/flake.nix

113 lines
3.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 = {
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 = {
2024-06-25 12:11:51 +02:00
url = "github:nix-community/plasma-manager/trunk";
2024-06-24 21:53:35 +02:00
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 22:35:21 +02:00
users.rachel = import ./home-manager/all.nix {
2024-06-24 21:53:35 +02:00
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;
2024-06-25 12:11:51 +02:00
rc2nix = plasma-manager.packages.${system}.rc2nix;
2024-06-24 21:53:35 +02:00
sax2nf = self.packages.${system}.sax2nf;
bqn-vim = self.packages.${system}.bqn-vim;
bqn-nvim = self.packages.${system}.bqn-nvim;
shell-menu = self.packages.${system}.shell-menu;
2024-06-25 12:11:51 +02:00
pash = self.packages.${system}.pash;
cpypsk = self.packages.${system}.cpypsk;
2024-06-24 21:53:35 +02:00
};
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 ++ [
2024-06-24 22:35:21 +02:00
./nixos/lambda/configuration.nix
./nixos/shared/user-system.nix
./nixos/shared/graphical.nix
2024-06-24 21:53:35 +02:00
(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 ++ [
2024-06-24 22:35:21 +02:00
./nixos/computational/configuration.nix
./nixos/shared/user-system.nix
./nixos/shared/graphical.nix
2024-06-24 21:53:35 +02:00
(rachel-home-module system)
2023-08-19 16:58:57 +02:00
];
};
2024-06-24 22:35:21 +02:00
keyboardLayouts.fox = ./resources/fox.xkb;
keyboardLayouts.sus = ./resources/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 {
2024-06-25 12:11:51 +02:00
packages = rec {
2024-06-24 21:53:35 +02:00
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; };
2024-06-25 12:11:51 +02:00
pash = import ./pkgs/pash.nix { inherit pkgs; };
cpypsk = import ./pkgs/cpypsk.nix { inherit pkgs pash; };
2024-06-24 21:53:35 +02:00
};
});
2023-07-31 14:18:02 +02:00
}