Standalone home-manager

This commit is contained in:
Tyler Beckman 2025-01-06 18:32:12 -07:00
parent 697b148924
commit f03c4875ff
Signed by: Ty
GPG key ID: 2813440C772555A4
5 changed files with 48 additions and 3 deletions

View file

@ -74,13 +74,22 @@
}; };
}; };
outputs = inputs@{ self, nixpkgs, colmena, nix-on-droid, ... }: let outputs = inputs@{ self, nixpkgs, home-manager, colmena, nix-on-droid, ... }: let
utils = import ./utils { utils = import ./utils {
inherit inputs; inherit inputs;
secrets = import ./secrets.nix; secrets = import ./secrets.nix;
}; };
in { in {
# Setup nixos-rebuild configurations # Setup home-manager configurations
# Mines Isengard
homeConfigurations.tyler_beckman = utils.createHomeManagerConfig {
meta = {
preset = "cli";
username = "tyler_beckman";
}
};
# Setup NixOS configurations
nixosConfigurations = { nixosConfigurations = {
"ty-nixos" = utils.createNixosSystem { entrypoint = ./hosts/laptop; }; "ty-nixos" = utils.createNixosSystem { entrypoint = ./hosts/laptop; };
"ty-laptop-server" = utils.createNixosSystem { entrypoint = ./hosts/laptop-server; }; "ty-laptop-server" = utils.createNixosSystem { entrypoint = ./hosts/laptop-server; };

View file

@ -26,7 +26,6 @@
sharedModules = [ sharedModules = [
# Import plasma manager and all of my custom modules for use # Import plasma manager and all of my custom modules for use
inputs.plasma-manager.homeManagerModules.plasma-manager inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.flatpaks.homeManagerModules.declarative-flatpak
./modules ./modules
]; ];
# Inherit all of my nixos config custom arguments # Inherit all of my nixos config custom arguments

View file

@ -31,6 +31,13 @@
rescrobbled.enable = lib.mkEnableOption "rescrobbled configuration"; rescrobbled.enable = lib.mkEnableOption "rescrobbled configuration";
vscode.enable = lib.mkEnableOption "vscode configuration"; vscode.enable = lib.mkEnableOption "vscode configuration";
username = lib.mkOption {
type = lib.types.str;
default = "ty";
defaultText = lib.literalExpression ''"ty"'';
description = "The username to apply the config as";
}
interface = lib.mkOption { interface = lib.mkOption {
type = lib.types.enum [ "nixos" "nix-on-droid" ]; type = lib.types.enum [ "nixos" "nix-on-droid" ];
default = "nixos"; default = "nixos";

View file

@ -0,0 +1,18 @@
{ ... }:
{
imports = [
# Import plasma manager and all of my custom modules for use
inputs.plasma-manager.homeManagerModules.plasma-manager
./modules
# Import main config
./meta.nix
./config
];
home = {
stateVersion = "24.11";
username = meta.home-manager.username;
homeDirectory = /. + "/home/${meta.home-manager.username}";
};
}

View file

@ -1,5 +1,17 @@
{ inputs, secrets }: { inputs, secrets }:
{ {
createHomeManagerConfig = {
system ? "x86_64-linux",
entrypoint
}: inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${system};
modules = [ ./home-manager/standalone.nix ];
extraSpecialArgs = {
inherit input system secrets;
pkgs-stable = inputs.nixpkgs-stable.legacyPackages.${system};
};
}
createNixosSystem = { createNixosSystem = {
system ? "x86_64-linux", system ? "x86_64-linux",
entrypoint entrypoint