From 96afcd2c6707d4776e66bc75cfde33a12f93551d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20SALVI?= Date: Fri, 26 Sep 2025 01:42:40 +0200 Subject: [PATCH] Refactor : remove common hosts and move to modules --- hosts/home-nix/default.nix | 21 +-------------------- hosts/work-nix/default.nix | 21 --------------------- modules/core/default.nix | 1 + modules/core/system.nix | 0 4 files changed, 2 insertions(+), 41 deletions(-) create mode 100644 modules/core/system.nix diff --git a/hosts/home-nix/default.nix b/hosts/home-nix/default.nix index 91c583a..c77ec28 100644 --- a/hosts/home-nix/default.nix +++ b/hosts/home-nix/default.nix @@ -8,7 +8,7 @@ }: { system.stateVersion = "25.11"; - + imports = builtins.trace "${inputs.mysecrets}" [ (modulesPath + "/installer/scan/not-detected.nix") ./network.nix @@ -17,23 +17,4 @@ ../../modules/core ../../modules/optionnals/hosts/${hostname}.nix ]; - - boot.kernelPackages = pkgs.linuxPackages_latest; - - time.timeZone = "Europe/Paris"; - - nix = { - settings = { - ## Enable flakes - experimental-features = [ - "nix-command" - "flakes" - ]; - ## Users trusted to use flake command - trusted-users = [ - "root" - "${username}" - ]; - }; - }; } diff --git a/hosts/work-nix/default.nix b/hosts/work-nix/default.nix index 37632fe..27ed029 100644 --- a/hosts/work-nix/default.nix +++ b/hosts/work-nix/default.nix @@ -7,8 +7,6 @@ ... }: { - system.stateVersion = "25.11"; - imports = builtins.trace "${inputs.mysecrets}" [ (modulesPath + "/installer/scan/not-detected.nix") ./network.nix @@ -16,23 +14,4 @@ ../../modules/core ../../modules/optionnals/hosts/${hostname}.nix ]; - - boot.kernelPackages = pkgs.linuxPackages_latest; - - time.timeZone = "Europe/Paris"; - - nix = { - settings = { - ## Enable flakes - experimental-features = [ - "nix-command" - "flakes" - ]; - ## Users trusted to use flake command - trusted-users = [ - "root" - "${username}" - ]; - }; - }; } diff --git a/modules/core/default.nix b/modules/core/default.nix index 030b6f0..5b5144f 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -6,6 +6,7 @@ ./grub.nix ./packages.nix ./ssh.nix + ./system.nix ./tty.nix ./users.nix ]; diff --git a/modules/core/system.nix b/modules/core/system.nix new file mode 100644 index 0000000..e69de29