mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-01-12 10:28:25 +01:00
Compare commits
2 Commits
06668cda79
...
openstack-
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a6b6cfdb7 | |||
| 871a24947c |
@@ -1,26 +1,12 @@
|
|||||||
{ inputs, pkgs, lib, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
flake = "git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git";
|
flake = "git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git";
|
||||||
flags = [
|
flags = [
|
||||||
# --update-input is deprecated since nix 2.22, and removed in lix 2.90
|
"--update-input" "nixpkgs"
|
||||||
# https://git.lix.systems/lix-project/lix/issues/400
|
"--update-input" "nixpkgs-unstable"
|
||||||
"--refresh"
|
|
||||||
"--override-input" "nixpkgs" "github:nixos/nixpkgs/nixos-24.05-small"
|
|
||||||
"--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable-small"
|
|
||||||
"--no-write-lock-file"
|
"--no-write-lock-file"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# workaround for https://github.com/NixOS/nix/issues/6895
|
|
||||||
# via https://git.lix.systems/lix-project/lix/issues/400
|
|
||||||
environment.etc."current-system-flake-inputs.json".source
|
|
||||||
= pkgs.writers.writeJSON "flake-inputs.json" (
|
|
||||||
lib.flip lib.mapAttrs inputs (name: input:
|
|
||||||
# inputs.*.sourceInfo sans outPath, since writeJSON will otherwise serialize sourceInfo like a derivation
|
|
||||||
lib.removeAttrs (input.sourceInfo or {}) [ "outPath" ]
|
|
||||||
// { store-path = input.outPath; } # comment this line if you don't want to retain a store reference to the flake inputs
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
89
flake.lock
generated
89
flake.lock
generated
@@ -29,11 +29,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725463969,
|
"lastModified": 1713887124,
|
||||||
"narHash": "sha256-d3c1TAlIN1PtK+oQP1wO6XbDfmR4SUp/C/4s7G46ARo=",
|
"narHash": "sha256-hGTSm0p9xXUYDgsAAr/ORZICo6T6u33vLfX3tILikaQ=",
|
||||||
"owner": "GuillaumeDesforges",
|
"owner": "GuillaumeDesforges",
|
||||||
"repo": "fix-python",
|
"repo": "fix-python",
|
||||||
"rev": "2926402234c3f99aa8e4608c51d9ffa73ea403c0",
|
"rev": "f7f4b33e22414071fc1f9cbf68072c413c3a7fdf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -67,17 +67,17 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726861911,
|
"lastModified": 1716065905,
|
||||||
"narHash": "sha256-pXPmVp4AgszzJXlLjj8r9NxoDvxoV4USGaiMwqCyb4M=",
|
"narHash": "sha256-08uhxBzfakfhl/ooc+gMzDupWKYvTeyQZwuvB1SBS7A=",
|
||||||
"ref": "refs/heads/master",
|
"owner": "Programvareverkstedet",
|
||||||
"rev": "d10db19d7df5c5c2cd2dcb878376d5d681f6c2f2",
|
"repo": "grzegorz",
|
||||||
"revCount": 94,
|
"rev": "0481aef6553ae9aee86e4edb4ca0ed4f2eba2058",
|
||||||
"type": "git",
|
"type": "github"
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/grzegorz.git"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"owner": "Programvareverkstedet",
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/grzegorz.git"
|
"repo": "grzegorz",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"grzegorz-clients": {
|
"grzegorz-clients": {
|
||||||
@@ -87,17 +87,17 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726861934,
|
"lastModified": 1716115695,
|
||||||
"narHash": "sha256-lOzPDwktd+pwszUTbpUdQg6iCzInS11fHLfkjmnvJrM=",
|
"narHash": "sha256-aI65l4x+U5v3i/nfn6N3eW5IZodmf4pyAByE7vTJh8I=",
|
||||||
"ref": "refs/heads/master",
|
"owner": "Programvareverkstedet",
|
||||||
"rev": "546d921ec46735dbf876e36f4af8df1064d09432",
|
"repo": "grzegorz-clients",
|
||||||
"revCount": 78,
|
"rev": "b9444658fbb39cd1bf1c61ee5a1d5f0641c49abe",
|
||||||
"type": "git",
|
"type": "github"
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/grzegorz-clients.git"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"owner": "Programvareverkstedet",
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/grzegorz-clients.git"
|
"repo": "grzegorz-clients",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"matrix-next": {
|
"matrix-next": {
|
||||||
@@ -156,6 +156,42 @@
|
|||||||
"url": "https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git"
|
"url": "https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixlib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725757153,
|
||||||
|
"narHash": "sha256-c1a6iLmCVPFI9EUVMrBN8xdmFxFXEjcVwiTSVmqajOs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "68584f89dd0eb16fea5d80ae127f3f681f6a5df7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-generators": {
|
||||||
|
"inputs": {
|
||||||
|
"nixlib": "nixlib",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726102718,
|
||||||
|
"narHash": "sha256-u89QyfjtXryLHrO3Wre4kuWK5KDKiXe8lgRi6+cUOEw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "5ae384b83b91080f0fead6bc1add1cff8277cb3f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725198597,
|
"lastModified": 1725198597,
|
||||||
@@ -166,10 +202,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-24.05-small",
|
"ref": "nixos-24.05-small",
|
||||||
"repo": "nixpkgs",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
@@ -198,10 +233,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-unstable-small",
|
"ref": "nixos-unstable-small",
|
||||||
"repo": "nixpkgs",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pvv-calendar-bot": {
|
"pvv-calendar-bot": {
|
||||||
@@ -252,6 +286,7 @@
|
|||||||
"matrix-next": "matrix-next",
|
"matrix-next": "matrix-next",
|
||||||
"minecraft-data": "minecraft-data",
|
"minecraft-data": "minecraft-data",
|
||||||
"nix-gitea-themes": "nix-gitea-themes",
|
"nix-gitea-themes": "nix-gitea-themes",
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"pvv-calendar-bot": "pvv-calendar-bot",
|
"pvv-calendar-bot": "pvv-calendar-bot",
|
||||||
|
|||||||
47
flake.nix
47
flake.nix
@@ -2,8 +2,8 @@
|
|||||||
description = "PVV System flake";
|
description = "PVV System flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-small"; # remember to also update the url in base/services/auto-upgrade.nix
|
nixpkgs.url = "nixpkgs/nixos-24.05-small";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable-small";
|
||||||
|
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -23,15 +23,18 @@
|
|||||||
nix-gitea-themes.url = "git+https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git";
|
nix-gitea-themes.url = "git+https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git";
|
||||||
nix-gitea-themes.inputs.nixpkgs.follows = "nixpkgs";
|
nix-gitea-themes.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
grzegorz.url = "git+https://git.pvv.ntnu.no/Projects/grzegorz.git";
|
grzegorz.url = "github:Programvareverkstedet/grzegorz";
|
||||||
grzegorz.inputs.nixpkgs.follows = "nixpkgs";
|
grzegorz.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Projects/grzegorz-clients.git";
|
grzegorz-clients.url = "github:Programvareverkstedet/grzegorz-clients";
|
||||||
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
minecraft-data.url = "git+https://git.pvv.ntnu.no/Drift/minecraft-data.git";
|
minecraft-data.url = "git+https://git.pvv.ntnu.no/Drift/minecraft-data.git";
|
||||||
|
|
||||||
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||||
|
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, nixos-generators, ... }@inputs:
|
||||||
let
|
let
|
||||||
nixlib = nixpkgs.lib;
|
nixlib = nixpkgs.lib;
|
||||||
systems = [
|
systems = [
|
||||||
@@ -149,6 +152,40 @@
|
|||||||
|
|
||||||
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
||||||
|
|
||||||
|
openstack-image = nixos-generators.nixosGenerate {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
format = "openstack";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
({config, lib, pkgs, modulesPath, ... }: {
|
||||||
|
system.build.openstackImage = lib.mkForce (import "${modulesPath}/../lib/make-disk-image.nix" {
|
||||||
|
inherit config lib pkgs;
|
||||||
|
additionalSpace = "1024M";
|
||||||
|
copyChannel = true;
|
||||||
|
diskSize = "auto";
|
||||||
|
format = "raw";
|
||||||
|
partitionTableType = "efi";
|
||||||
|
configFile = pkgs.writeText "configuration.nix"
|
||||||
|
''
|
||||||
|
{
|
||||||
|
imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
boot.loader.grub = lib.mkForce {
|
||||||
|
device = "nodev";
|
||||||
|
efiSupport = true;
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/ESP";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
} //
|
} //
|
||||||
(nixlib.pipe null [
|
(nixlib.pipe null [
|
||||||
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
||||||
|
|||||||
Reference in New Issue
Block a user