1
0
Fork 0

Services: use unstable version of Netdata

This commit is contained in:
Aires 2024-08-05 09:49:07 -04:00
parent 397dd6bed3
commit 5fb5e3387d
4 changed files with 37 additions and 2 deletions

View file

@ -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": {

View file

@ -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

View file

@ -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" ];

View file

@ -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 ];
};
}