113 lines
5.2 KiB
Nix
113 lines
5.2 KiB
Nix
{
|
|
description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
|
|
|
|
inputs = {
|
|
nixpkgs = { url = "nixpkgs/nixos-25.05"; };
|
|
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
|
|
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
|
|
|
|
home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; };
|
|
|
|
nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; };
|
|
nix-on-droid = { url = "github:nix-community/nix-on-droid/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
|
|
|
|
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"; };
|
|
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
|
|
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
|
|
|
|
yazi = { url = "github:sxyazi/yazi"; };
|
|
yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; };
|
|
zen-browser = { url = "github:MarceColl/zen-browser-flake"; };
|
|
ghostty = { url = "github:ghostty-org/ghostty"; };
|
|
};
|
|
|
|
outputs = { self, ... }@inputs: with inputs; let
|
|
|
|
system = "x86_64-linux";
|
|
config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
|
|
|
|
hyper-base = rec {
|
|
inherit system;
|
|
user = "nx2";
|
|
domain = "nx2.site";
|
|
home = "/home/${user}/";
|
|
};
|
|
|
|
pkgs = import nixpkgs { inherit system config; } // {
|
|
unstable = import nixpkgs-unstable { inherit system config; };
|
|
latest = import nixpkgs-latest { inherit system config; };
|
|
version = "25.05";
|
|
};
|
|
|
|
nvidia-base = import ./flake-modules/nvidia.nix;
|
|
secrets = import ./git-crypt/secrets.nix;
|
|
rice = import ./flake-modules/rice.nix pkgs;
|
|
|
|
in {
|
|
nixosConfigurations = let
|
|
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [ ./configuration.nix ];
|
|
specialArgs = let
|
|
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
|
|
in { inherit pkgs inputs hyper rice secrets; };
|
|
};
|
|
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [ ./nixos-wsl.nix ];
|
|
specialArgs = let
|
|
hyper = hyper-base // { inherit host; };
|
|
in { inherit pkgs inputs hyper rice; };
|
|
};
|
|
make-nixondroid-system = host: nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [ ./nix-on-droid.nix ];
|
|
specialArgs = let
|
|
pkgs.version = "24.05";
|
|
hyper = hyper-base // {
|
|
inherit host;
|
|
system = "aarch64-linux";
|
|
home = assert 1 == 2; "";
|
|
};
|
|
in { inherit pkgs inputs hyper rice; };
|
|
};
|
|
in {
|
|
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };
|
|
NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; };
|
|
NxACE = make-nixos-system "NxACE" { enable = false; };
|
|
|
|
NxWSL = make-nixos-wsl-system "NxWSL";
|
|
|
|
NxS23U = make-nixondroid-system "NxS23U";
|
|
};
|
|
|
|
homeConfigurations = let
|
|
make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [ ./home.nix ];
|
|
extraSpecialArgs = let
|
|
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
|
|
in { inherit pkgs inputs hyper rice secrets; };
|
|
};
|
|
make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [ ./shell-only.nix ];
|
|
extraSpecialArgs = let
|
|
hyper = hyper-base // { inherit host; };
|
|
in { inherit pkgs inputs hyper rice secrets; };
|
|
};
|
|
in {
|
|
"${hyper-base.user}@NxXPS" = make-home-configuration "NxXPS" hyper-base.user { enable = true; prime = true; };
|
|
"${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; };
|
|
"${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; };
|
|
|
|
"${hyper-base.user}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user;
|
|
|
|
"${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
|
|
};
|
|
};
|
|
}
|