From 9c7e489a5fb902eb7894291ef40123a21e80b862 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 27 May 2024 22:44:59 +0200 Subject: [PATCH] First release condidate for Refactoring --- flake.nix | 4 +-- .../{default.nix => configuration.nix} | 0 home/default.nix => hosts/nixos-test/home.nix | 12 +-------- .../{default.nix => configuration.nix} | 0 hosts/perso-desktop/home.nix | 25 +++++++++++++++++++ .../{default.nix => configuration.nix} | 0 hosts/perso-laptop/home.nix | 25 +++++++++++++++++++ .../{default.nix => configuration.nix} | 0 hosts/pro-laptop/home.nix | 25 +++++++++++++++++++ modules/home/default.nix | 10 ++++++++ 10 files changed, 88 insertions(+), 13 deletions(-) rename hosts/nixos-test/{default.nix => configuration.nix} (100%) rename home/default.nix => hosts/nixos-test/home.nix (61%) rename hosts/perso-desktop/{default.nix => configuration.nix} (100%) create mode 100644 hosts/perso-desktop/home.nix rename hosts/perso-laptop/{default.nix => configuration.nix} (100%) create mode 100644 hosts/perso-laptop/home.nix rename hosts/pro-laptop/{default.nix => configuration.nix} (100%) create mode 100644 hosts/pro-laptop/home.nix diff --git a/flake.nix b/flake.nix index 4535d36..82e6270 100644 --- a/flake.nix +++ b/flake.nix @@ -37,14 +37,14 @@ ${s.name} = nixpkgs.lib.nixosSystem { inherit (s) system; modules = [ - ./hosts/${s.name} + ./hosts/${s.name}/configuration.nix home-manager.nixosModules.home-manager agenix.nixosModules.default { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = inputs; - home-manager.users.florian = import ./home; + home-manager.users.florian = import ./hosts/${s.name}/home.nix; } ]; }; diff --git a/hosts/nixos-test/default.nix b/hosts/nixos-test/configuration.nix similarity index 100% rename from hosts/nixos-test/default.nix rename to hosts/nixos-test/configuration.nix diff --git a/home/default.nix b/hosts/nixos-test/home.nix similarity index 61% rename from home/default.nix rename to hosts/nixos-test/home.nix index 2697d72..3666345 100644 --- a/home/default.nix +++ b/hosts/nixos-test/home.nix @@ -2,19 +2,9 @@ { imports = [ - ../modules/home + ../../modules/home ]; - home = { - username = "florian"; - homeDirectory = "/home/florian"; - - stateVersion = "24.05"; - }; - - programs.home-manager.enable = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - modules.home = { apps = { chromium.enable = true; diff --git a/hosts/perso-desktop/default.nix b/hosts/perso-desktop/configuration.nix similarity index 100% rename from hosts/perso-desktop/default.nix rename to hosts/perso-desktop/configuration.nix diff --git a/hosts/perso-desktop/home.nix b/hosts/perso-desktop/home.nix new file mode 100644 index 0000000..3666345 --- /dev/null +++ b/hosts/perso-desktop/home.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../../modules/home + ]; + + modules.home = { + apps = { + chromium.enable = true; + flatpak.enable = true; + jetbrainsToolbox.enable = true; + kitty.enable = true; + vscode.enable = true; + }; + + shell = { + zsh.enable = true; + atuin.enable = true; + direnv.enable = true; + git.enable = true; + }; + }; +} + diff --git a/hosts/perso-laptop/default.nix b/hosts/perso-laptop/configuration.nix similarity index 100% rename from hosts/perso-laptop/default.nix rename to hosts/perso-laptop/configuration.nix diff --git a/hosts/perso-laptop/home.nix b/hosts/perso-laptop/home.nix new file mode 100644 index 0000000..3666345 --- /dev/null +++ b/hosts/perso-laptop/home.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../../modules/home + ]; + + modules.home = { + apps = { + chromium.enable = true; + flatpak.enable = true; + jetbrainsToolbox.enable = true; + kitty.enable = true; + vscode.enable = true; + }; + + shell = { + zsh.enable = true; + atuin.enable = true; + direnv.enable = true; + git.enable = true; + }; + }; +} + diff --git a/hosts/pro-laptop/default.nix b/hosts/pro-laptop/configuration.nix similarity index 100% rename from hosts/pro-laptop/default.nix rename to hosts/pro-laptop/configuration.nix diff --git a/hosts/pro-laptop/home.nix b/hosts/pro-laptop/home.nix new file mode 100644 index 0000000..3666345 --- /dev/null +++ b/hosts/pro-laptop/home.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../../modules/home + ]; + + modules.home = { + apps = { + chromium.enable = true; + flatpak.enable = true; + jetbrainsToolbox.enable = true; + kitty.enable = true; + vscode.enable = true; + }; + + shell = { + zsh.enable = true; + atuin.enable = true; + direnv.enable = true; + git.enable = true; + }; + }; +} + diff --git a/modules/home/default.nix b/modules/home/default.nix index 0782403..92279a8 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -6,5 +6,15 @@ ./desktop ./shell ]; + + home = { + username = "florian"; + homeDirectory = "/home/florian"; + + stateVersion = "24.05"; + }; + + programs.home-manager.enable = true; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; }