Skip to content

Commit

Permalink
nix: update to 24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed May 24, 2024
1 parent db10670 commit f4404e9
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 47 deletions.
35 changes: 9 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
description = "dresden internet exchange nixos config";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-listmonk.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-mrtg.url = "github:NixOS/nixpkgs/backport-313719-to-release-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-mrtg.url = "github:NixOS/nixpkgs/backport-313719-to-release-24.05";

ifstate = {
url = "git+https://codeberg.org/m4rc3l/ifstate.nix";
Expand Down Expand Up @@ -43,7 +42,7 @@
};

authentik = {
url = "github:nix-community/authentik-nix";
url = "github:MarcelCoding/authentik-nix";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand Down
17 changes: 10 additions & 7 deletions modules/dd-ix/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ in

users.motd = prodMotd;

programs.screen.screenrc = ''
defscrollback 10000
programs.screen = {
enable = true;
screenrc = ''
defscrollback 10000
startup_message off
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%w"
'';
hardstatus on
hardstatus alwayslastline
hardstatus string "%w"
'';
};
}
6 changes: 3 additions & 3 deletions modules/management/authentik.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ in
};

systemd.services.authentik.environment = {
AUTHENTIK_ERROR_REPORTING__ENABLED = false;
AUTHENTIK_DISABLE_UPDATE_CHECK = true;
AUTHENTIK_DISABLE_STARTUP_ANALYTICS = true;
AUTHENTIK_ERROR_REPORTING__ENABLED = "false";
AUTHENTIK_DISABLE_UPDATE_CHECK = "true";
AUTHENTIK_DISABLE_STARTUP_ANALYTICS = "true";
AUTHENTIK_AVATARS = "initials";
};
}
3 changes: 1 addition & 2 deletions modules/management/listmonk.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ self, lib, config, pkgs, inputs, ... }:
{ self, lib, config, pkgs, ... }:
let
cfg = config.services.listmonk;
tomlFormat = pkgs.formats.toml { };
Expand Down Expand Up @@ -77,7 +77,6 @@ in
services = {
listmonk = {
enable = true;
package = inputs.nixpkgs-listmonk.legacyPackages.x86_64-linux.listmonk;
settings = {
app.admin_username = "admin";
db = {
Expand Down
2 changes: 1 addition & 1 deletion modules/management/netbox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
postgresql.enable = lib.mkForce false;
netbox = {
enable = true;
package = pkgs.netbox_3_6.overrideAttrs (old: {
package = pkgs.netbox_3_7.overrideAttrs (old: {
installPhase = old.installPhase + ''
ln -s ${self + "/resources/netbox/pipeline.py"} $out/opt/netbox/netbox/netbox/ddix_pipeline.py
'';
Expand Down
15 changes: 11 additions & 4 deletions modules/management/postgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
let
systems = lib.attrValues self.nixosConfigurations;
users = lib.flatten (map (system: system.config.dd-ix.postgres) systems);
# https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/databases/postgresql.nix#L7-L21

# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/databases/postgresql.nix#L30C1-L44
cfg = config.services.postgresql;
postgresql =
let
cfg = config.services.postgresql;
base = if cfg.enableJIT && !cfg.package.jitSupport then cfg.package.withJIT else cfg.package;
# ensure that
# services.postgresql = {
# enableJIT = true;
# package = pkgs.postgresql_<major>;
# };
# works.
base = if cfg.enableJIT then cfg.package.withJIT else cfg.package.withoutJIT;
in
if cfg.extraPlugins == [ ]
then base
else base.withPackages (_: cfg.extraPlugins);
else base.withPackages cfg.extraPlugins;

startPostgres = pkgs.writeShellScript "postgres.sh" ''
exec ${postgresql}/bin/postgres \
Expand Down

0 comments on commit f4404e9

Please sign in to comment.