nod
This commit is contained in:
45
flake.nix
45
flake.nix
@@ -8,7 +8,11 @@
|
||||
|
||||
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 = "nixpkgs24"; };
|
||||
nixpkgs24 = { url = "github:NixOS/nixpkgs/nixos-24.05"; };
|
||||
home-manager-nod = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs24"; };
|
||||
|
||||
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"; };
|
||||
@@ -28,20 +32,19 @@
|
||||
config = { allowUnfreePredicate = pkg: builtins.elem (simple-pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
|
||||
|
||||
hyper-base = rec {
|
||||
inherit system;
|
||||
system = "x86_64-linux";
|
||||
user = "nx2";
|
||||
domain = "nx2.site";
|
||||
home = "/home/${user}/";
|
||||
home = "/home/${user}";
|
||||
webroot = "/var/lib/hugo/nx2site/public";
|
||||
pkgs-version = "25.05";
|
||||
};
|
||||
|
||||
my-pkgs = host: import nixpkgs {
|
||||
get-pkgs = { host, system?system, nixpkgs?inputs.nixpkgs, version?"25.05" }: import nixpkgs {
|
||||
inherit system config;
|
||||
overlays = [(final: prev: {
|
||||
unstable = import nixpkgs-unstable { inherit system config; };
|
||||
latest = import nixpkgs-latest { inherit system config; };
|
||||
version = "25.05";
|
||||
inherit version;
|
||||
})] ++ (if host == "NxACE" then [
|
||||
copyparty.overlays.default
|
||||
] else []);
|
||||
@@ -53,17 +56,18 @@
|
||||
in {
|
||||
nixosConfigurations = let
|
||||
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
|
||||
pkgs = my-pkgs host;
|
||||
pkgs = get-pkgs { inherit host; };
|
||||
modules = [ ./configuration.nix ];
|
||||
specialArgs = let
|
||||
hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); };
|
||||
in { inherit inputs hyper rice secrets; };
|
||||
};
|
||||
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
|
||||
pkgs = my-pkgs host;
|
||||
pkgs = get-pkgs { inherit host; };
|
||||
modules = [ ./nixos-wsl.nix ];
|
||||
specialArgs = let
|
||||
hyper = hyper-base // { inherit host; };
|
||||
rice = import ./flake-modules/rice.nix pkgs;
|
||||
in { inherit inputs hyper rice; };
|
||||
};
|
||||
in {
|
||||
@@ -73,16 +77,35 @@
|
||||
NxWSL = make-nixos-wsl-system "NxWSL";
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations = let
|
||||
makeNODConfiguration = host: nix-on-droid.lib.nixOnDroidConfiguration rec {
|
||||
pkgs = get-pkgs { host = "NxS23U"; system = "aarch64-linux"; version = "25.05"; } // (
|
||||
get-pkgs { host = "NxS23U"; system = "aarch64-linux"; nixpkgs = nixpkgs24; version = "24.05"; }
|
||||
);
|
||||
modules = [ ./nix-on-droid.nix ];
|
||||
home-manager-path = home-manager-nod.outPath;
|
||||
extraSpecialArgs = let
|
||||
hyper = hyper-base // {
|
||||
inherit host;
|
||||
system = "aarch64-linux";
|
||||
user = "nix-on-droid";
|
||||
home = "/data/data/com.termux.nix/files/home";
|
||||
};
|
||||
rice = import ./flake-modules/rice.nix pkgs;
|
||||
in { inherit inputs hyper rice; };
|
||||
};
|
||||
in { NxS23U = makeNODConfiguration "NxS23U"; };
|
||||
|
||||
homeConfigurations = let
|
||||
make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = my-pkgs host;
|
||||
pkgs = get-pkgs { inherit host; };
|
||||
modules = [ ./home.nix ];
|
||||
extraSpecialArgs = let
|
||||
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
|
||||
in { inherit inputs hyper rice secrets; };
|
||||
};
|
||||
make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = my-pkgs host;
|
||||
pkgs = get-pkgs { inherit host; };
|
||||
modules = [ ./shell-only.nix ];
|
||||
extraSpecialArgs = let
|
||||
hyper = hyper-base // { inherit host; };
|
||||
@@ -93,7 +116,7 @@
|
||||
"${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}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
|
||||
"${hyper-base.user}@NxWSL" = make-shell-configuration { user = hyper.user; host = "NxWSL"; inherit pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user