Skip to content

Commit

Permalink
move servers to nixos-23.11
Browse files Browse the repository at this point in the history
  • Loading branch information
NyCodeGHG committed Nov 29, 2023
1 parent dc416c5 commit dc8db4b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
19 changes: 18 additions & 1 deletion flake.lock

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

18 changes: 14 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-db-rest.url = "github:NyCodeGHG/nixpkgs/nixos/db-rest";

home-manager = {
Expand Down Expand Up @@ -94,7 +95,7 @@

flake = {
lib = {
nixosSystem = nixpkgs.lib.makeOverridable ({ modules ? [ ], baseModules ? [ ] }:
nixosSystem = nixpkgs: nixpkgs.lib.makeOverridable ({ modules ? [ ], baseModules ? [ ] }:
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
Expand Down Expand Up @@ -137,11 +138,20 @@

nixosConfigurations =
let
systems = [ "artemis" "delphi" "minimal" "insane" ];
systemFromName = name: self.lib.nixosSystem {
systems = [ "minimal" "insane" ];
systemFromName = name: self.lib.nixosSystem inputs.nixpkgs {
modules = [ ./hosts/${name}/configuration.nix ];
};
in builtins.listToAttrs (builtins.map (system: { name = system; value = systemFromName system; }) systems);
in builtins.listToAttrs (builtins.map (system: { name = system; value = systemFromName system; }) systems) // {

artemis = self.lib.nixosSystem inputs.nixpkgs-stable {
modules = [ ./hosts/artemis/configuration.nix ];
};

delphi = self.lib.nixosSystem inputs.nixpkgs-stable {
modules = [ ./hosts/delphi/configuration.nix ];
};
};

homeManagerModules = {
config = import ./config/home-manager;
Expand Down
4 changes: 1 addition & 3 deletions hosts/artemis/applications/matrix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ in
ensureUsers = [
{
name = "matrix-synapse";
ensurePermissions = {
"DATABASE \"matrix-synapse\"" = "ALL PRIVILEGES";
};
ensureDBOwnership = true;
}
];
ensureDatabases = [ "matrix-synapse" ];
Expand Down
4 changes: 1 addition & 3 deletions hosts/artemis/applications/pgrok.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@
ensureUsers = [
{
name = "pgrok";
ensurePermissions = {
"DATABASE pgrok" = "ALL PRIVILEGES";
};
ensureDBOwnership = true;
}
];
};
Expand Down
4 changes: 1 addition & 3 deletions modules/nixos/applications/authentik.nix
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ in
ensureUsers = [
{
name = "authentik";
ensurePermissions = {
"DATABASE authentik" = "ALL PRIVILEGES";
};
ensureDBOwnership = true;
}
];
};
Expand Down

0 comments on commit dc8db4b

Please sign in to comment.