nixos/flake.nix
2024-03-23 12:36:51 -08:00

155 lines
5.2 KiB
Nix

{
description = "NixOS configuration with Home Manager";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager"; #/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
emacs-config = {
url = "git+https://git.marq42.xyz/mir/emacs?ref=main";
flake = false;
};
displaylink = {
url = "file+https://marq42.xyz/displaylink-580.zip";
flake = false;
};
};
outputs = inputs@{
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
... }: {
nixosConfigurations = {
kremzeek =
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" {
networking.wireless.enable = false;
}
./configuration.nix {
networking.hostName = "kremzeek";
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
nixpkgs.lib.nixosSystem {inherit system modules specialArgs; };
galvatron =
let
system = "aarch64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" ];
boot.binfmt.emulatedSystems = ["x86_64-linux"];
hardware.asahi = {
peripheralFirmwareDirectory = ./galvatron/firmware;
# useExperimentalGPUDriver = true;
# experimentalGPUInstallMode = "driver";
# experimentalGPUInstallMode = "overlay";
};
boot.loader.efi.canTouchEfiVariables = false;
networking.hostName = "galvatron";
sound.enable = true; # only on unstable?
}
./galvatron/hardware-configuration.nix
inputs.apple-silicon.nixosModules.apple-silicon-support
inputs.home-manager-unstable.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
nixpkgs-unstable.lib.nixosSystem {inherit system modules specialArgs; };
breakdown =
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix {
networking.hostName = "breakdown";
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
./server/services.nix
./hardware/breakdown-hw.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
nixpkgs.lib.nixosSystem {inherit system modules specialArgs; };
starscream =
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" "displaylink" ];
networking.hostName = "starscream";
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
./hardware/starscream-hw.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
nixpkgs.lib.nixosSystem {inherit system modules specialArgs; };
knockout =
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" "displaylink" ];
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "knockout";
sound.enable = true;
}
./hardware/knockout-hw.nix
inputs.home-manager-unstable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
inputs.nixpkgs-unstable.lib.nixosSystem {inherit system modules specialArgs; };
};
};
}