Ajout de la conf hardware

wiki
Lyes Saadi 2025-05-24 23:18:35 +02:00
parent 3eba630fe9
commit ac9ed3a369
No known key found for this signature in database
GPG Key ID: 55A1D803917CF39A
4 changed files with 52 additions and 69 deletions

View File

@ -6,7 +6,7 @@
./networking.nix
../../../modules
../../../modules/services/wiki.nix
# ../../../modules/services/mediawiki.nix
];
networking.hostName = "mediakiwi";

View File

@ -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.<interface>.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";
}

View File

@ -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=";
};
};
};
}

View File

@ -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=";
};
};
};
}