diff --git a/modules_dentritic/features/core/env.nix b/modules_dentritic/features/core/env.nix new file mode 100644 index 0000000..cb918fe --- /dev/null +++ b/modules_dentritic/features/core/env.nix @@ -0,0 +1,19 @@ +{ self, inputs, ... }: +{ + flake.homeModules.env = { pkgs, lib, ... }: { + home = { + shellAliases = { + drs = "time sudo darwin-rebuild switch --flake ~/Developer/nix/NixOSDots#macOS"; + nrs = "time sudo nixos-rebuild switch --flake ~/Developer/nix/NixOSDots#nixos"; + frs = "time sudo nixos-rebuild switch --flake ~/Developer/nix/NixOSDots#framework"; + lrs = "time sudo nixos-rebuild switch --flake ~/Developer/nix/NixOSDots#light"; + lars = "time sudo nixos-rebuild switch --flake ~/Developer/nix/NixOSDots#laptop"; + cdd = "cd ~/Developer/nix/NixOSDots"; + ncg = "time nix-collect-garbage -d"; + nso = "time nix store optimise"; + nfc = "time nix flake check ~/Developer/nix/NixOSDots"; + nfu = "time nix flake update --flake ~/Developer/nix/NixOSDots"; + }; + }; + }; +} diff --git a/modules_dentritic/features/core/git.nix b/modules_dentritic/features/core/git.nix new file mode 100644 index 0000000..a800b26 --- /dev/null +++ b/modules_dentritic/features/core/git.nix @@ -0,0 +1,22 @@ +{ self, inputs, ... }: { + flake = { + homeModules.git = { + programs.git = { + enable = true; + package = self.packages.${pkgs.stdenv.hostPlatform.system}.myGit; + }; + }; + }; + + perSystem = { pkgs, lib, ... }: { + packages.myGit = inputs.wrapper-modules.wrappers.git.wrap { + inherit pkgs; + configFile = { + user = { + email = "mateialex@outlook.fr"; + name = "Alexandre"; + }; + }; + }; + }; +} diff --git a/modules_dentritic/features/desktop/core/editors.nix b/modules_dentritic/features/desktop/core/editors.nix index 66fd99b..68ee4e6 100644 --- a/modules_dentritic/features/desktop/core/editors.nix +++ b/modules_dentritic/features/desktop/core/editors.nix @@ -6,7 +6,9 @@ extensions = [ "nix" ]; - tab_size = 2; + userSettings = { + tab_size = 2; + }; }; }; diff --git a/modules_dentritic/hosts/common/common.nix b/modules_dentritic/hosts/common/common.nix index 86f4ddf..2d9132e 100644 --- a/modules_dentritic/hosts/common/common.nix +++ b/modules_dentritic/hosts/common/common.nix @@ -1,12 +1,19 @@ { self, inputs, ... }: { flake.homeModules.commonHomeConfig = { config, pkgs, inputs, ... }: { - imports = [ + imports = [ self.homeModules.sysFetch self.homeModules.zed + self.homeModules.env + self.homeModules.git ]; - home.packages = [ pkgs.hello ]; + home = { + packages = [ pkgs.hello ]; + + + stateVersion = "25.11"; # Upgrade maybe ? + }; }; flake.nixosModules.commonConfig = { config, pkgs, inputs, ...}: { diff --git a/modules_dentritic/hosts/framework16/configuration.nix b/modules_dentritic/hosts/framework16/configuration.nix index 8f2e95c..f6b610f 100644 --- a/modules_dentritic/hosts/framework16/configuration.nix +++ b/modules_dentritic/hosts/framework16/configuration.nix @@ -8,12 +8,6 @@ ]; }; - flake.homeConfigurations.alex = inputs.home-manager.lib.homeManagerConfiguration { - modules = [ - self.homeModules.commonHomeConfig - ]; - }; - flake.nixosModules.FW16Config = { config, pkgs, inputs, ...}: { imports = [ self.nixosModules.FW16Hardware @@ -65,8 +59,9 @@ }; home-manager = { + useGlobalPkgs = true; users = { - "alex" = self.homeConfigurations.alex; + "alex" = self.homeModules.commonHomeConfig; }; }; diff --git a/modules_dentritic/parts.nix b/modules_dentritic/parts.nix index 657e3ca..a74884d 100644 --- a/modules_dentritic/parts.nix +++ b/modules_dentritic/parts.nix @@ -1,10 +1,13 @@ +{ inputs, ... }: { - config = { - systems = [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-linux" - "aarch64-darwin" - ]; - }; + imports = [ + inputs.home-manager.flakeModules.home-manager + ]; + + systems = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ]; }