200 lines
7 KiB
Nix
200 lines
7 KiB
Nix
{
|
|
description = "Your new nix config";
|
|
|
|
inputs = {
|
|
lix-module = {
|
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Nixpkgs (usually unstable)
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
# Home manageKr
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Darwin & Apple Silicon tools
|
|
apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
|
|
|
|
# Secrets
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
#sops-nix-darwin.url = "github:Kloenk/sops-nix?ref=darwin";
|
|
|
|
# Fancy stuff
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
# Pro gamer move
|
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
# Iceshrimpy
|
|
iceshrimp = {
|
|
url = "git+https://iceshrimp.dev/iceshrimp/packaging?dir=iceshrimp-js";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
iceshrimp-withdrawal = {
|
|
url = "git+https://iceshrimp.dev/noe/withdrawal";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
inputs.iceshrimp.follows = "iceshrimp";
|
|
};
|
|
|
|
# PiHole
|
|
pihole = {
|
|
url = "git+https://git.sapphic.engineer/noe/pihole-flake";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
inputs.linger.follows = "linger";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
linger = {
|
|
url = "github:mindsbackyard/linger-flake";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
# Self
|
|
noe-sh = {
|
|
url = "git+https://git.sapphic.engineer/noe/noe.sh";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
doll-repair = {
|
|
url = "git+https://codeberg.org/noe/doll.repair";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
tachikoma = {
|
|
url = "git+https://git.sapphic.engineer/noe/tachikoma";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
fedi-emotes = {
|
|
url = "git+https://git.sapphic.engineer/noe/emotes";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
lightrunner-emotes = {
|
|
url = "git+https://git.sapphic.engineer/noe/lightrunner-emotes";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
plapkit = {
|
|
url = "git+https://git.sapphic.engineer/noe/plapkit";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
saerro = {
|
|
url = "git+https://git.sapphic.engineer/ps2.live/saerro-go";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-substituters = [
|
|
"https://nix-community.cachix.org"
|
|
"https://0uptime.cachix.org"
|
|
];
|
|
|
|
extra-trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"0uptime.cachix.org-1:ctw8yknBLg9cZBdqss+5krAem0sHYdISkw/IFdRbYdE="
|
|
];
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, lix-module, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
"aarch64-linux"
|
|
"i686-linux"
|
|
"x86_64-linux"
|
|
];
|
|
|
|
mkNixos = modules: nixpkgs.lib.nixosSystem {
|
|
modules = [ lix-module.nixosModules.lixFromNixpkgs ] ++ modules;
|
|
specialArgs = { inherit inputs outputs; };
|
|
};
|
|
|
|
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
|
|
inherit modules pkgs;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
in {
|
|
# Your custom packages
|
|
# Acessible through 'nix build', 'nix shell', etc
|
|
packages = forAllSystems (system:
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
in import ./pkgs { inherit pkgs; } //
|
|
{
|
|
proxmox-lxc = inputs.nixos-generators.nixosGenerate {
|
|
inherit system pkgs;
|
|
modules = [
|
|
./nixos/templates/proxmox-lxc.nix
|
|
];
|
|
format = "proxmox-lxc";
|
|
};
|
|
|
|
rpi-streambox = inputs.nixos-generators.nixosGenerate {
|
|
inherit system pkgs;
|
|
modules = [
|
|
./nixos/hosts/streambox
|
|
];
|
|
format = "sd-aarch64";
|
|
};
|
|
}
|
|
);
|
|
|
|
# Devshell for bootstrapping
|
|
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
|
devShells = forAllSystems (system:
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
in import ./shell.nix { inherit pkgs; }
|
|
);
|
|
|
|
# Your custom packages and modifications, exported as overlays
|
|
overlays = import ./overlays { inherit inputs; };
|
|
|
|
# Reusable nixos modules you might want to export
|
|
# These are usually stuff you would upstream into nixpkgs
|
|
nixosModules = import ./modules/nixos;
|
|
|
|
# Reusable home-manager modules you might want to export
|
|
# These are usually stuff you would upstream into home-manager
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
# NixOS configuration entrypoint
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
aerial = mkNixos [ ./nixos/hosts/aerial ]; # desktop
|
|
cider = mkNixos [ ./nixos/hosts/cider ]; # asahi m2 mba
|
|
dis-sociat-ing = mkNixos [ ./nixos/hosts/dis-sociat-ing ]; # Iceshrimp+Withdrawl, dis.sociat.ing
|
|
drone = mkNixos [ ./nixos/hosts/drone ]; # spectre x360
|
|
exit-node = mkNixos [ ./nixos/hosts/exit-node ]; # lab jump
|
|
git = mkNixos [ ./nixos/hosts/git ]; # Forgejo Host
|
|
ingress-proxy = mkNixos [ ./nixos/hosts/ingress-proxy ]; # nginx edge proxy
|
|
jitsi = mkNixos [ ./nixos/hosts/jitsi ]; # jitsi meet
|
|
monitoring = mkNixos [ ./nixos/hosts/monitoring ]; # Grafana, Prometheus, Jaeger, etc
|
|
mumble = mkNixos [ ./nixos/hosts/mumble ]; # mumble
|
|
nas0 = mkNixos [ ./nixos/hosts/nas0 ]; # SMB/NFS NAS
|
|
nextcloud = mkNixos [ ./nixos/hosts/nextcloud ]; # nextcloud
|
|
pihole = mkNixos [ ./nixos/hosts/pihole ]; # PiHole!
|
|
plex = mkNixos [ ./nixos/hosts/plex ]; # plex
|
|
porcelain-doll-repair = mkNixos [ ./nixos/hosts/porcelain-doll-repair ]; # Iceshrimp+Withdrawl, porcelain.doll.repair
|
|
ps2live = mkNixos [ ./nixos/hosts/ps2live ]; # PS2.LIVE stack + planetside stuff
|
|
sapphic-engineer = mkNixos [ ./nixos/hosts/sapphic-engineer ]; # Akkoma, sapphic.engineer
|
|
seedbox = mkNixos [ ./nixos/hosts/seedbox ]; # fuck
|
|
static-sites = mkNixos [ ./nixos/hosts/static-sites ]; # nginx specifically for static sites
|
|
streambox = mkNixos [ ./nixos/hosts/streambox ]; # lil rpi
|
|
thonkpad = mkNixos [ ./nixos/hosts/thonkpad ]; # t480
|
|
ts3 = mkNixos [ ./nixos/hosts/ts3 ]; # Teamspeak-san
|
|
};
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
# TODO: add generic standalone home-manager config
|
|
};
|
|
};
|
|
}
|
|
|