Standalone home-manager
This commit is contained in:
parent
697b148924
commit
f03c4875ff
5 changed files with 48 additions and 3 deletions
13
flake.nix
13
flake.nix
|
@ -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 {
|
||||
inherit inputs;
|
||||
secrets = import ./secrets.nix;
|
||||
};
|
||||
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 = {
|
||||
"ty-nixos" = utils.createNixosSystem { entrypoint = ./hosts/laptop; };
|
||||
"ty-laptop-server" = utils.createNixosSystem { entrypoint = ./hosts/laptop-server; };
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
sharedModules = [
|
||||
# Import plasma manager and all of my custom modules for use
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
inputs.flatpaks.homeManagerModules.declarative-flatpak
|
||||
./modules
|
||||
];
|
||||
# Inherit all of my nixos config custom arguments
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
rescrobbled.enable = lib.mkEnableOption "rescrobbled 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 {
|
||||
type = lib.types.enum [ "nixos" "nix-on-droid" ];
|
||||
default = "nixos";
|
||||
|
|
18
home-manager/standalone.nix
Normal file
18
home-manager/standalone.nix
Normal 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}";
|
||||
};
|
||||
}
|
|
@ -1,5 +1,17 @@
|
|||
{ 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 = {
|
||||
system ? "x86_64-linux",
|
||||
entrypoint
|
||||
|
|
Loading…
Reference in a new issue