99 lines
2.9 KiB
Nix
99 lines
2.9 KiB
Nix
{
|
|
description = "Jimbo's systems as a flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nur.url = "github:nix-community/NUR";
|
|
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
|
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz";
|
|
minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
hardware.url = "github:nixos/nixos-hardware/master";
|
|
|
|
# Secure boot
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Home manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
nur,
|
|
mailserver,
|
|
blender-bin,
|
|
hardware,
|
|
lanzaboote,
|
|
home-manager,
|
|
...
|
|
} @inputs: let
|
|
inherit (self) outputs;
|
|
mkNixos = modules: nixpkgs.lib.nixosSystem {
|
|
inherit modules;
|
|
specialArgs = { inherit inputs outputs; };
|
|
};
|
|
|
|
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
|
|
inherit modules pkgs;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
in rec {
|
|
# Your custom packages and modifications, exported as overlays
|
|
overlays = import ./extras/overlays.nix { inherit inputs; };
|
|
|
|
# Variables defined so they can be accessed globally
|
|
secrets = import ./extras/secrets.nix;
|
|
cmd = import ./extras/cmd.nix;
|
|
displays = import ./extras/displays.nix;
|
|
ips = import ./extras/ips.nix;
|
|
look = import ./extras/look.nix;
|
|
ws = import ./extras/workspaces.nix;
|
|
|
|
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
JimDesktop = mkNixos [
|
|
./system/hosts/JimDesktop/configuration.nix
|
|
lanzaboote.nixosModules.lanzaboote
|
|
];
|
|
JimServer = mkNixos [
|
|
./system/hosts/JimServer/configuration.nix
|
|
mailserver.nixosModule
|
|
];
|
|
JimPine = mkNixos [
|
|
./system/hosts/JimPine/configuration.nix
|
|
hardware.nixosModules.pine64-pinebook-pro
|
|
];
|
|
};
|
|
|
|
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
"jimbo@JimDesktop" = mkHome [
|
|
./home/hosts/JimDesktop/home.nix
|
|
nur.nixosModules.nur
|
|
] nixpkgs.legacyPackages."x86_64-linux";
|
|
|
|
"jimbo@JimServer" = mkHome [
|
|
./home/hosts/JimServer/home.nix
|
|
] nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
"jimbo@JimPine" = mkHome [
|
|
./home/hosts/JimPine/home.nix
|
|
nur.nixosModules.nur
|
|
] nixpkgs.legacyPackages.aarch64-linux;
|
|
|
|
# Derivation for ssh envrionments on other people's servers
|
|
"jimbo@JimTerminal" = mkHome [
|
|
./home/hosts/JimTerminal/home.nix
|
|
] nixpkgs.legacyPackages.x86_64-linux;
|
|
};
|
|
};
|
|
}
|