Skip to content

Commit

Permalink
nix: update to 24.05 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Jun 7, 2024
1 parent 117fde5 commit 8171cba
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 56 deletions.
42 changes: 13 additions & 29 deletions flake.lock

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

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

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-24-05.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";

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

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

Expand All @@ -64,12 +63,6 @@
sops-nix.nixosModules.default
microvm.nixosModules.host
];
nixpkgs-24-05 = import inputs.nixpkgs-24-05 {
system = "x86_64-linux";
config = {
allowUnfree = true;
};
};
in
{
svc-hv01 = nixpkgs.lib.nixosSystem {
Expand Down Expand Up @@ -140,7 +133,7 @@
specialArgs = { inherit inputs self; };
modules = [
ifstate.nixosModules.default
{ nixpkgs.overlays = [ ifstate.overlays.default (_:_: { inherit (nixpkgs-24-05) mrtg; }) ]; }
{ nixpkgs.overlays = [ ifstate.overlays.default ]; }
microvm.nixosModules.microvm
sops-nix.nixosModules.default
ixp-manager.nixosModules.default
Expand Down Expand Up @@ -260,7 +253,7 @@
specialArgs = { inherit inputs self; };
modules = [
ifstate.nixosModules.default
{ nixpkgs.overlays = [ ifstate.overlays.default (_:_: { inherit (nixpkgs-24-05) listmonk; }) ]; }
{ nixpkgs.overlays = [ ifstate.overlays.default ]; }
microvm.nixosModules.microvm
sops-nix.nixosModules.default
./hosts/svc-lists01
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,15 +71,18 @@ 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"
'';
};

environment.interactiveShellInit = /* sh */ ''
# raise some awareness torwards failed services
Expand Down
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";
};
}
2 changes: 1 addition & 1 deletion 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
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 8171cba

Please sign in to comment.