diff --git a/flake.lock b/flake.lock index 71328ac..bfa95b0 100644 --- a/flake.lock +++ b/flake.lock @@ -23,9 +23,7 @@ "inputs": { "agenix": "agenix_2", "crane": "crane", - "flake-utils": [ - "flake-utils" - ], + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ], @@ -235,6 +233,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -254,6 +268,24 @@ } }, "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "lanzaboote", @@ -274,7 +306,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nixos-anywhere", @@ -295,24 +327,6 @@ "type": "github" } }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-parts_5": { "inputs": { "nixpkgs-lib": "nixpkgs-lib_3" @@ -371,6 +385,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib_6" }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_9": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_7" + }, "locked": { "lastModified": 1696343447, "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", @@ -389,11 +421,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -424,6 +456,24 @@ "inputs": { "systems": "systems_4" }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_5" + }, "locked": { "lastModified": 1694529238, "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", @@ -460,6 +510,27 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -531,7 +602,7 @@ "inputs": { "crane": "crane_2", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_4", "pre-commit-hooks-nix": "pre-commit-hooks-nix", @@ -554,7 +625,7 @@ "nixos-anywhere": { "inputs": { "disko": "disko_2", - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_4", "nixos-images": "nixos-images", "nixos-stable": "nixos-stable", "nixpkgs": "nixpkgs_5", @@ -737,6 +808,24 @@ } }, "nixpkgs-lib_6": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_7": { "locked": { "dir": "lib", "lastModified": 1696019113, @@ -770,6 +859,22 @@ "type": "github" } }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_10": { "locked": { "lastModified": 1702312524, @@ -787,6 +892,22 @@ } }, "nixpkgs_11": { + "locked": { + "lastModified": 1702312524, + "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1700612854, "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", @@ -802,7 +923,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -818,6 +939,22 @@ "type": "github" } }, + "nixpkgs_14": { + "locked": { + "lastModified": 1695644571, + "narHash": "sha256-asS9dCCdlt1lPq0DLwkVBbVoEKuEuz+Zi3DG7pR/RxA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6500b4580c2a1f3d0f980d32d285739d8e156d92", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1702272962, @@ -900,16 +1037,16 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1702312524, - "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "lastModified": 1689261696, + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -946,6 +1083,28 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_3", + "gitignore": "gitignore_2", + "nixpkgs": "nixpkgs_7", + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1702456155, + "narHash": "sha256-I2XhXGAecdGlqi6hPWYT83AQtMgL+aa3ulA85RAEgOk=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "007a45d064c1c32d04e1b8a0de5ef00984c419bc", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -979,8 +1138,8 @@ }, "projet-audionumerique": { "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_7" + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1702487657, @@ -998,8 +1157,8 @@ }, "projet-intelligence-artificielle-multimedia": { "inputs": { - "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_8" + "flake-parts": "flake-parts_6", + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1702567767, @@ -1017,8 +1176,8 @@ }, "projet-oral-anglais": { "inputs": { - "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_9" + "flake-parts": "flake-parts_7", + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1702566510, @@ -1036,8 +1195,8 @@ }, "projet-oral-japonais": { "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_10" + "flake-parts": "flake-parts_8", + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1702567061, @@ -1055,8 +1214,8 @@ }, "resume": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_11", + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_12", "typst": "typst" }, "locked": { @@ -1078,18 +1237,20 @@ "TP-calcul-parallele": "TP-calcul-parallele", "agenix": "agenix", "disko": "disko", - "flake-utils": "flake-utils", + "flake-parts": "flake-parts_2", "home-manager": "home-manager", "hyprland": "hyprland", "lanzaboote": "lanzaboote", "nixos-anywhere": "nixos-anywhere", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_6", + "pre-commit-hooks": "pre-commit-hooks", "projet-audionumerique": "projet-audionumerique", "projet-intelligence-artificielle-multimedia": "projet-intelligence-artificielle-multimedia", "projet-oral-anglais": "projet-oral-anglais", "projet-oral-japonais": "projet-oral-japonais", - "resume": "resume" + "resume": "resume", + "treefmt-nix": "treefmt-nix_2" } }, "rust-overlay": { @@ -1217,6 +1378,21 @@ "type": "github" } }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1238,12 +1414,30 @@ "type": "github" } }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_14" + }, + "locked": { + "lastModified": 1702461037, + "narHash": "sha256-ssyGxfGHRuuLHuMex+vV6RMOt7nAo07nwufg9L5GkLg=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "d06b70e5163a903f19009c3f97770014787a080f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "typst": { "inputs": { "crane": "crane_3", - "flake-parts": "flake-parts_8", - "nixpkgs": "nixpkgs_12", - "systems": "systems_5" + "flake-parts": "flake-parts_9", + "nixpkgs": "nixpkgs_13", + "systems": "systems_6" }, "locked": { "lastModified": 1700840283, diff --git a/hosts/hydrogen/default.nix b/hosts/hydrogen/default.nix index 85566db..189224b 100644 --- a/hosts/hydrogen/default.nix +++ b/hosts/hydrogen/default.nix @@ -1 +1,6 @@ -{ ... }: { imports = [ ./services ./system ]; } +{...}: { + imports = [ + ./services + ./system + ]; +} diff --git a/hosts/hydrogen/services/acme/default.nix b/hosts/hydrogen/services/acme/default.nix index cbb9991..17c1178 100644 --- a/hosts/hydrogen/services/acme/default.nix +++ b/hosts/hydrogen/services/acme/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { security.acme = { acceptTerms = true; defaults.email = "acme@fainsin.bzh"; diff --git a/hosts/hydrogen/services/atuin/default.nix b/hosts/hydrogen/services/atuin/default.nix index d734d66..cfb56f6 100644 --- a/hosts/hydrogen/services/atuin/default.nix +++ b/hosts/hydrogen/services/atuin/default.nix @@ -1,5 +1,4 @@ -{ ... }: { - +{...}: { services.atuin = { enable = true; openRegistration = false; @@ -11,9 +10,8 @@ "atuin.fainsin.bzh" = { forceSSL = true; enableACME = true; - locations."/" = { proxyPass = "http://127.0.0.1:8888"; }; + locations."/".proxyPass = "http://127.0.0.1:8888"; }; }; }; - } diff --git a/hosts/hydrogen/services/changedetection/default.nix b/hosts/hydrogen/services/changedetection/default.nix index 2ea7234..6199167 100644 --- a/hosts/hydrogen/services/changedetection/default.nix +++ b/hosts/hydrogen/services/changedetection/default.nix @@ -1 +1,3 @@ -{ ... }: { services.changedetection-io.enable = true; } +{...}: { + services.changedetection-io.enable = true; +} diff --git a/hosts/hydrogen/services/default.nix b/hosts/hydrogen/services/default.nix index 5b52644..98096cb 100644 --- a/hosts/hydrogen/services/default.nix +++ b/hosts/hydrogen/services/default.nix @@ -1 +1,9 @@ -{ ... }: { imports = [ ./acme ./atuin ./changedetection ./gitea ./nginx ]; } +{...}: { + imports = [ + ./acme + ./atuin + ./changedetection + ./gitea + ./nginx + ]; +} diff --git a/hosts/hydrogen/services/gitea/default.nix b/hosts/hydrogen/services/gitea/default.nix index 275257f..5c7e3e6 100644 --- a/hosts/hydrogen/services/gitea/default.nix +++ b/hosts/hydrogen/services/gitea/default.nix @@ -1,10 +1,14 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { age.secrets.gitea = { file = ../../../../secrets/gitea.age; owner = "gitea"; group = "gitea"; }; - age.identityPaths = [ "/root/.ssh/id_ed25519" ]; + age.identityPaths = ["/root/.ssh/id_ed25519"]; services.gitea = { enable = true; diff --git a/hosts/hydrogen/services/nginx/default.nix b/hosts/hydrogen/services/nginx/default.nix index 46ed438..7410ea2 100644 --- a/hosts/hydrogen/services/nginx/default.nix +++ b/hosts/hydrogen/services/nginx/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { services.nginx = { enable = true; @@ -11,5 +11,8 @@ # clientMaxBodySize = "0"; }; - imports = [ ./laurent ./n7 ]; + imports = [ + ./laurent + ./n7 + ]; } diff --git a/hosts/hydrogen/services/nginx/laurent/default.nix b/hosts/hydrogen/services/nginx/laurent/default.nix index 39a919d..4b474f1 100644 --- a/hosts/hydrogen/services/nginx/laurent/default.nix +++ b/hosts/hydrogen/services/nginx/laurent/default.nix @@ -1 +1,6 @@ -{ ... }: { imports = [ ./resume.nix ./website.nix ]; } +{...}: { + imports = [ + ./resume.nix + ./website.nix + ]; +} diff --git a/hosts/hydrogen/services/nginx/laurent/resume.nix b/hosts/hydrogen/services/nginx/laurent/resume.nix index 0c6cb4f..b83cf1f 100644 --- a/hosts/hydrogen/services/nginx/laurent/resume.nix +++ b/hosts/hydrogen/services/nginx/laurent/resume.nix @@ -1,4 +1,8 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { services.nginx.virtualHosts = { "resume.laurent.fainsin.bzh" = { enableACME = true; diff --git a/hosts/hydrogen/services/nginx/laurent/website.nix b/hosts/hydrogen/services/nginx/laurent/website.nix index 11e2b16..bb57a3c 100644 --- a/hosts/hydrogen/services/nginx/laurent/website.nix +++ b/hosts/hydrogen/services/nginx/laurent/website.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/Laurent/personal-website"; branchName = "pages"; @@ -17,8 +16,7 @@ in { "fainsin.bzh" = { enableACME = true; forceSSL = true; - locations."/".return = - ''301 "$scheme://laurent.fainsin.bzh$request_uri"''; + locations."/".return = ''301 "$scheme://laurent.fainsin.bzh$request_uri"''; }; default = { default = true; diff --git a/hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix b/hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix index a6c9bcd..37b8d17 100644 --- a/hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix +++ b/hosts/hydrogen/services/nginx/n7/TP-calcul-parallele.nix @@ -1,3 +1,7 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { alias = inputs.TP-calcul-parallele.packages.${system}.report + "/"; } diff --git a/hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix b/hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix index 027c428..937e3cf 100644 --- a/hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix +++ b/hosts/hydrogen/services/nginx/n7/TP-reinforcement-learning.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/ENSEEIHT/TP-reinforcement-learning"; rev = "cfd97e864894af07ba768d8fc9382ddfcc09400f"; # pages diff --git a/hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix b/hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix index d626339..b3e2a54 100644 --- a/hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix +++ b/hosts/hydrogen/services/nginx/n7/TP-traitement-audio-visuel.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchFromGitea { domain = "git.fainsin.bzh"; owner = "ENSEEIHT"; diff --git a/hosts/hydrogen/services/nginx/n7/default.nix b/hosts/hydrogen/services/nginx/n7/default.nix index dd2edd6..6b8d440 100644 --- a/hosts/hydrogen/services/nginx/n7/default.nix +++ b/hosts/hydrogen/services/nginx/n7/default.nix @@ -1,56 +1,34 @@ -{ inputs, system, pkgs, ... }: { +{ + inputs, + system, + pkgs, + ... +}: { services.nginx.virtualHosts = { "n7.laurent.fainsin.bzh" = { enableACME = true; forceSSL = true; - locations = { - - "/".return = "301 $scheme://git.fainsin.bzh/ENSEEIHT"; - - } // { - - "/projet-audionumerique/" = # # - import ./projet-audionumerique.nix { inherit inputs system; }; - - "/projet-systemes-algorithmes-repartis/" = # # - import ./projet-systemes-algorithmes-repartis.nix pkgs; - - "/projet-intelligence-artificielle-multimedia/" = # # - import ./projet-intelligence-artificielle-multimedia.nix { - inherit inputs system; - }; - - "/projet-probleme-inverse-3D/" = # # - import ./projet-probleme-inverse-3D.nix pkgs; - - "/projet-modelisation-geometrique/" = # # - import ./projet-modelisation-geometrique.nix pkgs; - - "/projet-long/" = # # - import ./projet-long.nix pkgs; - - "/projet-oral-japonais/" = # # - import ./projet-oral-japonais.nix { inherit inputs system; }; - - "/projet-oral-anglais/" = # # - import ./projet-oral-anglais.nix { inherit inputs system; }; - - "/projet-fin-etude/" = # # - import ./projet-fin-etude.nix pkgs; - - } // { - - "/TP-calcul-parallele/" = # # - import ./TP-calcul-parallele.nix { inherit inputs system; }; - - "/TP-reinforcement-learning/" = # # - import ./TP-reinforcement-learning.nix pkgs; - - "/TP-traitement-audio-visuel/" = # # - import ./TP-traitement-audio-visuel.nix pkgs; - - }; + locations = + { + "/".return = "301 $scheme://git.fainsin.bzh/ENSEEIHT"; + } + // { + "/projet-audionumerique/" = import ./projet-audionumerique.nix {inherit inputs system;}; + "/projet-systemes-algorithmes-repartis/" = import ./projet-systemes-algorithmes-repartis.nix pkgs; + "/projet-intelligence-artificielle-multimedia/" = import ./projet-intelligence-artificielle-multimedia.nix {inherit inputs system;}; + "/projet-probleme-inverse-3D/" = import ./projet-probleme-inverse-3D.nix pkgs; + "/projet-modelisation-geometrique/" = import ./projet-modelisation-geometrique.nix pkgs; + "/projet-long/" = import ./projet-long.nix pkgs; + "/projet-oral-japonais/" = import ./projet-oral-japonais.nix {inherit inputs system;}; + "/projet-oral-anglais/" = import ./projet-oral-anglais.nix {inherit inputs system;}; + "/projet-fin-etude/" = import ./projet-fin-etude.nix pkgs; + } + // { + "/TP-calcul-parallele/" = import ./TP-calcul-parallele.nix {inherit inputs system;}; + "/TP-reinforcement-learning/" = import ./TP-reinforcement-learning.nix pkgs; + "/TP-traitement-audio-visuel/" = import ./TP-traitement-audio-visuel.nix pkgs; + }; }; }; } diff --git a/hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix b/hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix index 31fdfb7..6b91881 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-audionumerique.nix @@ -1,3 +1,7 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { alias = inputs.projet-audionumerique.packages.${system}.slides + "/"; } diff --git a/hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix b/hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix index d86c7cd..dc0c304 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-fin-etude.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/ENSEEIHT/projet-fin-etude-rapport"; rev = "32fe5c7ec6d67241951fdaf001e3da1c41b29dcf"; # pages diff --git a/hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix b/hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix index ce632d5..c6d3a3a 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-intelligence-artificielle-multimedia.nix @@ -1,4 +1,8 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { alias = inputs.projet-intelligence-artificielle-multimedia.packages.${system}.slides + "/"; diff --git a/hosts/hydrogen/services/nginx/n7/projet-long.nix b/hosts/hydrogen/services/nginx/n7/projet-long.nix index 64ed1ed..e2385b8 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-long.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-long.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/ENSEEIHT/projet-long"; rev = "8290710fa7461c486dc727966c8eaa2234ae2e7d"; # pages diff --git a/hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix b/hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix index c7ada6f..33090db 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-modelisation-geometrique.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/ENSEEIHT/projet-modelisation-geometrique"; rev = "bf68bccd640e68b92749b0580c82f8ab65e923a8"; # pages diff --git a/hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix b/hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix index 276417c..4eb0e03 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-oral-anglais.nix @@ -1,3 +1,7 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { alias = inputs.projet-oral-anglais.packages.${system}.slides + "/"; } diff --git a/hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix b/hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix index afef959..ff2df1a 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-oral-japonais.nix @@ -1,3 +1,7 @@ -{ inputs, system, ... }: { +{ + inputs, + system, + ... +}: { alias = inputs.projet-oral-japonais.packages.${system}.slides + "/"; } diff --git a/hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix b/hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix index 09779a7..aab8d84 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-probleme-inverse-3D.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { url = "https://git.fainsin.bzh/ENSEEIHT/projet-probleme-inverse-3D"; rev = "9c75aadaf1b779e4f88fd42de163dedd8d5e918a"; # pages diff --git a/hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix b/hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix index 7985ce4..76bf1bb 100644 --- a/hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix +++ b/hosts/hydrogen/services/nginx/n7/projet-systemes-algorithmes-repartis.nix @@ -1,8 +1,6 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let pages = pkgs.fetchgit { - url = - "https://git.fainsin.bzh/ENSEEIHT/projet-systemes-algorithmes-repartis"; + url = "https://git.fainsin.bzh/ENSEEIHT/projet-systemes-algorithmes-repartis"; rev = "1826a53d95b19400b8dd252cd05b20012e3c3dac"; # pages sha256 = "0n81hpcj7lj5i7jhl8af869vy6fp6bhyrk4fdl6y2rpjgp64zmq2"; }; diff --git a/hosts/hydrogen/system/boot/default.nix b/hosts/hydrogen/system/boot/default.nix index 517868d..ac9613c 100644 --- a/hosts/hydrogen/system/boot/default.nix +++ b/hosts/hydrogen/system/boot/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { # clean /tmp at each boot boot.tmp.cleanOnBoot = true; diff --git a/hosts/hydrogen/system/default.nix b/hosts/hydrogen/system/default.nix index e7c0fd7..b91c335 100644 --- a/hosts/hydrogen/system/default.nix +++ b/hosts/hydrogen/system/default.nix @@ -1,4 +1,4 @@ -{ modulesPath, ... }: { +{modulesPath, ...}: { # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/hydrogen/system/disko/default.nix b/hosts/hydrogen/system/disko/default.nix index fe3ac98..815a23a 100644 --- a/hosts/hydrogen/system/disko/default.nix +++ b/hosts/hydrogen/system/disko/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { boot.loader.grub = { efiSupport = true; efiInstallAsRemovable = true; diff --git a/hosts/hydrogen/system/networking/default.nix b/hosts/hydrogen/system/networking/default.nix index 27e4ede..5affbdf 100644 --- a/hosts/hydrogen/system/networking/default.nix +++ b/hosts/hydrogen/system/networking/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { networking = { # the name of the machine hostName = "hydrogen"; @@ -7,7 +7,7 @@ domain = "fainsin.bzh"; # domain name servers, use clouflare family - nameservers = [ "1.1.1.2" "1.0.0.2" ]; + nameservers = ["1.1.1.2" "1.0.0.2"]; # TODO: bouger ça à côté des applications firewall = { diff --git a/hosts/hydrogen/system/nix/default.nix b/hosts/hydrogen/system/nix/default.nix index 9efa733..d5ac7be 100644 --- a/hosts/hydrogen/system/nix/default.nix +++ b/hosts/hydrogen/system/nix/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, nixpkgs, ... }: { +{ + lib, + pkgs, + nixpkgs, + ... +}: { # optimizations nix.settings.auto-optimise-store = true; @@ -10,14 +15,14 @@ }; # experimental features - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; # pin nixpkgs registry nix.registry.nixpkgs.flake = nixpkgs; # print diff between two generations system.activationScripts.nvd-report-changes = '' - PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} + PATH=$PATH:${lib.makeBinPath [pkgs.nvd pkgs.nix]} nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2) ''; } diff --git a/hosts/hydrogen/system/packages/default.nix b/hosts/hydrogen/system/packages/default.nix index dd2c17b..f5ff2b0 100644 --- a/hosts/hydrogen/system/packages/default.nix +++ b/hosts/hydrogen/system/packages/default.nix @@ -1,3 +1,8 @@ -{ pkgs, ... }: { - environment.systemPackages = with pkgs; [ btop borgbackup gitMinimal sysz ]; +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + btop + borgbackup + gitMinimal + sysz + ]; } diff --git a/hosts/hydrogen/system/ssh/default.nix b/hosts/hydrogen/system/ssh/default.nix index 33d6b34..f361793 100644 --- a/hosts/hydrogen/system/ssh/default.nix +++ b/hosts/hydrogen/system/ssh/default.nix @@ -1,6 +1,6 @@ -{ ... }: { +{...}: { services.openssh = { enable = true; - ports = [ 624 ]; + ports = [624]; }; } diff --git a/hosts/hydrogen/system/users/default.nix b/hosts/hydrogen/system/users/default.nix index 6f5b4f3..124db81 100644 --- a/hosts/hydrogen/system/users/default.nix +++ b/hosts/hydrogen/system/users/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { users.mutableUsers = false; users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu" diff --git a/hosts/neodymium/default.nix b/hosts/neodymium/default.nix index 61f63fc..62b5f10 100644 --- a/hosts/neodymium/default.nix +++ b/hosts/neodymium/default.nix @@ -1,5 +1,5 @@ -{ pkgs, ... }: { - imports = [ ./system ./services ]; +{pkgs, ...}: { + imports = [./system ./services]; # shorter timeout for systemd services systemd.extraConfig = '' @@ -10,7 +10,10 @@ xdg.portal = { enable = true; wlr.enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ]; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-wlr + ]; }; programs.zsh.enable = true; diff --git a/hosts/neodymium/home/alacritty/default.nix b/hosts/neodymium/home/alacritty/default.nix index 7c344c9..a603f72 100644 --- a/hosts/neodymium/home/alacritty/default.nix +++ b/hosts/neodymium/home/alacritty/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let catppuccin-alacritty = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "alacritty"; @@ -10,7 +9,7 @@ in { programs.alacritty = { enable = true; settings = { - import = [ "${catppuccin-alacritty}/catppuccin-mocha.yml" ]; + import = ["${catppuccin-alacritty}/catppuccin-mocha.yml"]; window.opacity = 0.85; font = { normal.family = "FiraCode Nerd Font Mono"; diff --git a/hosts/neodymium/home/chromium/default.nix b/hosts/neodymium/home/chromium/default.nix index a337fcb..c36e889 100644 --- a/hosts/neodymium/home/chromium/default.nix +++ b/hosts/neodymium/home/chromium/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.chromium = { enable = true; package = pkgs.ungoogled-chromium; diff --git a/hosts/neodymium/home/default.nix b/hosts/neodymium/home/default.nix index 1ce0d5c..a824702 100644 --- a/hosts/neodymium/home/default.nix +++ b/hosts/neodymium/home/default.nix @@ -1,4 +1,4 @@ -{ hyprland, ... }: { +{hyprland, ...}: { config.home.stateVersion = "23.05"; imports = [ hyprland.homeManagerModules.default diff --git a/hosts/neodymium/home/firefox/default.nix b/hosts/neodymium/home/firefox/default.nix index a55ba3e..2a1c283 100644 --- a/hosts/neodymium/home/firefox/default.nix +++ b/hosts/neodymium/home/firefox/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { programs.librewolf = { enable = true; settings = { diff --git a/hosts/neodymium/home/gtk/default.nix b/hosts/neodymium/home/gtk/default.nix index a6c7e84..4e79f41 100644 --- a/hosts/neodymium/home/gtk/default.nix +++ b/hosts/neodymium/home/gtk/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { gtk = { enable = true; @@ -19,8 +19,8 @@ theme = { name = "Catppuccin-Mocha-Compact-Blue-Dark"; package = pkgs.catppuccin-gtk.override { - tweaks = [ "rimless" "normal" ]; - accents = [ "blue" ]; + tweaks = ["rimless" "normal"]; + accents = ["blue"]; variant = "mocha"; size = "compact"; }; diff --git a/hosts/neodymium/home/packages.nix b/hosts/neodymium/home/packages.nix index 6e0270a..91c9c3c 100644 --- a/hosts/neodymium/home/packages.nix +++ b/hosts/neodymium/home/packages.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: { +{pkgs, ...}: { services.mpris-proxy.enable = true; # media keys home.packages = with pkgs; [ - (bemoji.overrideAttrs (oldAttrs: { + (bemoji.overrideAttrs (_: { src = pkgs.fetchFromGitHub { owner = "marty-oehme"; repo = "bemoji"; diff --git a/hosts/neodymium/home/shell/atuin.nix b/hosts/neodymium/home/shell/atuin.nix index 0f5b659..49b77d5 100644 --- a/hosts/neodymium/home/shell/atuin.nix +++ b/hosts/neodymium/home/shell/atuin.nix @@ -1,7 +1,9 @@ -{ ... }: { +{...}: { programs.atuin = { enable = true; enableZshIntegration = true; - settings = { sync_address = "https://atuin.fainsin.bzh"; }; + settings = { + sync_address = "https://atuin.fainsin.bzh"; + }; }; } diff --git a/hosts/neodymium/home/shell/bat.nix b/hosts/neodymium/home/shell/bat.nix index 2e84353..de3d615 100644 --- a/hosts/neodymium/home/shell/bat.nix +++ b/hosts/neodymium/home/shell/bat.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let catppuccin-bat = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "bat"; @@ -16,7 +15,7 @@ in { }; }; config.theme = "catppuccin"; - extraPackages = with pkgs.bat-extras; [ batman ]; + extraPackages = with pkgs.bat-extras; [batman]; }; programs.zsh.shellAliases = { cat = "bat"; diff --git a/hosts/neodymium/home/shell/btop.nix b/hosts/neodymium/home/shell/btop.nix index 15bfea1..e997764 100644 --- a/hosts/neodymium/home/shell/btop.nix +++ b/hosts/neodymium/home/shell/btop.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let catppuccin-btop = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "btop"; @@ -7,7 +6,6 @@ let sha256 = "sha256-jodJl4f2T9ViNqsY9fk8IV62CrpC5hy7WK3aRpu70Cs="; }; in { - xdg.configFile."btop/themes".source = "${catppuccin-btop}/themes"; programs.btop = { @@ -21,6 +19,5 @@ in { }; }; - programs.zsh.shellAliases = { htop = "btop"; }; - + programs.zsh.shellAliases = {htop = "btop";}; } diff --git a/hosts/neodymium/home/shell/default.nix b/hosts/neodymium/home/shell/default.nix index da8f92a..7649e35 100644 --- a/hosts/neodymium/home/shell/default.nix +++ b/hosts/neodymium/home/shell/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { imports = [ ./atuin.nix ./bat.nix diff --git a/hosts/neodymium/home/shell/direnv.nix b/hosts/neodymium/home/shell/direnv.nix index 355dcf7..30c5f0d 100644 --- a/hosts/neodymium/home/shell/direnv.nix +++ b/hosts/neodymium/home/shell/direnv.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { programs.direnv = { enable = true; enableZshIntegration = true; diff --git a/hosts/neodymium/home/shell/exa.nix b/hosts/neodymium/home/shell/exa.nix index ed812cf..8df8b33 100644 --- a/hosts/neodymium/home/shell/exa.nix +++ b/hosts/neodymium/home/shell/exa.nix @@ -1,8 +1,7 @@ -{ ... }: { +{...}: { programs.eza.enable = true; programs.zsh.shellAliases = { - l = - "eza -lahg --icons --git --time-style=long-iso --group-directories-first --color=always"; + l = "eza -lahg --icons --git --time-style=long-iso --group-directories-first --color=always"; ll = "l --grid"; }; } diff --git a/hosts/neodymium/home/shell/git.nix b/hosts/neodymium/home/shell/git.nix index f85a8c7..cd399ab 100644 --- a/hosts/neodymium/home/shell/git.nix +++ b/hosts/neodymium/home/shell/git.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { programs.git = { enable = true; lfs.enable = true; @@ -6,8 +6,7 @@ userEmail = "laurent@fainsin.bzh"; signing = { signByDefault = true; - key = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; }; }; } diff --git a/hosts/neodymium/home/shell/starship.nix b/hosts/neodymium/home/shell/starship.nix index b5c37f2..0c1f358 100644 --- a/hosts/neodymium/home/shell/starship.nix +++ b/hosts/neodymium/home/shell/starship.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{lib, ...}: { programs.starship = { enable = true; enableZshIntegration = true; diff --git a/hosts/neodymium/home/shell/zsh.nix b/hosts/neodymium/home/shell/zsh.nix index f0bcaf7..6941ea3 100644 --- a/hosts/neodymium/home/shell/zsh.nix +++ b/hosts/neodymium/home/shell/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.zsh = { enable = true; enableAutosuggestions = true; @@ -23,15 +23,17 @@ bindkey '^H' backward-kill-word bindkey '5~' kill-word ''; - plugins = [{ - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "227d284ab2dc2f5153826974e0094a1990b1b5b9"; - sha256 = "11mkq58ssafvkq8sq27v0dl19mi2myi392nhxgi1q2q9q0gazcaa"; - }; - }]; + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "227d284ab2dc2f5153826974e0094a1990b1b5b9"; + sha256 = "11mkq58ssafvkq8sq27v0dl19mi2myi392nhxgi1q2q9q0gazcaa"; + }; + } + ]; }; } diff --git a/hosts/neodymium/home/vscode/default.nix b/hosts/neodymium/home/vscode/default.nix index 172f18e..22ad829 100644 --- a/hosts/neodymium/home/vscode/default.nix +++ b/hosts/neodymium/home/vscode/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.vscode = { enable = true; package = pkgs.vscode; @@ -29,8 +29,7 @@ "git.confirmSync" = false; "git.enableSmartCommit" = true; "gitmoji.showEmojiCode" = true; - "terminal.integrated.fontFamily" = - "'FiraCode Nerd Font Mono', 'Noto Color Emoji'"; + "terminal.integrated.fontFamily" = "'FiraCode Nerd Font Mono', 'Noto Color Emoji'"; "window.menuBarVisibility" = "toggle"; "window.zoomLevel" = -0.25; "workbench.colorTheme" = "Catppuccin Mocha"; @@ -40,14 +39,12 @@ "telemetry.telemetryLevel" = "off"; "editor.inlineSuggest.enabled" = true; "liveshare.presence" = true; - "github.copilot.enable" = { "markdown" = true; }; + "github.copilot.enable" = {"markdown" = true;}; "nix.enableLanguageServer" = true; "nix.serverPath" = "nil"; - "nix.serverSettings"."nil"."formatting"."command" = [ "nixfmt" ]; "julia.enableTelemetry" = false; "julia.symbolCacheDownload" = true; - "terminal.integrated.commandsToSkipShell" = - [ "language-julia.interrupt" ]; + "terminal.integrated.commandsToSkipShell" = ["language-julia.interrupt"]; }; }; } diff --git a/hosts/neodymium/home/wayland/default.nix b/hosts/neodymium/home/wayland/default.nix index fc9e1b6..b4f02ea 100644 --- a/hosts/neodymium/home/wayland/default.nix +++ b/hosts/neodymium/home/wayland/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let catppuccin-mako = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "mako"; @@ -7,8 +6,12 @@ let sha256 = "097x9jrkzvml6ngnhxwkzzl1l2awwv73yli1mhmpw83c0n8xck4x"; }; in { + # TODO: split some stuff here - imports = [ ./hyprland ./eww ]; + imports = [ + ./hyprland + ./eww + ]; services.mako = { enable = true; @@ -104,5 +107,4 @@ in { bs-hl-color = "F38BA8"; }; }; - } diff --git a/hosts/neodymium/home/wayland/eww/default.nix b/hosts/neodymium/home/wayland/eww/default.nix index 4f6a507..8142d23 100644 --- a/hosts/neodymium/home/wayland/eww/default.nix +++ b/hosts/neodymium/home/wayland/eww/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.eww = { enable = true; package = pkgs.eww-wayland; diff --git a/hosts/neodymium/home/wayland/hyprland/default.nix b/hosts/neodymium/home/wayland/hyprland/default.nix index cdccee9..0627d0f 100644 --- a/hosts/neodymium/home/wayland/hyprland/default.nix +++ b/hosts/neodymium/home/wayland/hyprland/default.nix @@ -1,16 +1,18 @@ -{ pkgs, ... }: { +{pkgs, ...}: { wayland.windowManager.hyprland = { enable = true; - extraConfig = '' - exec-once=env XDG_CACHE_HOME=/tmp eww open bar - exec-once=${pkgs.swaybg}/bin/swaybg -i ~/Pictures/wallpapers/kai-oberhauser-unsplash.jpg - exec-once=mako - exec-once=element-desktop - exec-once=thunderbird - exec-once=webcord - exec-once=wl-paste --watch cliphist store - exec-once=gnome-keyring-daemon --start --components=secrets - '' + builtins.readFile ./hyprland.conf; + extraConfig = + '' + exec-once=env XDG_CACHE_HOME=/tmp eww open bar + exec-once=${pkgs.swaybg}/bin/swaybg -i ~/Pictures/wallpapers/kai-oberhauser-unsplash.jpg + exec-once=mako + exec-once=element-desktop + exec-once=thunderbird + exec-once=webcord + exec-once=wl-paste --watch cliphist store + exec-once=gnome-keyring-daemon --start --components=secrets + '' + + builtins.readFile ./hyprland.conf; }; } diff --git a/hosts/neodymium/home/xdg/default.nix b/hosts/neodymium/home/xdg/default.nix index 24a3f0f..fd39b94 100644 --- a/hosts/neodymium/home/xdg/default.nix +++ b/hosts/neodymium/home/xdg/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { xdg.mimeApps = { enable = true; diff --git a/hosts/neodymium/services/borgbackup/default.nix b/hosts/neodymium/services/borgbackup/default.nix index 583bbce..e4a686d 100644 --- a/hosts/neodymium/services/borgbackup/default.nix +++ b/hosts/neodymium/services/borgbackup/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{config, ...}: { services.borgbackup.jobs.home = { paths = "/home/laurent/"; repo = "/mnt/home_backup"; @@ -30,7 +30,7 @@ passCommand = "cat ${config.age.secrets.borgbackup.path}"; }; compression = "auto,zstd"; - startAt = [ ]; + startAt = []; }; services.borgbackup.jobs.keepass = { paths = "/home/laurent/Documents/db_mdp.kdbx"; diff --git a/hosts/neodymium/services/default.nix b/hosts/neodymium/services/default.nix index 25ab436..e307211 100644 --- a/hosts/neodymium/services/default.nix +++ b/hosts/neodymium/services/default.nix @@ -1 +1,6 @@ -{ ... }: { imports = [ ./borgbackup ./greetd ]; } +{...}: { + imports = [ + ./borgbackup + ./greetd + ]; +} diff --git a/hosts/neodymium/services/greetd/default.nix b/hosts/neodymium/services/greetd/default.nix index eaec9cc..93c1420 100644 --- a/hosts/neodymium/services/greetd/default.nix +++ b/hosts/neodymium/services/greetd/default.nix @@ -1,11 +1,10 @@ -{ pkgs, ... }: { +{pkgs, ...}: { services.greetd = { enable = true; settings = { default_session = { - command = - "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; # TODO: use nix pkgs + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; # TODO: use nix pkgs user = "greeter"; }; }; diff --git a/hosts/neodymium/system/adb/default.nix b/hosts/neodymium/system/adb/default.nix index c8f9736..01fbd94 100644 --- a/hosts/neodymium/system/adb/default.nix +++ b/hosts/neodymium/system/adb/default.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: { +{pkgs, ...}: { # udev rules - services.udev.packages = [ pkgs.android-udev-rules ]; + services.udev.packages = [pkgs.android-udev-rules]; # adb users - users.users.laurent.extraGroups = [ "adbusers" ]; + users.users.laurent.extraGroups = ["adbusers"]; } diff --git a/hosts/neodymium/system/age/default.nix b/hosts/neodymium/system/age/default.nix index 7b0b5d7..8d17281 100644 --- a/hosts/neodymium/system/age/default.nix +++ b/hosts/neodymium/system/age/default.nix @@ -1,8 +1,8 @@ -{ ... }: { +{...}: { age.secrets.borgbackup = { file = "/home/laurent/infrastructure/secrets/borgbackup.age"; owner = "laurent"; group = "users"; }; - age.identityPaths = [ "/home/laurent/.ssh/id_ed25519" ]; + age.identityPaths = ["/home/laurent/.ssh/id_ed25519"]; } diff --git a/hosts/neodymium/system/audio/default.nix b/hosts/neodymium/system/audio/default.nix index 0edf1d4..e04ca2b 100644 --- a/hosts/neodymium/system/audio/default.nix +++ b/hosts/neodymium/system/audio/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { services.pipewire = { enable = true; alsa.enable = true; diff --git a/hosts/neodymium/system/boot/default.nix b/hosts/neodymium/system/boot/default.nix index 58d064e..cd2e97d 100644 --- a/hosts/neodymium/system/boot/default.nix +++ b/hosts/neodymium/system/boot/default.nix @@ -1,6 +1,10 @@ -{ pkgs, config, ... }: { +{ + pkgs, + config, + ... +}: { # support for mounting windaube partitions - boot.supportedFilesystems = [ "ntfs" ]; + boot.supportedFilesystems = ["ntfs"]; boot.loader.efi.canTouchEfiVariables = true; # clean /tmp at each boot @@ -9,12 +13,12 @@ # use latest kernel boot.kernelPackages = pkgs.linuxPackages_latest; - imports = [ ./lanzaboot.nix ]; - - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "v4l2loopback" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + imports = [ + ./lanzaboot.nix + ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd" "v4l2loopback"]; + boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; } diff --git a/hosts/neodymium/system/boot/lanzaboot.nix b/hosts/neodymium/system/boot/lanzaboot.nix index 4b695d2..72dd6e0 100644 --- a/hosts/neodymium/system/boot/lanzaboot.nix +++ b/hosts/neodymium/system/boot/lanzaboot.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{lib, ...}: { # This should already be here from switching to bootspec earlier. # It's not required anymore, but also doesn't do any harm. boot.bootspec.enable = true; diff --git a/hosts/neodymium/system/default.nix b/hosts/neodymium/system/default.nix index 09041e7..06170ce 100644 --- a/hosts/neodymium/system/default.nix +++ b/hosts/neodymium/system/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/neodymium/system/docker/default.nix b/hosts/neodymium/system/docker/default.nix index 0250cb3..9124cea 100644 --- a/hosts/neodymium/system/docker/default.nix +++ b/hosts/neodymium/system/docker/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { virtualisation.podman = { enable = true; diff --git a/hosts/neodymium/system/fonts/default.nix b/hosts/neodymium/system/fonts/default.nix index 0b06e4e..57362a4 100644 --- a/hosts/neodymium/system/fonts/default.nix +++ b/hosts/neodymium/system/fonts/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { fonts.packages = with pkgs; [ # https://notofonts.github.io/ noto-fonts # standard characters @@ -11,6 +11,6 @@ fira-code-symbols # unicode ligature glyphs # https://github.com/ryanoasis/nerd-fonts - (nerdfonts.override { fonts = [ "FiraCode" ]; }) + (nerdfonts.override {fonts = ["FiraCode"];}) ]; } diff --git a/hosts/neodymium/system/hardware/default.nix b/hosts/neodymium/system/hardware/default.nix index 7c73ed8..93d2b7f 100644 --- a/hosts/neodymium/system/hardware/default.nix +++ b/hosts/neodymium/system/hardware/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { # hardware hardware = { enableRedistributableFirmware = true; @@ -30,5 +30,7 @@ programs.light.enable = true; # paritions and filesystems - imports = [ ./partitions.nix ]; + imports = [ + ./partitions.nix + ]; } diff --git a/hosts/neodymium/system/hardware/partitions.nix b/hosts/neodymium/system/hardware/partitions.nix index c258002..7f31605 100644 --- a/hosts/neodymium/system/hardware/partitions.nix +++ b/hosts/neodymium/system/hardware/partitions.nix @@ -1,21 +1,22 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { fileSystems."/" = { device = "/dev/disk/by-uuid/b0ea5f1f-104f-4026-840a-4d46f3e827d1"; fsType = "btrfs"; - options = [ "subvol=nixos" ]; + options = ["subvol=nixos"]; }; - boot.initrd.luks.devices."nixenc".device = - "/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb"; + boot.initrd.luks.devices."nixenc".device = "/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/6D10-BBAF"; fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = []; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = diff --git a/hosts/neodymium/system/i18n/default.nix b/hosts/neodymium/system/i18n/default.nix index d802dc9..90f1921 100644 --- a/hosts/neodymium/system/i18n/default.nix +++ b/hosts/neodymium/system/i18n/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { # FRANCE 🇫🇷 🥖 🥐 time.timeZone = "Europe/Paris"; diff --git a/hosts/neodymium/system/networking/default.nix b/hosts/neodymium/system/networking/default.nix index 362da7d..dcfd873 100644 --- a/hosts/neodymium/system/networking/default.nix +++ b/hosts/neodymium/system/networking/default.nix @@ -1,9 +1,9 @@ -{ lib, ... }: { +{lib, ...}: { # the name of the machine networking.hostName = "neodymium"; # domain name servers, use clouflare family - networking.nameservers = [ "1.1.1.2" "1.0.0.2" ]; + networking.nameservers = ["1.1.1.2" "1.0.0.2"]; # use networkManager, see nmcli networking.networkmanager.enable = true; @@ -12,8 +12,8 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ ]; - allowedUDPPorts = [ ]; + allowedTCPPorts = []; + allowedUDPPorts = []; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/hosts/neodymium/system/nix/default.nix b/hosts/neodymium/system/nix/default.nix index 3cb3997..066d116 100644 --- a/hosts/neodymium/system/nix/default.nix +++ b/hosts/neodymium/system/nix/default.nix @@ -1,9 +1,15 @@ -{ lib, pkgs, nixpkgs, ... }: { +{ + lib, + pkgs, + nixpkgs, + ... +}: { # restrict nix command to sudoers - nix.settings.allowed-users = [ "@wheel" ]; + nix.settings.allowed-users = ["root" "@wheel"]; + nix.settings.trusted-users = ["root" "@wheel"]; # experimental features - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; # limit number of cores when building nix.settings.max-jobs = 6; @@ -18,16 +24,6 @@ options = "--delete-older-than 30d"; }; - # binary caches - nix.settings = { - substituters = - [ "https://hyprland.cachix.org" "https://nix-community.cachix.org" ]; - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - # pin nixpkgs registry nix.registry.nixpkgs.flake = nixpkgs; @@ -43,7 +39,7 @@ # print diff between two generations system.activationScripts.nvd-report-changes = '' - PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} + PATH=$PATH:${lib.makeBinPath [pkgs.nvd pkgs.nix]} nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2) ''; } diff --git a/hosts/neodymium/system/security/default.nix b/hosts/neodymium/system/security/default.nix index 0c05d44..8a05d96 100644 --- a/hosts/neodymium/system/security/default.nix +++ b/hosts/neodymium/system/security/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { # enable polkit security.polkit.enable = true; @@ -13,5 +13,5 @@ services.gnome.gnome-keyring.enable = true; # allow swaylock to use pam - security.pam.services.swaylock = { }; + security.pam.services.swaylock = {}; } diff --git a/hosts/neodymium/system/users/default.nix b/hosts/neodymium/system/users/default.nix index 74bfdd7..7970487 100644 --- a/hosts/neodymium/system/users/default.nix +++ b/hosts/neodymium/system/users/default.nix @@ -1,4 +1,8 @@ -{ pkgs, hyprland, ... }: { +{ + pkgs, + hyprland, + ... +}: { # disable user creation/deletion users.mutableUsers = false; @@ -6,7 +10,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { inherit hyprland; }; + extraSpecialArgs = {inherit hyprland;}; }; # configure users @@ -15,7 +19,7 @@ users.laurent = { isNormalUser = true; initialPassword = "laurent"; - extraGroups = [ "wheel" "video" "docker" ]; + extraGroups = ["wheel" "video" "docker"]; shell = pkgs.zsh; }; }; diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 401d8c5..52a3227 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,9 +1,7 @@ let - neodymium = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; - hydrogen = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxh42mMYqftTU7WtfktZbkdMI07VuH7mhUv3m2Ca3fV root@hydrogen"; + neodymium = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; + hydrogen = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxh42mMYqftTU7WtfktZbkdMI07VuH7mhUv3m2Ca3fV root@hydrogen"; in { - "borgbackup.age".publicKeys = [ neodymium ]; - "gitea.age".publicKeys = [ neodymium hydrogen ]; + "borgbackup.age".publicKeys = [neodymium]; + "gitea.age".publicKeys = [neodymium hydrogen]; }