{ description = "My various NixOS configurations"; inputs = { nixpkgs.url = "github:NixOs/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:NixOs/nixpkgs/nixos-unstable"; 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.7.0"; inputs.nixpkgs.follows = "nixpkgs"; }; cornelis = { url = "github:isovector/cornelis/"; inputs.nixpkgs.follows = "nixpkgs"; }; nixprof = { url = "github:Kha/nixprof"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; plasma-manager = { url = "github:nix-community/plasma-manager/trunk"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; }; outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agda, cornelis, plasma-manager, flake-utils, nixprof }: let nix-config-module = { nix.registry.nixpkgs.flake = nixpkgs; nix.registry.unstable.flake = nixpkgs-unstable; system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; }; rachel-home-module = system: { home-manager = { sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; useGlobalPkgs = true; useUserPackages = true; users.rachel = import ./home-manager/all.nix { pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; unstable = import nixpkgs-unstable { inherit system; config.allowUnfree = true; }; extra = { agda = agda.packages.${system}.default; cornelis = cornelis.packages.${system}.cornelis; cornelis-vim = cornelis.packages.${system}.cornelis-vim; rc2nix = plasma-manager.packages.${system}.rc2nix; nixprof = nixprof.packages.${system}.nixprof; 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; pash = self.packages.${system}.pash; cpypsk = self.packages.${system}.cpypsk; renoise = self.packages.${system}.renoise; wall = self.packages.${system}.wall; protonmail-desktop = self.packages.${system}.protonmail-desktop; eyezoom = self.packages.${system}.eyezoom; }; }; }; }; base-modules = [ nix-config-module home-manager.nixosModules.home-manager ]; in { nixosConfigurations.lambda = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = base-modules ++ [ ./nixos/lambda/configuration.nix ./nixos/shared/user-system.nix ./nixos/shared/graphical.nix (rachel-home-module system) ]; }; nixosConfigurations.transient = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = base-modules ++ [ ./nixos/transient/configuration.nix ./nixos/shared/user-system.nix ./nixos/shared/graphical.nix (rachel-home-module system) ]; }; nixosConfigurations.computational = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = base-modules ++ [ ./nixos/computational/configuration.nix ./nixos/shared/user-system.nix ./nixos/shared/graphical.nix (rachel-home-module system) ]; }; keyboardLayouts.fox = ./resources/fox.xkb; keyboardLayouts.sus = ./resources/fox.xkb; } // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; in { packages = rec { 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; }; pash = import ./pkgs/pash.nix { inherit pkgs; }; cpypsk = import ./pkgs/cpypsk.nix { inherit pkgs pash; }; renoise = import ./pkgs/renoise.nix { inherit pkgs; }; wall = import ./pkgs/wall.nix { inherit pkgs; }; protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; }; eyezoom = import ./pkgs/eyezoom.nix { inherit pkgs; }; }; }); }