Files
dotfiles/flake.nix
Lennart J. Kurzweg (Nx2) f2dae2ee81 massive refactor
2026-01-13 00:35:27 +01:00

89 lines
3.3 KiB
Nix

{
description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixpkgs-latest.url = "github:nixos/nixpkgs?ref=master";
nixpkgs24.url = "github:NixOS/nixpkgs/nixos-24.05";
home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; };
home-manager24 = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs24"; };
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-24.05";
inputs = { nixpkgs.follows = "nixpkgs24"; home-manager.follows = "home-manager24"; };
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
yazi.url = "github:sxyazi/yazi";
copyparty.url = "github:9001/copyparty";
};
outputs = { ... }@inputs: with inputs; let
system = "x86_64-linux";
simple-pkgs = import nixpkgs { inherit system; };
get-pkgs = import ./flake-modules/pkgs.nix inputs simple-pkgs;
get-hyper = import ./flake-modules/hyper.nix;
secrets = import ./git-crypt/secrets.nix;
get-rice = import ./flake-modules/rice.nix simple-pkgs;
in {
nixosConfigurations = let
make-nixos-system = host: let
hyper = get-hyper host;
rice = get-rice hyeper;
in nixpkgs.lib.nixosSystem {
pkgs = get-pkgs hyper;
modules = [ ./configuration.nix ];
specialArgs = { inherit inputs hyper rice secrets; };
};
make-nixos-wsl-system = host: let hyper = get-hyper host; in nixpkgs.lib.nixosSystem {
pkgs = get-pkgs hyper;
modules = [ ./wsl.nix ];
specialArgs = { inherit inputs hyper rice; };
};
in {
NxNORTH = make-nixos-system "NxNORTH";
NxXPS = make-nixos-system "NxXPS";
NxACE = make-nixos-system "NxACE";
NxDCS = make-nixos-wsl-system "NxDCS";
};
nixOnDroidConfigurations = let
makeNODConfiguration = host: nix-on-droid.lib.nixOnDroidConfiguration rec {
hyper = get-hyper host;
pkgs = get-pkgs hyper;
modules = [ ./nod.nix ];
home-manager-path = home-manager24.outPath;
extraSpecialArgs = { inherit inputs hyper rice; };
};
in { NxS23U = makeNODConfiguration "NxS23U"; };
homeConfigurations = let
make-home-configuration = host: let
hyper = get-hyper host;
rice = get-rice hyper;
in home-manager.lib.homeManagerConfiguration {
pkgs = get-pkgs hyper;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs hyper rice secrets; };
};
make-shell-configuration = host: let hyper = get-hyper host; in home-manager.lib.homeManagerConfiguration {
pkgs = get-pkgs hyper;
modules = [ ./shell-only.nix ];
extraSpecialArgs = { inherit inputs hyper rice secrets; };
};
in {
"nx2@NxXPS" = make-home-configuration "NxXPS";
"nx2@NxNORTH" = make-home-configuration "NxNORTH";
"nx2@NxACE" = make-home-configuration "NxACE";
"nx2@NxDCS" = make-shell-configuration "NxDCS";
};
};
}