nod: Fifth attempt at flakes
Also simplified a few things, nice
This commit is contained in:
parent
e56514890d
commit
bac1813c77
18
flake.nix
18
flake.nix
|
@ -38,35 +38,38 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, disko, nixos-hardware, nix-on-droid, home-manager, stylix, nixvim, nixgl, nur, ... }:
|
outputs = { self, nixpkgs, disko, nixos-hardware, nix-on-droid, home-manager, stylix, nixvim, nixgl, nur, ... }:
|
||||||
let
|
let
|
||||||
sharedOverlays = [
|
nixpkgsConfig = {
|
||||||
|
overlays = [
|
||||||
nixgl.overlay
|
nixgl.overlay
|
||||||
];
|
];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
lib = {
|
lib = {
|
||||||
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
|
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = modules ++ [
|
modules = modules ++ [
|
||||||
self.nixosModules.dotfiles
|
self.nixosModules.dotfiles
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = sharedOverlays;
|
nixpkgs = nixpkgsConfig;
|
||||||
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixOnDroidConfiguration = { modules ? [ ] }: nix-on-droid.lib.nixOnDroidConfiguration {
|
nixOnDroidConfiguration = { modules ? [ ] }: nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = import nixpkgs (nixpkgsConfig // {
|
||||||
|
system = "aarch64-linux"; # nod doesn't support anything else
|
||||||
|
});
|
||||||
modules = modules ++ [
|
modules = modules ++ [
|
||||||
self.nixOnDroidModules.dotfiles
|
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 ];
|
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
homeManagerConfiguration = { system, modules ? [ ] }: home-manager.lib.homeManagerConfiguration {
|
homeManagerConfiguration = { system, modules ? [ ] }: home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs (nixpkgsConfig // {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = sharedOverlays;
|
});
|
||||||
};
|
|
||||||
modules = modules ++ [ self.homeManagerModules.dotfiles ];
|
modules = modules ++ [ self.homeManagerModules.dotfiles ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -83,6 +86,7 @@
|
||||||
nixOnDroidModules.dotfiles = {
|
nixOnDroidModules.dotfiles = {
|
||||||
imports = [
|
imports = [
|
||||||
./nod
|
./nod
|
||||||
|
# home-manager is included
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
homeManagerModules.dotfiles = {
|
homeManagerModules.dotfiles = {
|
||||||
|
|
|
@ -19,6 +19,5 @@
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
terminal.font = "${
|
terminal.font = "${
|
||||||
pkgs.nerdfonts.override {
|
pkgs.nerdfonts.override {
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
git # Needed for all the fetchFromGit in this repo on nixos-rebuild
|
git # Needed for all the fetchFromGit in this repo on nixos-rebuild
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
|
|
Loading…
Reference in a new issue