nod: Fifth attempt at flakes

Also simplified a few things, nice
This commit is contained in:
Geoffrey Frogeye 2024-01-16 23:48:41 +01:00
parent e56514890d
commit bac1813c77
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
4 changed files with 13 additions and 12 deletions

View file

@ -38,35 +38,38 @@
outputs = { self, nixpkgs, disko, nixos-hardware, nix-on-droid, home-manager, stylix, nixvim, nixgl, nur, ... }:
let
sharedOverlays = [
nixpkgsConfig = {
overlays = [
nixgl.overlay
];
config.allowUnfree = true;
};
lib = {
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
inherit system;
modules = modules ++ [
self.nixosModules.dotfiles
{
nixpkgs.overlays = sharedOverlays;
nixpkgs = nixpkgsConfig;
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
}
];
};
nixOnDroidConfiguration = { modules ? [ ] }: nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs (nixpkgsConfig // {
system = "aarch64-linux"; # nod doesn't support anything else
});
modules = modules ++ [
self.nixOnDroidModules.dotfiles
{
# TODO Can't use overlays, see
# https://github.com/nix-community/nix-on-droid/blob/039379abeee67144d4094d80bbdaf183fb2eabe5/modules/nixpkgs/options.nix#L166
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
}
];
};
homeManagerConfiguration = { system, modules ? [ ] }: home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
pkgs = import nixpkgs (nixpkgsConfig // {
inherit system;
overlays = sharedOverlays;
};
});
modules = modules ++ [ self.homeManagerModules.dotfiles ];
};
};
@ -83,6 +86,7 @@
nixOnDroidModules.dotfiles = {
imports = [
./nod
# home-manager is included
];
};
homeManagerModules.dotfiles = {

View file

@ -19,6 +19,5 @@
warn-dirty = false;
};
};
nixpkgs.config.allowUnfree = true;
};
}

View file

@ -13,7 +13,6 @@
};
};
};
nixpkgs.config.allowUnfree = true;
system.stateVersion = "23.11";
terminal.font = "${
pkgs.nerdfonts.override {

View file

@ -28,7 +28,6 @@
git # Needed for all the fetchFromGit in this repo on nixos-rebuild
];
nixpkgs.config.allowUnfree = true;
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;