diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2405.section.md | 12 | ||||
-rw-r--r-- | nixos/modules/services/development/hoogle.nix | 15 | ||||
-rw-r--r-- | nixos/modules/services/networking/murmur.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/amazon-ec2-amis.nix | 68 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/ollama.nix | 56 |
6 files changed, 151 insertions, 3 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index 0905337de94d..22689868cf02 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -42,6 +42,12 @@ In addition to numerous new and upgraded packages, this release has the followin - A new option `system.etc.overlay.enable` was added. If enabled, `/etc` is mounted via an overlayfs instead of being created by a custom perl script. +- NixOS AMIs are now uploaded regularly to a new AWS Account. + Instructions on how to use them can be found on <https://nixos.github.io/amis>. + We are working on integration the data into the NixOS homepage. + The list in `nixos/modules/virtualisation/amazon-ec2-amis.nix` will stop + being updated and will be removed in the future. + - It is now possible to have a completely perlless system (i.e. a system without perl). Previously, the NixOS activation depended on two perl scripts which can now be replaced via an opt-in mechanism. To make your system @@ -131,6 +137,12 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m [v0.31](https://github.com/derailed/k9s/releases/tag/v0.31.0) for details. It is recommended to back up your current configuration and let k9s recreate the new base configuration. +- NixOS AMIs are now uploaded regularly to a new AWS Account. + Instructions on how to use them can be found on <https://nixos.github.io/amis>. + We are working on integration the data into the NixOS homepage. + The list in `nixos/modules/virtualisation/amazon-ec2-amis.nix` will stop + being updated and will be removed in the future. + - The option `services.postgresql.ensureUsers._.ensurePermissions` has been removed as it's not declarative and is broken with newer postgresql versions. Consider using [](#opt-services.postgresql.ensureUsers._.ensureDBOwnership) diff --git a/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix index 88dd01fd8aab..c90bb7f01902 100644 --- a/nixos/modules/services/development/hoogle.nix +++ b/nixos/modules/services/development/hoogle.nix @@ -56,6 +56,16 @@ in { description = lib.mdDoc "Set the host to bind on."; default = "127.0.0.1"; }; + + extraOptions = mkOption { + type = types.listOf types.str; + default = []; + example = [ "--no-security-headers" ]; + description = lib.mdDoc '' + Additional command-line arguments to pass to + {command}`hoogle server` + ''; + }; }; config = mkIf cfg.enable { @@ -66,7 +76,10 @@ in { serviceConfig = { Restart = "always"; - ExecStart = ''${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host}''; + ExecStart = '' + ${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host} \ + ${concatStringsSep " " cfg.extraOptions} + ''; DynamicUser = true; diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 5805f332a66f..1fb5063e5ad8 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -33,7 +33,7 @@ let sendversion=${boolToString cfg.sendVersion} ${optionalString (cfg.registerName != "") "registerName=${cfg.registerName}"} - ${optionalString (cfg.registerPassword == "") "registerPassword=${cfg.registerPassword}"} + ${optionalString (cfg.registerPassword != "") "registerPassword=${cfg.registerPassword}"} ${optionalString (cfg.registerUrl != "") "registerUrl=${cfg.registerUrl}"} ${optionalString (cfg.registerHostname != "") "registerHostname=${cfg.registerHostname}"} diff --git a/nixos/modules/virtualisation/amazon-ec2-amis.nix b/nixos/modules/virtualisation/amazon-ec2-amis.nix index ff88f02e5d33..97636f4dcb2a 100644 --- a/nixos/modules/virtualisation/amazon-ec2-amis.nix +++ b/nixos/modules/virtualisation/amazon-ec2-amis.nix @@ -1,3 +1,6 @@ +# NOTE: this file will stop being updated. +# please use https://nixos.github.io/amis/ and https://nixos.github.io/amis/images.json +# instead. let self = { "14.04".ap-northeast-1.x86_64-linux.hvm-ebs = "ami-71c6f470"; "14.04".ap-northeast-1.x86_64-linux.pv-ebs = "ami-4dcbf84c"; @@ -584,5 +587,68 @@ let self = { "23.05".us-west-1.aarch64-linux.hvm-ebs = "ami-0e75c8f3deb1f842b"; "23.05".us-west-2.aarch64-linux.hvm-ebs = "ami-0d0979d889078d036"; - latest = self."23.05"; + + # 23.11.4976.79baff8812a0 + + "23.11".eu-north-1.x86_64-linux.hvm-ebs = "ami-00e64007071666b9e"; + "23.11".ap-south-2.x86_64-linux.hvm-ebs = "ami-0bbb8e5663f912455"; + "23.11".ap-south-1.x86_64-linux.hvm-ebs = "ami-057ec482a7bc9cb87"; + "23.11".eu-south-1.x86_64-linux.hvm-ebs = "ami-083f9740e86ab36b9"; + "23.11".eu-south-2.x86_64-linux.hvm-ebs = "ami-0686a9ef630e6eeef"; + "23.11".me-central-1.x86_64-linux.hvm-ebs = "ami-0475d5925ff0390f8"; + "23.11".il-central-1.x86_64-linux.hvm-ebs = "ami-0997e21a353de1226"; + "23.11".ca-central-1.x86_64-linux.hvm-ebs = "ami-0f9fc310496ea54ec"; + "23.11".eu-central-1.x86_64-linux.hvm-ebs = "ami-0923e79b6f9b198fa"; + "23.11".eu-central-2.x86_64-linux.hvm-ebs = "ami-0b02e6421cde609ff"; + "23.11".us-west-1.x86_64-linux.hvm-ebs = "ami-0e94c086e49480566"; + "23.11".us-west-2.x86_64-linux.hvm-ebs = "ami-0a2f8942a90eb233a"; + "23.11".af-south-1.x86_64-linux.hvm-ebs = "ami-0c9ff564e4a503c56"; + "23.11".eu-west-3.x86_64-linux.hvm-ebs = "ami-0955d4d89c446d5ff"; + "23.11".eu-west-2.x86_64-linux.hvm-ebs = "ami-0c5834d32e6dce6c8"; + "23.11".eu-west-1.x86_64-linux.hvm-ebs = "ami-0e7d1823ac80520e6"; + "23.11".ap-northeast-3.x86_64-linux.hvm-ebs = "ami-06b3692ef87ef308a"; + "23.11".ap-northeast-2.x86_64-linux.hvm-ebs = "ami-0fb1e23007bdc6083"; + "23.11".me-south-1.x86_64-linux.hvm-ebs = "ami-0a4beeb2fc744c149"; + "23.11".ap-northeast-1.x86_64-linux.hvm-ebs = "ami-0f60ab2288ac784c3"; + "23.11".sa-east-1.x86_64-linux.hvm-ebs = "ami-058779e1d5c1cc6ae"; + "23.11".ap-east-1.x86_64-linux.hvm-ebs = "ami-039879f1b367e167f"; + "23.11".ca-west-1.x86_64-linux.hvm-ebs = "ami-07dc9bc5645a981f1"; + "23.11".ap-southeast-1.x86_64-linux.hvm-ebs = "ami-0ee92af1fc4c4e5f3"; + "23.11".ap-southeast-2.x86_64-linux.hvm-ebs = "ami-0814092ef52275887"; + "23.11".ap-southeast-3.x86_64-linux.hvm-ebs = "ami-0d20b4b6529b6214c"; + "23.11".ap-southeast-4.x86_64-linux.hvm-ebs = "ami-0aa7b8aa04e5ec741"; + "23.11".us-east-1.x86_64-linux.hvm-ebs = "ami-0c2e37dc938ed9405"; + "23.11".us-east-2.x86_64-linux.hvm-ebs = "ami-05c218c4a08c58296"; + + "23.11".eu-north-1.aarch64-linux.hvm-ebs = "ami-05e68ac90786e5ac0"; + "23.11".ap-south-2.aarch64-linux.hvm-ebs = "ami-0a53356d3176a82af"; + "23.11".ap-south-1.aarch64-linux.hvm-ebs = "ami-0cc335be202b53954"; + "23.11".eu-south-1.aarch64-linux.hvm-ebs = "ami-05d387849385390c0"; + "23.11".eu-south-2.aarch64-linux.hvm-ebs = "ami-0193deb9aa4b398bb"; + "23.11".me-central-1.aarch64-linux.hvm-ebs = "ami-05bd96550451e131d"; + "23.11".il-central-1.aarch64-linux.hvm-ebs = "ami-0264204c502a16f49"; + "23.11".ca-central-1.aarch64-linux.hvm-ebs = "ami-08345537f80791b3c"; + "23.11".eu-central-1.aarch64-linux.hvm-ebs = "ami-03b257130b2b01000"; + "23.11".eu-central-2.aarch64-linux.hvm-ebs = "ami-0b4412d8a4d3fb7ae"; + "23.11".us-west-1.aarch64-linux.hvm-ebs = "ami-0a2d70cd7a3b03e24"; + "23.11".us-west-2.aarch64-linux.hvm-ebs = "ami-01b8e062c74311de0"; + "23.11".af-south-1.aarch64-linux.hvm-ebs = "ami-011c296fee301596b"; + "23.11".eu-west-3.aarch64-linux.hvm-ebs = "ami-024531ee8546d7ec7"; + "23.11".eu-west-2.aarch64-linux.hvm-ebs = "ami-0a5dda5cf7e00b39b"; + "23.11".eu-west-1.aarch64-linux.hvm-ebs = "ami-013f7a51b602dec7d"; + "23.11".ap-northeast-3.aarch64-linux.hvm-ebs = "ami-0220fc0e06979c6ff"; + "23.11".ap-northeast-2.aarch64-linux.hvm-ebs = "ami-0978048539bbad573"; + "23.11".me-south-1.aarch64-linux.hvm-ebs = "ami-02057e1a9c901b506"; + "23.11".ap-northeast-1.aarch64-linux.hvm-ebs = "ami-05616e07e227f9982"; + "23.11".sa-east-1.aarch64-linux.hvm-ebs = "ami-0bf5255283cec803b"; + "23.11".ap-east-1.aarch64-linux.hvm-ebs = "ami-00432470e52956e49"; + "23.11".ca-west-1.aarch64-linux.hvm-ebs = "ami-0675649785473e1ac"; + "23.11".ap-southeast-1.aarch64-linux.hvm-ebs = "ami-006494f0fa381ba53"; + "23.11".ap-southeast-2.aarch64-linux.hvm-ebs = "ami-0d8c15d68266d6881"; + "23.11".ap-southeast-3.aarch64-linux.hvm-ebs = "ami-0db38da4ed78d2a10"; + "23.11".ap-southeast-4.aarch64-linux.hvm-ebs = "ami-098b3b942486b5e71"; + "23.11".us-east-1.aarch64-linux.hvm-ebs = "ami-02d1d66bda50b9036"; + "23.11".us-east-2.aarch64-linux.hvm-ebs = "ami-0aa62457617706386"; + + latest = self."23.11"; }; in self diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 6c188593a97a..ac64b85dd486 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -640,6 +640,7 @@ in { nzbget = handleTest ./nzbget.nix {}; nzbhydra2 = handleTest ./nzbhydra2.nix {}; oh-my-zsh = handleTest ./oh-my-zsh.nix {}; + ollama = handleTest ./ollama.nix {}; ombi = handleTest ./ombi.nix {}; openarena = handleTest ./openarena.nix {}; openldap = handleTest ./openldap.nix {}; diff --git a/nixos/tests/ollama.nix b/nixos/tests/ollama.nix new file mode 100644 index 000000000000..4b21f445cdbd --- /dev/null +++ b/nixos/tests/ollama.nix @@ -0,0 +1,56 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +let + mainPort = "11434"; + altPort = "11435"; + + curlRequest = port: request: + "curl http://127.0.0.1:${port}/api/generate -d '${builtins.toJSON request}'"; + + prompt = { + model = "tinydolphin"; + prompt = "lorem ipsum"; + options = { + seed = 69; + temperature = 0; + }; + }; +in +{ + name = "ollama"; + meta = with lib.maintainers; { + maintainers = [ abysssol ]; + }; + + nodes = { + cpu = { ... }: { + services.ollama.enable = true; + }; + + rocm = { ... }: { + services.ollama.enable = true; + services.ollama.acceleration = "rocm"; + }; + + cuda = { ... }: { + services.ollama.enable = true; + services.ollama.acceleration = "cuda"; + }; + + altAddress = { ... }: { + services.ollama.enable = true; + services.ollama.listenAddress = "127.0.0.1:${altPort}"; + }; + }; + + testScript = '' + vms = [ cpu, rocm, cuda, altAddress ]; + + start_all() + for vm in vms: + vm.wait_for_unit("multi-user.target") + + stdout = cpu.succeed("""${curlRequest mainPort prompt}""", timeout=100) + + stdout = altAddress.succeed("""${curlRequest altPort prompt}""", timeout=100) + ''; +}) |