NixOS-Config/flake.nix

94 lines
2.7 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.url = "github:nixos/nixpkgs/nixos-24.05";
2024-10-09 03:36:08 -04:00
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2024-08-24 22:16:51 -04:00
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
2024-10-09 03:36:08 -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,
2024-10-09 03:36:08 -04:00
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,
2024-10-09 03:36:08 -04:00
lanzaboote,
home-manager,
2024-08-24 22:16:51 -04:00
...
}@inputs: let
mkNixos = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = { inherit (self) inputs outputs; };
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = { inherit (self) inputs outputs; };
};
in {
2024-10-12 20:44:05 -04:00
# Variables defined so they can be accessed globally
secrets = import ./variables/secrets;
displays = import ./variables/displays;
ips = import ./variables/ips;
look = import ./variables/look;
ws = import ./variables/workspaces;
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
2024-08-24 22:16:51 -04:00
nixosConfigurations = {
firefly = mkNixos [
./hosts/firefly/system
lanzaboote.nixosModules.lanzaboote
];
cyberspark = mkNixos [
./system/hosts/JimServer/configuration.nix
mailserver.nixosModule
];
shuttleworth = mkNixos [
./system/hosts/JimPine/configuration.nix
hardware.nixosModules.pine64-pinebook-pro
];
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@firefly" = mkHome [
./hosts/firefly/home
nur.nixosModules.nur
] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@cyberspark" = mkHome [
./home/hosts/JimServer/home.nix
] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@shuttleworth" = mkHome [
./home/hosts/JimPine/home.nix
nur.nixosModules.nur
] nixpkgs.legacyPackages.aarch64-linux;
# Profile for ssh envrionments on different non-root systems
"jimbo@terminal" = mkHome [
./home/hosts/JimTerminal/home.nix
] nixpkgs.legacyPackages.x86_64-linux;
2024-08-24 22:16:51 -04:00
};
};
}