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 {
|
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; };
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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";
|
||||||
|
|
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 }:
|
{ 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
|
||||||
|
|
Loading…
Reference in a new issue