diff --git a/.vscode/upgrade.sh b/.vscode/upgrade.sh index c09dcf2..f3ecb90 100755 --- a/.vscode/upgrade.sh +++ b/.vscode/upgrade.sh @@ -15,8 +15,8 @@ trap 'handle_error "$BASH_COMMAND"' ERR nix flake update # update systems -sudo nixos-rebuild switch -L --flake .#neodymium -nixos-rebuild switch -L --flake .#hydrogen --target-host hydrogen +sudo nixos-rebuild switch -L --flake .#silicium +nixos-rebuild switch -L --flake .#cesium --target-host cesium # commit and push lock file git add flake.lock diff --git a/flake.nix b/flake.nix index c258b7d..e5aef7d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,9 @@ { description = "Laureηt's infrastructure"; - # TODO: rekey les secrets + changer la key de hydrogen - # TODO: luks encrypt hydrogen (dropbear ?) - # TODO: dégager btfrs de neodymium, ext4 ftw - # TODO: setup disko sur neodymium + # TODO: rekey les secrets + changer la key de cesium + # TODO: luks encrypt cesium (dropbear ?) + # TODO: setup disko sur silicium inputs = { # core stuff @@ -77,7 +76,7 @@ flake = false; }; - # hydrogen nginx sites + # cesium nginx sites resume = { url = "git+https://git.fainsin.bzh/Laurent/resume"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/shell/git.nix b/home/shell/git.nix index cd399ab..6d931e9 100644 --- a/home/shell/git.nix +++ b/home/shell/git.nix @@ -6,7 +6,7 @@ userEmail = "laurent@fainsin.bzh"; signing = { signByDefault = true; - key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@silicium"; }; }; } diff --git a/hosts/hydrogen/default.nix b/hosts/cesium/default.nix similarity index 100% rename from hosts/hydrogen/default.nix rename to hosts/cesium/default.nix diff --git a/hosts/hydrogen/services/acme/default.nix b/hosts/cesium/services/acme/default.nix similarity index 100% rename from hosts/hydrogen/services/acme/default.nix rename to hosts/cesium/services/acme/default.nix diff --git a/hosts/hydrogen/services/atuin/default.nix b/hosts/cesium/services/atuin/default.nix similarity index 100% rename from hosts/hydrogen/services/atuin/default.nix rename to hosts/cesium/services/atuin/default.nix diff --git a/hosts/hydrogen/services/default.nix b/hosts/cesium/services/default.nix similarity index 100% rename from hosts/hydrogen/services/default.nix rename to hosts/cesium/services/default.nix diff --git a/hosts/hydrogen/services/gitea/default.nix b/hosts/cesium/services/gitea/default.nix similarity index 100% rename from hosts/hydrogen/services/gitea/default.nix rename to hosts/cesium/services/gitea/default.nix diff --git a/hosts/hydrogen/services/nginx/default.nix b/hosts/cesium/services/nginx/default.nix similarity index 100% rename from hosts/hydrogen/services/nginx/default.nix rename to hosts/cesium/services/nginx/default.nix diff --git a/hosts/hydrogen/services/nginx/laurent/default.nix b/hosts/cesium/services/nginx/laurent/default.nix similarity index 100% rename from hosts/hydrogen/services/nginx/laurent/default.nix rename to hosts/cesium/services/nginx/laurent/default.nix diff --git a/hosts/hydrogen/services/nginx/laurent/resume.nix b/hosts/cesium/services/nginx/laurent/resume.nix similarity index 100% rename from hosts/hydrogen/services/nginx/laurent/resume.nix rename to hosts/cesium/services/nginx/laurent/resume.nix diff --git a/hosts/hydrogen/services/nginx/laurent/website.nix b/hosts/cesium/services/nginx/laurent/website.nix similarity index 100% rename from hosts/hydrogen/services/nginx/laurent/website.nix rename to hosts/cesium/services/nginx/laurent/website.nix diff --git a/hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix b/hosts/cesium/services/nginx/n7/TP-calcul-parallele.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix rename to hosts/cesium/services/nginx/n7/TP-calcul-parallele.nix diff --git a/hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix b/hosts/cesium/services/nginx/n7/TP-reinforcement-learning.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix rename to hosts/cesium/services/nginx/n7/TP-reinforcement-learning.nix diff --git a/hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix b/hosts/cesium/services/nginx/n7/TP-traitement-audio-visuel.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix rename to hosts/cesium/services/nginx/n7/TP-traitement-audio-visuel.nix diff --git a/hosts/hydrogen/services/nginx/n7/default.nix b/hosts/cesium/services/nginx/n7/default.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/default.nix rename to hosts/cesium/services/nginx/n7/default.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix b/hosts/cesium/services/nginx/n7/projet-audionumerique.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix rename to hosts/cesium/services/nginx/n7/projet-audionumerique.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix b/hosts/cesium/services/nginx/n7/projet-fin-etude.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix rename to hosts/cesium/services/nginx/n7/projet-fin-etude.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix b/hosts/cesium/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix rename to hosts/cesium/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-long.nix b/hosts/cesium/services/nginx/n7/projet-long.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-long.nix rename to hosts/cesium/services/nginx/n7/projet-long.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix b/hosts/cesium/services/nginx/n7/projet-modelisation-geometrique.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix rename to hosts/cesium/services/nginx/n7/projet-modelisation-geometrique.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix b/hosts/cesium/services/nginx/n7/projet-oral-anglais.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix rename to hosts/cesium/services/nginx/n7/projet-oral-anglais.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix b/hosts/cesium/services/nginx/n7/projet-oral-japonais.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix rename to hosts/cesium/services/nginx/n7/projet-oral-japonais.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix b/hosts/cesium/services/nginx/n7/projet-probleme-inverse-3D.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix rename to hosts/cesium/services/nginx/n7/projet-probleme-inverse-3D.nix diff --git a/hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix b/hosts/cesium/services/nginx/n7/projet-systemes-algorithmes-repartis.nix similarity index 100% rename from hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix rename to hosts/cesium/services/nginx/n7/projet-systemes-algorithmes-repartis.nix diff --git a/hosts/hydrogen/services/ssh/default.nix b/hosts/cesium/services/ssh/default.nix similarity index 100% rename from hosts/hydrogen/services/ssh/default.nix rename to hosts/cesium/services/ssh/default.nix diff --git a/hosts/hydrogen/system/boot/default.nix b/hosts/cesium/system/boot/default.nix similarity index 100% rename from hosts/hydrogen/system/boot/default.nix rename to hosts/cesium/system/boot/default.nix diff --git a/hosts/hydrogen/system/default.nix b/hosts/cesium/system/default.nix similarity index 100% rename from hosts/hydrogen/system/default.nix rename to hosts/cesium/system/default.nix diff --git a/hosts/hydrogen/system/disko/default.nix b/hosts/cesium/system/disko/default.nix similarity index 100% rename from hosts/hydrogen/system/disko/default.nix rename to hosts/cesium/system/disko/default.nix diff --git a/hosts/hydrogen/system/networking/default.nix b/hosts/cesium/system/networking/default.nix similarity index 92% rename from hosts/hydrogen/system/networking/default.nix rename to hosts/cesium/system/networking/default.nix index 596de77..19bb319 100644 --- a/hosts/hydrogen/system/networking/default.nix +++ b/hosts/cesium/system/networking/default.nix @@ -1,7 +1,7 @@ {...}: { networking = { # the name of the machine - hostName = "hydrogen"; + hostName = "cesium"; # the domain used for the machine domain = "fainsin.bzh"; diff --git a/hosts/hydrogen/system/nix/default.nix b/hosts/cesium/system/nix/default.nix similarity index 100% rename from hosts/hydrogen/system/nix/default.nix rename to hosts/cesium/system/nix/default.nix diff --git a/hosts/hydrogen/system/packages/default.nix b/hosts/cesium/system/packages/default.nix similarity index 100% rename from hosts/hydrogen/system/packages/default.nix rename to hosts/cesium/system/packages/default.nix diff --git a/hosts/hydrogen/system/users/default.nix b/hosts/cesium/system/users/default.nix similarity index 100% rename from hosts/hydrogen/system/users/default.nix rename to hosts/cesium/system/users/default.nix diff --git a/hosts/default.nix b/hosts/default.nix index d493d9a..f95f5a7 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -9,14 +9,19 @@ users.laurent = ../home; }; in { - # neodymium laptop - neodymium = nixpkgs.lib.nixosSystem { + # naming convention based on the periodic table + # NAS would be neodymium + # desktop would be neon + # smartphone would be lithium + + # personal laptop + silicium = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./neodymium + ./silicium inputs.home-manager.nixosModules.home-manager inputs.agenix.nixosModules.default inputs.lanzaboote.nixosModules.lanzaboote @@ -28,15 +33,34 @@ in { ]; }; - # hydrogen vps - hydrogen = nixpkgs.lib.nixosSystem rec { + # # work laptop + # aurum = nixpkgs.lib.nixosSystem { + # system = "x86_64-linux"; + # specialArgs = { + # inherit inputs; + # }; + # modules = [ + # ./aurum + # inputs.home-manager.nixosModules.home-manager + # inputs.agenix.nixosModules.default + # # inputs.lanzaboote.nixosModules.lanzaboote + # # inputs.nixos-hardware.nixosModules.common-cpu-amd + # # inputs.nixos-hardware.nixosModules.common-gpu-nvidia-disable + # # inputs.nixos-hardware.nixosModules.common-pc-laptop + # # inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd + # {inherit home-manager;} + # ]; + # }; + + # vps + cesium = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; specialArgs = { inherit inputs; inherit system; }; modules = [ - ./hydrogen + ./cesium inputs.home-manager.nixosModules.home-manager inputs.disko.nixosModules.default inputs.agenix.nixosModules.default diff --git a/hosts/neodymium/default.nix b/hosts/silicon/default.nix similarity index 100% rename from hosts/neodymium/default.nix rename to hosts/silicon/default.nix diff --git a/hosts/neodymium/services/borgbackup/default.nix b/hosts/silicon/services/borgbackup/default.nix similarity index 100% rename from hosts/neodymium/services/borgbackup/default.nix rename to hosts/silicon/services/borgbackup/default.nix diff --git a/hosts/neodymium/services/default.nix b/hosts/silicon/services/default.nix similarity index 100% rename from hosts/neodymium/services/default.nix rename to hosts/silicon/services/default.nix diff --git a/hosts/neodymium/services/greetd/default.nix b/hosts/silicon/services/greetd/default.nix similarity index 100% rename from hosts/neodymium/services/greetd/default.nix rename to hosts/silicon/services/greetd/default.nix diff --git a/hosts/neodymium/system/adb/default.nix b/hosts/silicon/system/adb/default.nix similarity index 100% rename from hosts/neodymium/system/adb/default.nix rename to hosts/silicon/system/adb/default.nix diff --git a/hosts/neodymium/system/age/default.nix b/hosts/silicon/system/age/default.nix similarity index 100% rename from hosts/neodymium/system/age/default.nix rename to hosts/silicon/system/age/default.nix diff --git a/hosts/neodymium/system/audio/default.nix b/hosts/silicon/system/audio/default.nix similarity index 100% rename from hosts/neodymium/system/audio/default.nix rename to hosts/silicon/system/audio/default.nix diff --git a/hosts/neodymium/system/boot/default.nix b/hosts/silicon/system/boot/default.nix similarity index 100% rename from hosts/neodymium/system/boot/default.nix rename to hosts/silicon/system/boot/default.nix diff --git a/hosts/neodymium/system/boot/lanzaboot.nix b/hosts/silicon/system/boot/lanzaboot.nix similarity index 100% rename from hosts/neodymium/system/boot/lanzaboot.nix rename to hosts/silicon/system/boot/lanzaboot.nix diff --git a/hosts/neodymium/system/default.nix b/hosts/silicon/system/default.nix similarity index 100% rename from hosts/neodymium/system/default.nix rename to hosts/silicon/system/default.nix diff --git a/hosts/neodymium/system/docker/default.nix b/hosts/silicon/system/docker/default.nix similarity index 100% rename from hosts/neodymium/system/docker/default.nix rename to hosts/silicon/system/docker/default.nix diff --git a/hosts/neodymium/system/fonts/default.nix b/hosts/silicon/system/fonts/default.nix similarity index 100% rename from hosts/neodymium/system/fonts/default.nix rename to hosts/silicon/system/fonts/default.nix diff --git a/hosts/neodymium/system/hardware/default.nix b/hosts/silicon/system/hardware/default.nix similarity index 100% rename from hosts/neodymium/system/hardware/default.nix rename to hosts/silicon/system/hardware/default.nix diff --git a/hosts/neodymium/system/hardware/partitions.nix b/hosts/silicon/system/hardware/partitions.nix similarity index 100% rename from hosts/neodymium/system/hardware/partitions.nix rename to hosts/silicon/system/hardware/partitions.nix diff --git a/hosts/neodymium/system/i18n/default.nix b/hosts/silicon/system/i18n/default.nix similarity index 100% rename from hosts/neodymium/system/i18n/default.nix rename to hosts/silicon/system/i18n/default.nix diff --git a/hosts/neodymium/system/networking/default.nix b/hosts/silicon/system/networking/default.nix similarity index 92% rename from hosts/neodymium/system/networking/default.nix rename to hosts/silicon/system/networking/default.nix index 669bcb7..2b7873e 100644 --- a/hosts/neodymium/system/networking/default.nix +++ b/hosts/silicon/system/networking/default.nix @@ -1,7 +1,7 @@ {...}: { networking = { # the name of the machine - hostName = "neodymium"; + hostName = "silicium"; # domain name servers, use clouflare family nameservers = ["1.1.1.2" "1.0.0.2"]; diff --git a/hosts/neodymium/system/nix/default.nix b/hosts/silicon/system/nix/default.nix similarity index 100% rename from hosts/neodymium/system/nix/default.nix rename to hosts/silicon/system/nix/default.nix diff --git a/hosts/neodymium/system/security/default.nix b/hosts/silicon/system/security/default.nix similarity index 100% rename from hosts/neodymium/system/security/default.nix rename to hosts/silicon/system/security/default.nix diff --git a/hosts/neodymium/system/users/default.nix b/hosts/silicon/system/users/default.nix similarity index 100% rename from hosts/neodymium/system/users/default.nix rename to hosts/silicon/system/users/default.nix diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 52a3227..ff7bfd1 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,7 +1,7 @@ let - neodymium = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; - hydrogen = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxh42mMYqftTU7WtfktZbkdMI07VuH7mhUv3m2Ca3fV root@hydrogen"; + silicium = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@silicium"; + cesium = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxh42mMYqftTU7WtfktZbkdMI07VuH7mhUv3m2Ca3fV root@cesium"; in { - "borgbackup.age".publicKeys = [neodymium]; - "gitea.age".publicKeys = [neodymium hydrogen]; + "borgbackup.age".publicKeys = [silicium]; + "gitea.age".publicKeys = [silicium cesium]; }