diff --git a/flake.lock b/flake.lock index 9a8bf28..77538f9 100644 --- a/flake.lock +++ b/flake.lock @@ -295,6 +295,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1722630782, + "narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d04953086551086b44b6f3c6b7eeb26294f207da", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1722651103, @@ -346,7 +362,8 @@ "nix-flatpak": "nix-flatpak", "nix-secrets": "nix-secrets", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "nixpkgs-unstable": "nixpkgs-unstable" } }, "rust-overlay": { diff --git a/flake.nix b/flake.nix index 18733ce..dbb2235 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ # You can find a list of channels at https://wiki.nixos.org/wiki/Nix_channels # To follow a different channel, replace `nixos-unstable` with the channel name, e.g. `nixos-24.05`. nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Use Lix in place of Nix. # If you'd rather use regular Nix, remove `lix-module.nixosModules.default` from the `modules` section below. @@ -48,6 +49,7 @@ nix-flatpak, nixos-hardware, nixpkgs, + nixpkgs-unstable, nix-secrets, ... }: @@ -90,6 +92,15 @@ Dimaga = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + + # Add unstable repo + specialArgs = { + pkgs-unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + }; + modules = defaultModules ++ [ nixos-hardware.nixosModules.common-cpu-intel ./hosts/Dimaga diff --git a/modules/apps/development.nix b/modules/apps/development.nix index 7d0d3af..a209527 100644 --- a/modules/apps/development.nix +++ b/modules/apps/development.nix @@ -19,7 +19,10 @@ in config = lib.mkMerge [ (lib.mkIf cfg.enable { aux.system = { - packages = with pkgs; [ nixd ]; + packages = with pkgs; [ + nixd + nix-prefetch-hash + ]; ui.flatpak = { enable = true; packages = [ "com.vscodium.codium" ]; diff --git a/modules/services/netdata.nix b/modules/services/netdata.nix index 1a1ff9e..279b370 100644 --- a/modules/services/netdata.nix +++ b/modules/services/netdata.nix @@ -1,5 +1,6 @@ { pkgs, + pkgs-unstable, config, lib, ... @@ -39,6 +40,7 @@ in }; config = lib.mkIf cfg.enable { + services = { nginx.virtualHosts."${cfg.url}" = { useACMEHost = cfg.domain; @@ -62,6 +64,7 @@ in netdata = { enable = true; + package = pkgs-unstable.netdataCloud; enableAnalyticsReporting = false; configDir = { # Enable nvidia-smi: https://nixos.wiki/wiki/Netdata#nvidia-smi @@ -72,5 +75,6 @@ in }; }; systemd.services.nginx.wants = [ config.systemd.services.netdata.name ]; + }; }