nix fmt
This commit is contained in:
parent
a9218a80e6
commit
7137e93805
49 changed files with 2034 additions and 2002 deletions
|
@ -1,89 +1,92 @@
|
|||
{
|
||||
inputs =
|
||||
{
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
# required for home-manager modules
|
||||
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
get-flake.url = "github:ursi/get-flake";
|
||||
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||
mobile-nixos.flake = false;
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?rev=5044811f7804e7cf83923908d1b35322f34fb3fc"; # 6.7.0-1
|
||||
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, get-flake
|
||||
, nixpkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
targetPlatform = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?rev=5044811f7804e7cf83923908d1b35322f34fb3fc"; # 6.7.0-1
|
||||
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
||||
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
mkNixosConfiguration = { nodeName, extraModules ? [ ], ... } @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName repoFlake;
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
targetPlatform = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
repoFlake = get-flake ../../../..;
|
||||
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
nodeName = "steveej-x13s";
|
||||
in
|
||||
mkNixosConfiguration = {
|
||||
nodeName,
|
||||
extraModules ? [],
|
||||
...
|
||||
} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
native = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
system = targetPlatform;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName repoFlake;
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = targetPlatform;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
modules =
|
||||
[
|
||||
# repoFlake.nixosModules.hardware-x13s
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
nodeName = "steveej-x13s";
|
||||
in {
|
||||
native = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
system = targetPlatform;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
inherit nodeName;
|
||||
extraModules = [
|
||||
./configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = targetPlatform;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue