working home manager switch without --impure
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
flake.homeModules.bash = { pkgs, lib, ... }:
|
||||
flake.homeModules.bash = { pkgs, ... }:
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
||||
14
modules/home-manager/eza.nix
Normal file
14
modules/home-manager/eza.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ inputs, pkgs, lib, ... }:
|
||||
{
|
||||
flake.homeModules.eza = { pkgs, lib, ... }: {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
package = pkgs.eza;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
home.shellAliases = {
|
||||
ls = "${lib.getExe pkgs.eza} -lgos type --no-time --follow-symlinks";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gdu
|
||||
# TODO: find a CLI file editor that's not insane
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,25 +1,11 @@
|
||||
# This module is for programs with GUIs that run in a desktop environment
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.homeModules.desktop =
|
||||
{ pkgs, ... } :
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
imports = with inputs.self.homeModules; [
|
||||
rebuild
|
||||
john
|
||||
ssh
|
||||
git
|
||||
shell
|
||||
onepassword
|
||||
ghostty
|
||||
sops
|
||||
];
|
||||
};
|
||||
|
||||
flake.homeConfigurations.desktop = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
||||
modules = with inputs.self.homeModules; [
|
||||
desktop
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
23
modules/home-manager/profiles/shell-tools.nix
Normal file
23
modules/home-manager/profiles/shell-tools.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.homeModules.shell-tools = { pkgs, ... }: {
|
||||
imports = with inputs.self.homeModules; [
|
||||
shell # Includes option to select between zsh and bash
|
||||
|
||||
# Tools
|
||||
eza
|
||||
files
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
cacert
|
||||
busybox
|
||||
gnugrep
|
||||
dig
|
||||
btop
|
||||
uv
|
||||
xclip
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,42 +1,19 @@
|
||||
{ inputs, ... }:
|
||||
{ inputs, lib, ... }:
|
||||
{
|
||||
flake.homeModules.shell = {pkgs, lib, ...}:
|
||||
flake.homeModules.shell = { config, ... }:
|
||||
{
|
||||
imports = with inputs.self.homeModules; [
|
||||
# Shells
|
||||
# bash
|
||||
zsh
|
||||
|
||||
# Tools
|
||||
shell-tools
|
||||
files
|
||||
docker
|
||||
];
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
package = pkgs.eza;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
options.shell.program = lib.mkOption {
|
||||
type = lib.types.enum [ "bash" "zsh" ];
|
||||
default = "zsh";
|
||||
description = "Which interactive shell configuration to enable.";
|
||||
};
|
||||
|
||||
home.shell.enableShellIntegration = true;
|
||||
home.shellAliases = {
|
||||
ls = "${lib.getExe pkgs.eza} -lgos type --no-time --follow-symlinks";
|
||||
};
|
||||
};
|
||||
imports = with inputs.self.homeModules; [ bash zsh ];
|
||||
|
||||
flake.homeModules.shell-tools = {pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
cacert
|
||||
busybox
|
||||
gnugrep
|
||||
dig
|
||||
btop
|
||||
uv
|
||||
xclip
|
||||
];
|
||||
config = {
|
||||
programs.bash.enable = lib.mkForce (config.shell.program == "bash");
|
||||
programs.zsh.enable = lib.mkForce (config.shell.program == "zsh");
|
||||
home.shell.enableShellIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,10 +1,43 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.homeModules.users.john = {
|
||||
flake.homeModules.john = {
|
||||
home.username = "john";
|
||||
home.homeDirectory = "/home/john";
|
||||
home.stateVersion = "25.11";
|
||||
xdg.enable = true;
|
||||
|
||||
programs.git.settings.user.name = "John Lancaster";
|
||||
programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com";
|
||||
|
||||
imports = with inputs.self.homeModules; [
|
||||
rebuild
|
||||
sops
|
||||
git
|
||||
ssh
|
||||
shell-tools
|
||||
home # placeholder
|
||||
docker
|
||||
sublime
|
||||
desktop
|
||||
# resticprofile
|
||||
];
|
||||
};
|
||||
|
||||
flake.homeConfigurations.john = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
||||
modules = [
|
||||
inputs.self.homeModules.john
|
||||
|
||||
# Include another inline module to set the options created through the jsl-home modules
|
||||
{
|
||||
homeManagerFlakeDir = "~/.config/home-manager";
|
||||
docker.enable = true;
|
||||
ssh.matchSets = {
|
||||
certs = true;
|
||||
appdaemon = true;
|
||||
homelab = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
22
modules/users/john-sys.nix
Normal file
22
modules/users/john-sys.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ inputs, ... }:
|
||||
let
|
||||
userName = "john";
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.user =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users."${userName}" = {
|
||||
name = "${userName}";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users."${userName}" = {
|
||||
imports = [
|
||||
inputs.self.homeModules."${userName}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{ inputs, ... }:
|
||||
let
|
||||
userName = "john";
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.user =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users."${userName}" = {
|
||||
name = "${userName}";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users."${userName}" = {
|
||||
imports = [
|
||||
inputs.self.homeModules."${userName}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeConfigurations.${userName} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
||||
modules = [
|
||||
inputs.self.homeModules.users."${userName}"
|
||||
|
||||
# Include another inline module to set the options created through the jsl-home modules
|
||||
{
|
||||
homeManagerFlakeDir = "~/.config/home-manager";
|
||||
docker.enable = true;
|
||||
ssh.matchSets = {
|
||||
certs = true;
|
||||
appdaemon = true;
|
||||
homelab = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user