mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 01:38:02 +02:00
nix: Merge phone flake with nix-config
This is a part of having multiple nixosSystems for the same nix flake.
This commit is contained in:
parent
10d99941bb
commit
b972766cc5
15
flake.nix
15
flake.nix
@ -19,6 +19,11 @@
|
|||||||
url = "github:donovanglover/sakaya";
|
url = "github:donovanglover/sakaya";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mobile-nixos = {
|
||||||
|
url = "github:NixOS/mobile-nixos";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... } @ attrs:
|
outputs = { self, nixpkgs, ... } @ attrs:
|
||||||
@ -47,6 +52,9 @@
|
|||||||
name =
|
name =
|
||||||
if file == "laptop.nix"
|
if file == "laptop.nix"
|
||||||
then "nixos"
|
then "nixos"
|
||||||
|
else
|
||||||
|
if file == "phone.nix"
|
||||||
|
then "mobile-nixos"
|
||||||
else replaceStrings [ ".nix" ] [ "" ] file;
|
else replaceStrings [ ".nix" ] [ "" ] file;
|
||||||
value =
|
value =
|
||||||
if directory == "packages"
|
if directory == "packages"
|
||||||
@ -64,10 +72,13 @@
|
|||||||
then
|
then
|
||||||
nixosSystem
|
nixosSystem
|
||||||
{
|
{
|
||||||
system = "x86_64-linux";
|
system =
|
||||||
|
if file == "phone.nix"
|
||||||
|
then "aarch64-linux"
|
||||||
|
else "x86_64-linux";
|
||||||
specialArgs = attrs // { nix-config = self; };
|
specialArgs = attrs // { nix-config = self; };
|
||||||
modules = [
|
modules = [
|
||||||
./.
|
./${file}
|
||||||
./${directory}/${file}
|
./${directory}/${file}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
44
phone/flake.lock
generated
44
phone/flake.lock
generated
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"mobile-nixos": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1715627339,
|
|
||||||
"narHash": "sha256-HJ6V7hc64iBqXlZ8kH4sXmUzPH+0Hn6wYURmZmL5LFk=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "mobile-nixos",
|
|
||||||
"rev": "655c8830d5fe2eae79c8fc0bab8033b34c8456eb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "mobile-nixos",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1718160348,
|
|
||||||
"narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"mobile-nixos": "mobile-nixos",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
|
|
||||||
mobile-nixos = {
|
|
||||||
url = "github:NixOS/mobile-nixos";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, mobile-nixos } @ attrs:
|
|
||||||
{
|
|
||||||
nixosConfigurations = {
|
|
||||||
mobile-nixos = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
specialArgs = attrs;
|
|
||||||
modules = [
|
|
||||||
(import "${mobile-nixos}/lib/configuration.nix" {
|
|
||||||
device = "pine64-pinephone";
|
|
||||||
})
|
|
||||||
|
|
||||||
./configuration.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./phosh.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user