Added home-manager, re-doing configs
This commit is contained in:
parent
8c48d4ed8b
commit
ecc1d9e4e9
19
modules_dentritic/features/core/env.nix
Normal file
19
modules_dentritic/features/core/env.nix
Normal file
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules_dentritic/features/core/git.nix
Normal file
22
modules_dentritic/features/core/git.nix
Normal file
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -6,7 +6,9 @@
|
||||
extensions = [
|
||||
"nix"
|
||||
];
|
||||
tab_size = 2;
|
||||
userSettings = {
|
||||
tab_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -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, ...}: {
|
||||
|
||||
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -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"
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user