diff --git a/hosts/vm/mediakiwi/default.nix b/hosts/vm/mediakiwi/default.nix index 44ee90d..09e1ac4 100644 --- a/hosts/vm/mediakiwi/default.nix +++ b/hosts/vm/mediakiwi/default.nix @@ -6,7 +6,7 @@ ./networking.nix ../../../modules - ../../../modules/services/wiki.nix + # ../../../modules/services/mediawiki.nix ]; networking.hostName = "mediakiwi"; diff --git a/hosts/vm/mediakiwi/hardware-configuration.nix b/hosts/vm/mediakiwi/hardware-configuration.nix index c61d274..de32983 100644 --- a/hosts/vm/mediakiwi/hardware-configuration.nix +++ b/hosts/vm/mediakiwi/hardware-configuration.nix @@ -1,37 +1,24 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = [ - "ata_piix" - "uhci_hcd" - "virtio_pci" - "virtio_scsi" - "sd_mod" - "sr_mod" - ]; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/6aab06d9-2d09-4929-a680-719c6818a663"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/74148438-bd6e-4c19-a41c-d20c907f1fc1"; + fsType = "ext4"; + }; - swapDevices = [ { device = "/dev/disk/by-uuid/24f88af8-323d-48e3-8872-402b8bbbdc13"; } ]; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -39,7 +26,6 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.ens18.useDHCP = lib.mkDefault true; - # networking.interfaces.ens19.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/modules/services/mediawiki.nix b/modules/services/mediawiki.nix new file mode 100644 index 0000000..bfdca9b --- /dev/null +++ b/modules/services/mediawiki.nix @@ -0,0 +1,41 @@ +{ pkgs, ... }: + +{ + services.mediawiki = { + enable = true; + + httpd.virtualHost = { + hostName = "mediakiwi.crans.org"; + adminAddr = "root@crans.org"; + + listen = [ + { + ip = "127.0.0.1"; + port = 8080; + } + ]; + }; + + passwordFile = pkgs.writeText "password" "cardbotine"; + + extraConfig = '' + # contact info + $wgEmergencyContact = 'contact@crans.org'; + + # default theme + $wgDefaultSkin = 'citizen'; + + $wgLanguageCode = 'fr'; + + # Disable anonymous editing + $wgGroupPermissions['*']['edit'] = false; + ''; + + skins = { + Citizen = pkgs.fetchzip { + url = "https://github.com/StarCitizenTools/mediawiki-skins-Citizen/archive/main.zip"; + sha256 = "sha256-6ZhrAHAKWHGij1qBgigEll0xbGhEOo0hYTMuakkU06o="; + }; + }; + }; +} diff --git a/modules/services/wiki.nix b/modules/services/wiki.nix deleted file mode 100644 index c692a0d..0000000 --- a/modules/services/wiki.nix +++ /dev/null @@ -1,44 +0,0 @@ -{pkgs, ...}: -{ - - services.mediawiki = { - enable = true; - - httpd.virtualHost = { - hostName = "test-wiki.crans.org"; - adminAddr = "root@crans.org"; - - listen = [ - { - ip = "127.0.0.1"; - port = 8080; - # ssl = false; - } - ]; - }; - - passwordFile = pkgs.writeText "password" "cardbotine"; - - extraConfig = '' - # contact info - $wgEmergencyContact = 'contact@crans.org'; - - - - # default theme - $wgDefaultSkin = 'citizen'; - - $wgLanguageCode = 'fr'; - - # Disable anonymous editing - $wgGroupPermissions['*']['edit'] = false; - ''; - - skins = { - Citizen = pkgs.fetchzip { - url = "https://github.com/StarCitizenTools/mediawiki-skins-Citizen/archive/main.zip"; - sha256 = "sha256-6ZhrAHAKWHGij1qBgigEll0xbGhEOo0hYTMuakkU06o="; - }; - }; - }; -}