nixos-configs/lib/flake/default.nix
matt1432 6adb3eca18
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update sources
Flake Inputs:
    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs' (2025-01-12) rev: ed4a395ea001367c1f13d34b1e01aa10290f67d6
      → 'github:NixOS/nixpkgs' (2025-01-13) rev: 9abb87b552b7f55ac8916b6fc9e5cb486656a2f3

    • Updated input 'nixpkgs-wayland':
        'github:nix-community/nixpkgs-wayland' (2025-01-13) rev: 6dd8c0145109a9b9aff360eb6c4319ba65a890cf
      → 'github:nix-community/nixpkgs-wayland' (2025-01-14) rev: b5cb2cad10855f5281f5af217b0a86c3c209fef4

    • Updated input 'tuya-local-src':
        'github:make-all/tuya-local' (2025-01-13) rev: 85f3c17a9b4a0fd4f799c7223d7b87496dcd0b4f
      → 'github:make-all/tuya-local' (2025-01-14) rev: 52fe8a4724a75b8c1619294e9e1c32a73db16030

Docker Images:
    • postgres 14:
       sha256:922d38d4ca73ba5bfa8140c50b0d1f45636ca7b4c20d90506c49e2be2d7911f5
     → sha256:daf9e7e660b74c3d58543e0bdb406c281e93a72e2c7729c418e68b41b5f59af2

    • postgres 14:
       sha256:922d38d4ca73ba5bfa8140c50b0d1f45636ca7b4c20d90506c49e2be2d7911f5
     → sha256:daf9e7e660b74c3d58543e0bdb406c281e93a72e2c7729c418e68b41b5f59af2

    • nextcloud fpm:
       sha256:f6b2ec624555c8f63b0b5f8950b432e10352f522b571b66283f10d20b7ef62aa
     → sha256:b1c48d06e39ac572083f7279ed711506d997bcd7a11a3705cb54a0d16e7feac4

    • nginx latest:
       sha256:2300fb715ab3a2595a3e6956db7379d25b2815973416e6261dde607ca3a86370
     → sha256:0a399eb16751829e1af26fea27b20c3ec28d7ab1fb72182879dcae1cca21206a

Firefox Addons:
    bitwarden: 2024.12.3 -> 2024.12.4

Node modules:
    pkg-types: 1.3.0 -> 1.3.1
2025-01-14 11:39:55 -05:00

112 lines
2.8 KiB
Nix

inputs: rec {
# Import pkgs from a nixpkgs instance
mkPkgs = {
system,
nixpkgs,
cfg ? {},
nix ? null,
cudaSupport ? false,
}:
import nixpkgs {
inherit system;
overlays =
[
(inputs.self.overlays.nix-version {inherit nix;})
inputs.self.overlays.build-failures
]
++ (cfg.overlays or []);
config =
{
inherit cudaSupport;
allowUnfree = true;
# In case I need an insecure package in my devShells
permittedInsecurePackages =
[]
++ (cfg.config.permittedInsecurePackages or []);
}
// (builtins.removeAttrs (
if cfg.config or null == null
then {}
else cfg.config
) ["permittedInsecurePackages"]);
};
# Enable use of `nixpkgs.overlays` on both NixOS and NixOnDroid
allowModularOverrides = {
cudaSupport ? false,
system,
}: ({config, ...}: let
pkgs = mkPkgs {
cfg = config.nixpkgs;
nix = config.nix.package;
inherit system cudaSupport;
inherit (inputs) nixpkgs;
};
inherit (pkgs.lib) mkForce;
in {
_module.args.pkgs = mkForce pkgs;
});
# Default system
mkNixOS = {
extraModules ? [],
cudaSupport ? false,
mainUser ? "matt",
}:
inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = inputs // {inherit mainUser;};
modules =
[
(allowModularOverrides {inherit system cudaSupport;})
inputs.home-manager.nixosModules.home-manager
{home-manager.extraSpecialArgs = specialArgs;}
]
++ extraModules;
};
mkNixOnDroid = extraModules: let
system = "aarch64-linux";
in
inputs.nix-on-droid.lib.nixOnDroidConfiguration rec {
extraSpecialArgs = inputs;
home-manager-path = inputs.home-manager.outPath;
pkgs = mkPkgs {
inherit system;
inherit (inputs) nixpkgs;
};
modules =
[
(allowModularOverrides {inherit system;})
({
config,
lib,
...
}: let
inherit (lib) mkForce mkOption types;
in {
# Adapt NixOnDroid to NixOS options
options.environment = {
variables.FLAKE = mkOption {
type = with types; nullOr str;
};
systemPackages = mkOption {
type = with types; listOf package;
default = [];
};
};
config.environment.packages = config.environment.systemPackages;
# This disables the assertion that fails because of nixpkgs.overlays
config._module.args.isFlake = mkForce false;
})
{home-manager = {inherit extraSpecialArgs;};}
]
++ extraModules;
};
}