Nix-Config/flake.nix

132 lines
4.3 KiB
Nix

{
description = "~tsv's system config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
devenv.url = "github:cachix/devenv/latest";
hyprland.url = "github:hyprwm/Hyprland";
hyprcontrib.url = "github:hyprwm/contrib";
flake-utils.url = "github:numtide/flake-utils";
codeium = {
url = "github:jcdickinson/codeium.nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, devenv, hyprland, hyprcontrib, codeium, ... }: {
nixosConfigurations = {
######################################################################################
# ritchie (Work laptop)
# Named after Dennis Ritchie, co-creator of UNIX and C
######################################################################################
ritchie = nixpkgs.lib.nixosSystem { # My work machine
system = "x86_64-linux";
specialArgs.inputs = inputs;
modules = [
./system/ritchie/ritchie.nix
hyprland.nixosModules.default
{
programs.hyprland = {
enable = true;
enableNvidiaPatches = true;
xwayland = {
enable = true;
};
};
}
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.tsv = import users/tsv/ritchie.nix;
users.foxsoft = import users/foxsoft/home.nix;
users.root = import users/root/home.nix;
};
}
];
};
######################################################################################
# thompson (Personl laptop)
# Named after Ken Thompson, co-creator of UNIX and C
######################################################################################
thompson = nixpkgs.lib.nixosSystem { # My personal laptop
system = "x86_64-linux";
specialArgs.inputs = inputs;
modules = [
./system/thompson/thompson.nix
hyprland.nixosModules.default
{
programs.hyprland = {
enable = true;
enableNvidiaPatches = true;
xwayland = {
enable = true;
};
};
}
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.tsv = import users/tsv/thompson.nix;
};
}
];
};
######################################################################################
# kernighan (VPS hosted with Hetzner)
# Named after Brian Kernighan, key UNIX figure and author
######################################################################################
kernighan = nixpkgs.lib.nixosSystem { # Pi home server
system = "aarch64-linux";
specialArgs.inputs = inputs;
modules = [
./system/kernighan/kernighan.nix
];
};
######################################################################################
# miyamoto (Butchered laptop—music and games for the kids
# Named after Shigery Miyamoto, creator of Donkey Kong, Mario and X
######################################################################################
miyamoto = nixpkgs.lib.nixosSystem { # Kid's game and music box
system = "x86_64-linux";
specialArgs.inputs = inputs;
modules = [
./system/miyamoto/miyamoto.nix
];
};
######################################################################################
# Other, non-Nix systems (for completeness/documentation):
# mcilroy (printer)
# Named after Doug McIlroy, who proposed UNIX pipes, developed a bunch of UNIX stuff
# and wrote one iteration of roff.
# Home Assistant on a Raspberry Pi 4
# Todo:
# Internet Radio
# Kids laptop
######################################################################################
};
};
}