nixos/flake.nix

246 lines
9.0 KiB
Nix
Raw Permalink Normal View History

2024-03-26 12:04:52 -08:00
# vim: set foldlevel=0 foldmethod=marker foldenable :
2024-02-25 15:34:13 -09:00
{
description = "NixOS configuration with Home Manager";
inputs = {
2024-06-04 13:43:36 -08:00
nixpkgs.url = "github:nixos/nixpkgs/24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2024-03-02 10:31:42 -09:00
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
2024-03-03 09:25:54 -09:00
inputs.nixpkgs.follows = "nixpkgs-unstable";
2024-03-02 10:31:42 -09:00
};
2024-05-05 21:28:20 -08:00
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
2024-05-05 21:28:20 -08:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-13 12:30:08 -08:00
nix-ld = {
url = "github:Mic92/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = github:nix-community/NUR;
2024-02-25 15:34:13 -09:00
home-manager = {
2024-06-04 13:43:36 -08:00
url = "github:nix-community/home-manager/release-24.05";
2024-03-03 09:25:54 -09:00
inputs.nixpkgs.follows = "nixpkgs";
2024-02-25 15:34:13 -09:00
};
home-manager-unstable = {
url = "github:nix-community/home-manager"; #/release-23.11";
2024-03-03 09:25:54 -09:00
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
displaylink = {
url = "file+https://marq42.xyz/displaylink-580.zip";
flake = false;
};
2024-02-25 15:34:13 -09:00
};
outputs = inputs@{
2024-05-05 21:28:20 -08:00
self,
nixpkgs,
nixpkgs-unstable,
lix-module,
2024-09-13 12:30:08 -08:00
nix-ld,
2024-05-05 21:28:20 -08:00
home-manager,
nur,
... }: {
2024-11-29 13:11:00 -09:00
homeManagerConfigurations.soundblaster =
# import ./home.nix {
# inherit nixpkgs lix-module nix-ld home-manager nur;
# }
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# configuration = { pkgs, lib, ... }: {
# imports = [ ./home.nix ];
# nixpkgs = {
# config = { allowUnfree = true; };
# };
# };
modules = [
./home.nix {
home = {
username = "mir";
homeDirectory = "/home/mir";
};
}
];
};
2024-05-05 21:28:20 -08:00
nixosConfigurations = {
2024-11-29 13:11:00 -09:00
2024-05-05 21:28:20 -08:00
kremzeek = # {{{
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix" {
networking.wireless.enable = false;
}
./configuration.nix {
networking.hostName = "kremzeek";
boot.loader.efi.canTouchEfiVariables = true;
# sound.enable = true;
# hardware.pulseaudio.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 = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" ];
boot.binfmt.emulatedSystems = ["x86_64-linux"];
hardware.asahi = {
peripheralFirmwareDirectory = ./galvatron/firmware;
# useExperimentalGPUDriver = true;
2024-07-13 12:42:30 -08:00
experimentalGPUInstallMode = "driver";
2024-05-05 21:28:20 -08:00
# experimentalGPUInstallMode = "overlay";
};
boot.loader.efi.canTouchEfiVariables = false;
networking = {
hostName = "galvatron";
hostId = "57184c38";
};
sound.enable = true; # only on unstable?
}
./hardware/galvatron-hw.nix
./modules/sound/pipewire.nix
inputs.apple-silicon.nixosModules.apple-silicon-support
2024-06-04 13:43:36 -08:00
inputs.home-manager.nixosModules.home-manager {
2024-05-05 21:28:20 -08:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
2024-06-04 13:43:36 -08:00
nixpkgs.lib.nixosSystem {inherit system modules specialArgs; }; # }}}
2024-05-05 21:28:20 -08:00
breakdown = # {{{
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
./configuration.nix {
networking = {
hostName = "breakdown";
hostId = "3ba70c47";
};
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
./server/services.nix
# ./hardware/breakdown-hw.nix
./hardware/generic.nix
./modules/sound/pipewire.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 = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" "displaylink" ];
2024-05-28 13:03:44 -08:00
networking = {
hostName = "starscream";
hostId = "45ca7150";
};
2024-05-05 21:28:20 -08:00
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
./hardware/starscream-hw.nix
./modules/sound/pipewire.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 = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
# inputs.nur.nixosModules.nur
lix-module.nixosModules.default
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" "displaylink" ];
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostName = "knockout";
hostId = "499130bf";
};
sound.enable = true;
}
./modules/droidcam-obs.nix # only this machine
./hardware/knockout-hw.nix
./modules/sound/pipewire.nix
2024-06-04 13:43:36 -08:00
inputs.home-manager.nixosModules.home-manager
2024-05-05 21:28:20 -08:00
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mir = import ./home.nix;
home-manager.extraSpecialArgs = specialArgs;
}
]; # end of modules
in
2024-06-04 13:43:36 -08:00
inputs.nixpkgs.lib.nixosSystem {inherit system modules specialArgs; }; # }}}
2024-04-15 15:22:43 -08:00
2024-05-05 21:28:20 -08:00
ravage = # {{{
let
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
2024-09-13 12:30:08 -08:00
nix-ld.nixosModules.nix-ld
2024-05-05 21:28:20 -08:00
./configuration.nix {
services.xserver.videoDrivers = [ "modesetting" "displaylink" ];
networking = {
hostName = "ravage";
hostId = "c53d3e32";
};
boot.loader.efi.canTouchEfiVariables = true;
sound.enable = true;
}
./hardware/ravage-hw.nix
./modules/sound/pipewire.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; }; # }}}
};
};
2024-02-25 15:34:13 -09:00
}
2024-05-28 13:03:44 -08:00