NixOS-Config/flake.nix

137 lines
4.2 KiB
Nix
Raw Normal View History

2024-08-24 22:16:51 -04:00
{
description = "Jimbo's systems as a flake";
2024-08-24 22:16:51 -04:00
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
2024-09-23 11:41:28 -04:00
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";
2024-09-23 11:41:28 -04:00
minecraft.url = "github:Infinidoge/nix-minecraft";
hardware.url = "github:nixos/nixos-hardware/master";
2024-08-24 22:16:51 -04:00
# Secure boot
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-08-24 22:16:51 -04:00
# Home manager
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
2024-08-24 22:16:51 -04:00
nur,
2024-09-23 11:41:28 -04:00
mailserver,
2024-08-27 05:14:19 -04:00
blender-bin,
2024-09-23 11:41:28 -04:00
hardware,
lanzaboote,
home-manager,
2024-08-24 22:16:51 -04:00
...
} @inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
2024-08-24 22:16:51 -04:00
"x86_64-linux"
];
in rec {
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
2024-09-23 14:41:31 -04:00
packages = forAllSystems (system: import ./extras/pkgs nixpkgs.legacyPackages.${system});
2024-08-24 22:16:51 -04:00
# Your custom packages and modifications, exported as overlays
2024-10-11 22:22:24 -04:00
overlays = [
(import ./extras/overlays.nix {inherit inputs;})
];
2024-08-24 22:16:51 -04:00
2024-09-23 16:22:01 -04:00
# 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'
2024-08-24 22:16:51 -04:00
nixosConfigurations = {
JimDesktop = nixpkgs.lib.nixosSystem {
2024-08-24 22:16:51 -04:00
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimDesktop/configuration.nix
lanzaboote.nixosModules.lanzaboote
2024-08-24 22:16:51 -04:00
];
};
JimServer = nixpkgs.lib.nixosSystem {
2024-08-24 22:16:51 -04:00
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimServer/configuration.nix
2024-09-23 11:41:28 -04:00
mailserver.nixosModule
2024-08-24 22:16:51 -04:00
];
};
2024-09-22 14:46:51 -04:00
JimPine = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimPine/configuration.nix
2024-09-23 11:41:28 -04:00
hardware.nixosModules.pine64-pinebook-pro
2024-09-22 14:46:51 -04:00
];
};
2024-09-08 21:45:54 -04:00
JimLenovo = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimLenovo/configuration.nix
2024-09-08 21:45:54 -04:00
];
};
2024-08-24 22:16:51 -04:00
};
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
2024-08-24 22:16:51 -04:00
homeConfigurations = {
"jimbo@JimDesktop" = home-manager.lib.homeManagerConfiguration {
2024-08-24 22:16:51 -04:00
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimDesktop/home.nix
2024-08-24 22:16:51 -04:00
nur.nixosModules.nur
];
};
"jimbo@JimServer" = home-manager.lib.homeManagerConfiguration {
2024-08-24 22:16:51 -04:00
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimServer/home.nix
2024-08-24 22:16:51 -04:00
];
};
2024-09-22 14:46:51 -04:00
"jimbo@JimPine" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimPine/home.nix
2024-09-22 14:46:51 -04:00
nur.nixosModules.nur
];
};
2024-09-08 21:45:54 -04:00
"jimbo@JimLenovo" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimLenovo/home.nix
2024-09-08 21:45:54 -04:00
nur.nixosModules.nur
];
};
# Derivation for ssh envrionments on other people's servers
"jimbo@JimTerminal" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimTerminal/home.nix
];
};
2024-08-24 22:16:51 -04:00
};
};
}