wip
This commit is contained in:
parent
546c5170d7
commit
433967847a
29 changed files with 1251 additions and 335 deletions
|
|
@ -12,7 +12,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.11";
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
|
@ -32,38 +32,47 @@
|
|||
lib = nixpkgs.lib;
|
||||
pkgs-unstable = unstable.legacyPackages.${system};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
mkNixos = host: modules: lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit pkgs-unstable; };
|
||||
modules = [
|
||||
./hosts/${host}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.catalin = import ./home;
|
||||
home-manager.extraSpecialArgs = { inherit pkgs-unstable; };
|
||||
}
|
||||
] ++ modules;
|
||||
};
|
||||
|
||||
# Helper for Home Manager configurations (non-NixOS)
|
||||
mkHome = host: user: modules: home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./home
|
||||
{
|
||||
home.username = user;
|
||||
home.homeDirectory = "/home/${user}";
|
||||
}
|
||||
] ++ modules;
|
||||
extraSpecialArgs = { inherit pkgs-unstable; };
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
limgrave = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit pkgs-unstable; };
|
||||
modules = [
|
||||
./hosts/limgrave/configuration.nix
|
||||
nix-snapd.nixosModules.default
|
||||
autofirma-nix.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
carpates = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit pkgs-unstable; };
|
||||
modules = [
|
||||
./hosts/carpates/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
limgrave = mkNixos "limgrave" [
|
||||
nix-snapd.nixosModules.default
|
||||
autofirma-nix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# Home Manager configurations for non-NixOS hosts (e.g., Ubuntu)
|
||||
homeConfigurations = {
|
||||
# For non-NixOS usage on a machine named "carpates".
|
||||
# Run: home-manager switch --flake ./nix#carpates
|
||||
carpates = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./hosts/carpates/home.nix ];
|
||||
};
|
||||
# For non-NixOS usage. Run: home-manager switch --flake ./nix#catalin@ubuntu
|
||||
"catalin@limgrave" = mkHome "limgrave" "catalin" [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue