feat(flake): add TeslaMate flake and import NixOS module
- Added `teslamate-flake` input to the flake configuration - Imported TeslaMate's NixOS module in the system configuration - Updated function signatures to remove unused `system` parameter where applicable
This commit is contained in:
parent
38644cc57f
commit
5c7bbda59e
20
flake.nix
20
flake.nix
@ -3,6 +3,7 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
|
||||||
nixos-unstable.url = "github:NixOS/nixpkgs/master";
|
nixos-unstable.url = "github:NixOS/nixpkgs/master";
|
||||||
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
||||||
|
teslamate-flake.url = "github:teslamate-org/teslamate/v1.31.1";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -13,7 +14,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-unstable, local-unstable, home-manager, nvidia-patch }:
|
outputs = { self, nixpkgs, nixos-unstable, local-unstable, home-manager, teslamate-flake, nvidia-patch }:
|
||||||
let
|
let
|
||||||
sysLinuxX64 = "x86_64-linux";
|
sysLinuxX64 = "x86_64-linux";
|
||||||
sysDarwin = "aarch64-darwin";
|
sysDarwin = "aarch64-darwin";
|
||||||
@ -44,13 +45,19 @@
|
|||||||
overlays = extOverlays;
|
overlays = extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
teslamatePkgs = import teslamate-flake {
|
||||||
|
inherit system config;
|
||||||
|
overlays = extOverlays;
|
||||||
|
};
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: { inherit unstablePkgs; })
|
(final: prev: { inherit unstablePkgs; })
|
||||||
(final: prev: { inherit localPkgs; })
|
(final: prev: { inherit localPkgs; })
|
||||||
|
(final: prev: { inherit teslamatePkgs; })
|
||||||
] ++ extOverlays;
|
] ++ extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
wrapUtils = { pkgs, system }:
|
wrapUtils = { pkgs }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.lib) makeScope;
|
inherit (pkgs.lib) makeScope;
|
||||||
inherit (pkgs) newScope;
|
inherit (pkgs) newScope;
|
||||||
@ -66,13 +73,13 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgsLinuxX64Cuda = wrapPkgsSystem { system = sysLinuxX64; };
|
pkgsLinuxX64Cuda = wrapPkgsSystem { system = sysLinuxX64; };
|
||||||
utilsLinuxX64Cuda = wrapUtils { system = sysLinuxX64; pkgs = pkgsLinuxX64Cuda; };
|
utilsLinuxX64Cuda = wrapUtils { pkgs = pkgsLinuxX64Cuda; };
|
||||||
|
|
||||||
pkgsLinuxAarch = wrapPkgsSystem { system = sysLinuxAarch; };
|
pkgsLinuxAarch = wrapPkgsSystem { system = sysLinuxAarch; };
|
||||||
utilsLinuxAarch = wrapUtils { system = sysLinuxAarch; pkgs = pkgsLinuxAarch; };
|
utilsLinuxAarch = wrapUtils { pkgs = pkgsLinuxAarch; };
|
||||||
|
|
||||||
pkgsDarwin = wrapPkgsSystem { system = sysDarwin; };
|
pkgsDarwin = wrapPkgsSystem { system = sysDarwin; };
|
||||||
utilsDarwin = wrapUtils { system = sysDarwin; pkgs = pkgsDarwin; };
|
utilsDarwin = wrapUtils { pkgs = pkgsDarwin; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
@ -82,6 +89,9 @@
|
|||||||
user = "giulio";
|
user = "giulio";
|
||||||
roles = [ ];
|
roles = [ ];
|
||||||
}];
|
}];
|
||||||
|
imports = [
|
||||||
|
teslamate-flake.nixosModules.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user