flake.nix: update usage
This commit is contained in:
parent
10f6054d4e
commit
95251fd560
38
flake.lock
38
flake.lock
|
@ -5,16 +5,18 @@
|
|||
"disko": "disko",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"sops-nix": "sops-nix",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705080849,
|
||||
"narHash": "sha256-GdBbhCgscYWF2uK0kbU8w30V7GlOQXVm/eXgLye3gR8=",
|
||||
"lastModified": 1705502446,
|
||||
"narHash": "sha256-9116clrL8J5s0SCZH0E+docb54SfaZzPLLa9TvQPROY=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "07a0e1db0981c0db3ca6f7cbd8a68d86b2245eff",
|
||||
"revCount": 1779,
|
||||
"rev": "26259341d42bb9f84d1bf808bbd421c1b30d17ef",
|
||||
"revCount": 1801,
|
||||
"type": "git",
|
||||
"url": "https://git.clan.lol/clan/clan-core"
|
||||
},
|
||||
|
@ -507,16 +509,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1705293701,
|
||||
"narHash": "sha256-yJs738MxB+RsxGETqESof15lRJ5za6s3NmhjbXt8Kt4=",
|
||||
"lastModified": 1705677747,
|
||||
"narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "715fac4e39626ca0d24481f3d1fdd54dbeeaced8",
|
||||
"rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable-small",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -537,22 +539,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1705133751,
|
||||
"narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"poetry2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
|
@ -640,7 +626,7 @@
|
|||
"nix-ld": "nix-ld",
|
||||
"nix-writers": "nix-writers",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"stockholm": "stockholm",
|
||||
"vscode-server": "vscode-server"
|
||||
}
|
||||
|
|
46
flake.nix
46
flake.nix
|
@ -6,7 +6,7 @@
|
|||
clan-core = {
|
||||
url = "git+https://git.clan.lol/clan/clan-core";
|
||||
# Don't do this if your machines are on nixpkgs stable.
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
@ -52,26 +52,28 @@
|
|||
home-manager, nix-writers, vscode-server, ...}@inputs:
|
||||
let
|
||||
inherit (nixpkgs) lib pkgs;
|
||||
#pkgsForSystem = system: (import nixpkgs {
|
||||
# inherit system;
|
||||
# config.allowUnfree = true;
|
||||
# config.packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; });
|
||||
# config.allowUnfreePredicate = pkg: lib.packageName pkg == "unrar";
|
||||
# config.android_sdk.accept_license = true;
|
||||
# config.oraclejdk.accept_license = true;
|
||||
# overlays = [
|
||||
# self.overlays.default
|
||||
# inputs.nix-writers.overlays.default
|
||||
# (import (inputs.stockholm.inputs.nix-writers + "/pkgs"))
|
||||
# (this: super: {
|
||||
# inherit (this.writers) writeDash writeDashBin;
|
||||
# stockholm.lib = inputs.stockholm.lib;
|
||||
# ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default;
|
||||
# inventory4ce = inputs.inventory4ce.packages.${system}.default;
|
||||
# })
|
||||
# inputs.stockholm.overlays.default
|
||||
# ];
|
||||
#});
|
||||
pkgsForSystem = system: (import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = lib.mkForce (pkgs: { tinc = pkgs.tinc_pre; });
|
||||
allowUnfreePredicate = pkg: lib.packageName pkg == "unrar";
|
||||
android_sdk.accept_license = true;
|
||||
oraclejdk.accept_license = true;
|
||||
};
|
||||
overlays = [
|
||||
self.overlays.default
|
||||
inputs.nix-writers.overlays.default
|
||||
(import (inputs.stockholm.inputs.nix-writers + "/pkgs"))
|
||||
(this: super: {
|
||||
inherit (this.writers) writeDash writeDashBin;
|
||||
stockholm.lib = inputs.stockholm.lib;
|
||||
ha-ara-menu = inputs.ha-ara-menu.packages.${system}.default;
|
||||
inventory4ce = inputs.inventory4ce.packages.${system}.default;
|
||||
})
|
||||
inputs.stockholm.overlays.default
|
||||
];
|
||||
});
|
||||
#pkgsForSystem = system: nixpkgs.legacyPackages.${system};
|
||||
clan = clan-core.lib.buildClan {
|
||||
clanName = "makefu";
|
||||
|
@ -83,7 +85,7 @@
|
|||
machines = lib.genAttrs [ "filepimp" "mrdavid" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec {
|
||||
# TODO inject the system somewhere else
|
||||
nixpkgs.hostPlatform = if host == "cake" then "aarch64-linux" else "x86_64-linux";
|
||||
#nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux";
|
||||
# nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux";
|
||||
imports = [
|
||||
./2configs/nixpkgs-config.nix
|
||||
disko.nixosModules.disko
|
||||
|
|
Loading…
Reference in a new issue