nixos-config/flake.nix

129 lines
4.7 KiB
Nix
Raw Normal View History

2023-07-31 14:27:24 +02:00
{
2023-07-31 14:18:02 +02:00
2024-07-10 19:10:18 +02:00
description = "My various NixOS configurations";
2023-07-31 14:18:02 +02:00
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 = {
2024-08-23 22:07:47 +02:00
url = "github:agda/agda/v2.7.0";
2024-06-24 21:53:35 +02:00
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";
};
2024-07-03 19:13:15 +02:00
nixprof = {
url = "github:Kha/nixprof";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
2024-06-24 21:53:35 +02:00
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-07-12 13:11:21 +02:00
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agda, cornelis, ssbm-nix, plasma-manager, flake-utils, nixprof }:
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 {
2024-06-25 13:57:09 +02:00
inherit system;
2024-06-24 21:53:35 +02:00
config.allowUnfree = true;
};
2024-04-26 15:21:28 +02:00
unstable = import nixpkgs-unstable {
2024-06-25 13:57:09 +02:00
inherit system;
2024-04-26 15:21:28 +02:00
config.allowUnfree = true;
};
2024-06-24 21:53:35 +02:00
extra = {
2024-08-23 22:07:47 +02:00
agda = agda.packages.${system}.default;
2024-06-24 21:53:35 +02:00
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-07-03 19:13:15 +02:00
nixprof = nixprof.packages.${system}.nixprof;
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-25 13:57:09 +02:00
renoise = self.packages.${system}.renoise;
2024-06-25 16:01:07 +02:00
wall = self.packages.${system}.wall;
2024-07-26 18:21:36 +02:00
protonmail-desktop = self.packages.${system}.protonmail-desktop;
2024-09-15 19:45:05 +02:00
eyezoom = self.packages.${system}.eyezoom;
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:
2024-06-25 13:57:09 +02:00
let pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
2024-06-24 21:53:35 +02:00
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-25 13:57:09 +02:00
renoise = import ./pkgs/renoise.nix { inherit pkgs; };
2024-06-25 16:01:07 +02:00
wall = import ./pkgs/wall.nix { inherit pkgs; };
2024-07-26 18:21:36 +02:00
protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; };
2024-09-15 19:45:05 +02:00
eyezoom = import ./pkgs/eyezoom.nix { inherit pkgs; };
2024-06-24 21:53:35 +02:00
};
});
2023-07-31 14:18:02 +02:00
}