Regenerated
This commit is contained in:
+295
-288
File diff suppressed because it is too large
Load Diff
@@ -86,6 +86,11 @@ The Nix flake definition for Droidnix.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flatpak = {
|
||||
url = "github:gmodena/nix-flatpak";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
}
|
||||
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -113,6 +118,8 @@ The Nix flake definition for Droidnix.
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
./generated/hosts/traveldroid/host.nix
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flatpak = {
|
||||
url = "github:gmodena/nix-flatpak";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
}
|
||||
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -43,6 +48,8 @@
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
./generated/hosts/traveldroid/host.nix
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
#################################
|
||||
# Read package list from config file
|
||||
#################################
|
||||
packagesConfPath = "${flakeRoot}/generated/assets/packages.conf";
|
||||
raw = builtins.readFile packagesConfPath;
|
||||
|
||||
rawLines = lib.splitString "\n" raw;
|
||||
|
||||
# Guard against splitting into characters accidentally
|
||||
_guard = assert !(builtins.stringLength raw > 1 && builtins.length rawLines == builtins.stringLength raw); true;
|
||||
|
||||
# Clean each line: remove CRs, comments, trim whitespace
|
||||
cleanLine = line:
|
||||
let
|
||||
noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
|
||||
noInlineComment = lib.head (lib.splitString "#" noCR);
|
||||
in
|
||||
lib.strings.trim noInlineComment;
|
||||
|
||||
# Filter out empty lines
|
||||
entries = builtins.filter (l: l != "") (map cleanLine rawLines);
|
||||
|
||||
# Resolve attribute paths in pkgs
|
||||
resolvePkg = name:
|
||||
let
|
||||
parts = lib.splitString "." name;
|
||||
found = lib.attrByPath parts null pkgs;
|
||||
in
|
||||
if found == null then
|
||||
(throw ''
|
||||
packages.nix: package not found in pkgs
|
||||
Token : ${builtins.toJSON name}
|
||||
packages.conf : ${packagesConfPath}
|
||||
Hint : check the attribute name on search.nixos.org/packages
|
||||
'')
|
||||
else
|
||||
found;
|
||||
|
||||
# Final system-wide package list
|
||||
packages = builtins.seq _guard (map resolvePkg entries);
|
||||
|
||||
in {
|
||||
#################################
|
||||
# Allow unfree packages globally
|
||||
#################################
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
||||
#################################
|
||||
# System packages
|
||||
#################################
|
||||
environment.systemPackages = packages;
|
||||
}
|
||||
Reference in New Issue
Block a user