Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: update to 24.05 #72

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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