Compare commits
12 Commits
capgemini-
...
master
Author | SHA1 | Date |
---|---|---|
|
06a4f2bf68 | 8 years ago |
|
5759eca480 | 8 years ago |
|
d2b528a357 | 8 years ago |
|
12021f5525 | 8 years ago |
|
046db7450e | 8 years ago |
|
48b831d495 | 8 years ago |
|
8c83cdc234 | 8 years ago |
|
50125c448d | 8 years ago |
|
0ced39d580 | 8 years ago |
|
0f148b336e | 8 years ago |
|
9c90c5efb9 | 8 years ago |
|
3b17e61aba | 8 years ago |
@ -1,5 +1,14 @@
|
|||||||
build-iso:
|
all: submodules-update build-iso
|
||||||
|
@date
|
||||||
|
|
||||||
|
build-iso: iso-minimal
|
||||||
|
|
||||||
|
iso-minimal:
|
||||||
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=livecd-minimal.nix
|
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=livecd-minimal.nix
|
||||||
|
|
||||||
|
iso-custom:
|
||||||
|
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=livecd-custom.nix
|
||||||
|
|
||||||
submodules-update:
|
submodules-update:
|
||||||
git submodule update --remote
|
git submodule update --remote
|
||||||
|
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
# Custom NixOS Live CD
|
# Custom NixOS Live CD
|
||||||
|
|
||||||
After partitioning and mounting of your partitions under `/mnt`, go to `/iso/custom` and run `make`.
|
After partitioning and mounting of your partitions under `/mnt`, go to `/iso/custom` and run `make`.
|
||||||
|
|
||||||
|
## How to generate .iso from NixOS ?
|
||||||
|
|
||||||
|
1. clone git repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone --recursive ssh://git@gogs.prunetwork.fr:10022/nixos-config/nixos-livecd.git
|
||||||
|
```
|
||||||
|
|
||||||
|
1. run `make`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd nixos-livecd
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
1. use generated iso
|
||||||
|
|
||||||
|
`nix-buil` tells you where it was generated
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 13a77dcccdd2aa0ef610ae86c7c31d2da70fda05
|
|
@ -0,0 +1,193 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
custom-generator = "generate-config.sh";
|
||||||
|
r6dLib = import ./nixos-template-base/lib.nix;
|
||||||
|
hostname = "nixos-livecd.grudu.net";
|
||||||
|
|
||||||
|
dockerGitea = pkgs.dockerTools.pullImage {
|
||||||
|
imageName = "gitea/gitea";
|
||||||
|
imageTag = "latest";
|
||||||
|
sha256 = "0hxi9hcgrm7qp4bq9lvc0i2b84ry2m2c2dq98ajyp6j6hzn7f9pz";
|
||||||
|
};
|
||||||
|
dockerJenkins = pkgs.dockerTools.pullImage {
|
||||||
|
imageName = "jenkins";
|
||||||
|
imageTag = "latest";
|
||||||
|
sha256 = "1i70alhks87wl5s4yqs66f6rc5cgazna0pr8q3vn8qv99r7vwa86";
|
||||||
|
};
|
||||||
|
dockerSonar = pkgs.dockerTools.pullImage {
|
||||||
|
imageName = "sonarqube";
|
||||||
|
imageTag = "latest";
|
||||||
|
sha256 = "1ls3jg04flwxhf3c7jpm798zmwa9i4644jri2vymdzkwd0z63shp";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||||
|
nixos-template-base/base.nix
|
||||||
|
];
|
||||||
|
# Custom name
|
||||||
|
isoImage.isoName = pkgs.lib.mkForce "${config.isoImage.isoBaseName}-grudu.net-${config.system.nixosLabel}-${pkgs.stdenv.system}.iso";
|
||||||
|
# Avoid having the terminal flooded by kernel audit messages
|
||||||
|
boot.kernelParams = [ "audit=0" ];
|
||||||
|
|
||||||
|
# Files to copy to the liveCD
|
||||||
|
isoImage.contents = [
|
||||||
|
{
|
||||||
|
source = ./generate-config.sh;
|
||||||
|
target = "/custom/${custom-generator}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
environment.shellAliases = { nixos-generate-custom-config = "/iso/custom/${custom-generator}";};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# nécessaire pour bootraper
|
||||||
|
git
|
||||||
|
gpm
|
||||||
|
sudo
|
||||||
|
wget
|
||||||
|
vim
|
||||||
|
|
||||||
|
# Complément
|
||||||
|
atop # monitoring
|
||||||
|
gitstats
|
||||||
|
glxinfo
|
||||||
|
gource
|
||||||
|
haskellPackages.bench # outil pour générer des benchmarks
|
||||||
|
haskellPackages.pandoc-filter-graphviz
|
||||||
|
|
||||||
|
#dockerGitea
|
||||||
|
#dockerJenkins
|
||||||
|
#dockerSonar
|
||||||
|
|
||||||
|
# Smokeping
|
||||||
|
bind
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
networking.hostName = "${hostname}";
|
||||||
|
services = {
|
||||||
|
openssh.enable = true;
|
||||||
|
virtualbox.guest.enable = true;
|
||||||
|
xserver.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
r6d.machines = r6dLib.applyProfilesToDirectory {} {
|
||||||
|
"${hostname}" = {
|
||||||
|
configurationFlags = {
|
||||||
|
dns_resolveur = true;
|
||||||
|
edition-photo = true;
|
||||||
|
jetbrains-licensed = true;
|
||||||
|
};
|
||||||
|
configurationOptions = {};
|
||||||
|
profiles = {
|
||||||
|
isDubronetwork = true;
|
||||||
|
isDubronetworkWorkstation = true;
|
||||||
|
isDesktopEnvironment = true;
|
||||||
|
isPrunetwork = true;
|
||||||
|
isPrunetworkWorkstation = true;
|
||||||
|
isWorkstation = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraUsers = {
|
||||||
|
livecd = {
|
||||||
|
password = "livecd";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"audio"
|
||||||
|
"docker"
|
||||||
|
"vbox"
|
||||||
|
"vboxusers"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
initialPassword="root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Paquets avec setuid root
|
||||||
|
security.wrappers = {
|
||||||
|
# outil de diagnostic réseau
|
||||||
|
fping.source = "${pkgs.fping}/bin/fping";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.extraHosts = ''
|
||||||
|
192.168.10.1 servdevbrest dev1
|
||||||
|
192.168.10.2 dev2
|
||||||
|
192.168.10.3 dev3
|
||||||
|
192.168.10.4 dev4
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.man.enable = true;
|
||||||
|
|
||||||
|
services.smokeping = {
|
||||||
|
enable = true;
|
||||||
|
imgUrl = "http://localhost:8081/cache/"; # défini dans nginx
|
||||||
|
probeConfig = ''
|
||||||
|
+ FPing
|
||||||
|
binary = ${config.security.wrapperDir}/fping
|
||||||
|
+ FPing6
|
||||||
|
binary = ${config.security.wrapperDir}/fping6
|
||||||
|
|
||||||
|
+DNS
|
||||||
|
#binary = ${pkgs.bind}/bin/dig
|
||||||
|
binary = /run/current-system/sw/bin/dig
|
||||||
|
forks = 5
|
||||||
|
offset = 50%
|
||||||
|
step = 300
|
||||||
|
timeout = 15
|
||||||
|
'';
|
||||||
|
targetConfig = ''
|
||||||
|
probe = FPing
|
||||||
|
menu = Top
|
||||||
|
title = Suivi de la latence reseau
|
||||||
|
remark = Monitoring de la latence reseau. \
|
||||||
|
Here you will learn all about the latency of our network.
|
||||||
|
+ Local
|
||||||
|
probe = FPing
|
||||||
|
menu = Local
|
||||||
|
title = Local Network
|
||||||
|
++ LocalMachine
|
||||||
|
menu = Local Machine
|
||||||
|
title = This host
|
||||||
|
host = localhost
|
||||||
|
|
||||||
|
++ Servdevbrest
|
||||||
|
probe = FPing
|
||||||
|
menu = servdevbrest
|
||||||
|
title = Servdevbrest
|
||||||
|
host = 192.168.10.1
|
||||||
|
|
||||||
|
++ Servdevbrest2
|
||||||
|
probe = FPing
|
||||||
|
menu = servdevbrest2
|
||||||
|
title = Servdevbrest2
|
||||||
|
host = 192.168.10.2
|
||||||
|
|
||||||
|
++ Servdevbrest3
|
||||||
|
probe = FPing
|
||||||
|
menu = servdevbrest3
|
||||||
|
title = Servdevbrest3
|
||||||
|
host = 192.168.10.3
|
||||||
|
|
||||||
|
++ Servdevbrest4
|
||||||
|
probe = FPing
|
||||||
|
menu = servdevbrest4
|
||||||
|
title = Servdevbrest4
|
||||||
|
host = 192.168.10.4
|
||||||
|
|
||||||
|
++ MultiHost
|
||||||
|
menu = Multihost
|
||||||
|
title = Ensemble de mesures de latence
|
||||||
|
host = /Local/Servdevbrest /Local/Servdevbrest2 /Local/Servdevbrest3 /Local/Servdevbrest4
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# Ports ouverts
|
||||||
|
networking.firewall.enable=false;
|
||||||
|
|
||||||
|
# Pas besoin de mot de passe pour sudo
|
||||||
|
security.sudo.enable=lib.mkForce true;
|
||||||
|
security.sudo.wheelNeedsPassword=false;
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
Subproject commit 42db758638cae777f8141992d13a8c3a4e887ebf
|
Subproject commit 38cf4631dd5b8fcf0fe8742b999b53d93d9df065
|
Loading…
Reference in New Issue