Skip to content

Commit

Permalink
home-manager/minimal: init (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Oct 5, 2023
1 parent 18c0827 commit e6321d2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 34 deletions.
35 changes: 2 additions & 33 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,44 +194,13 @@
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
homeManager = (mkHomeConfig rec {
homeManager = (mkHomeConfig {
inherit system;
configuration = ./home-manager/minimal.nix;
hostname = "devShell";
homeDirectory = "/tmp/home";
# Needs to run with `--impure` flag
username = builtins.getEnv "USER";
extraModules = [{
home = {
# Not sure why this variable is not filling up automatically
sessionPath = [ "${homeDirectory}/.nix-profile/bin" ];
stateVersion = "23.11";
};
# Disable some modules
home-manager = {
darwin.enable = false;
cli = {
enable = false;
git.enable = true;
htop.enable = true;
tmux.enable = true;
zsh.enable = true;
};
editor.helix.enable = false;
meta.enable = false;
};
# Disable systemd services/sockets/timers/etc.
systemd.user = {
automounts = pkgs.lib.mkForce { };
mounts = pkgs.lib.mkForce { };
paths = pkgs.lib.mkForce { };
services = pkgs.lib.mkForce { };
sessionVariables = pkgs.lib.mkForce { };
slices = pkgs.lib.mkForce { };
sockets = pkgs.lib.mkForce { };
targets = pkgs.lib.mkForce { };
timers = pkgs.lib.mkForce { };
};
}];
}).homeConfigurations.devShell;
in
{
Expand Down
1 change: 0 additions & 1 deletion home-manager/meta/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
options.home-manager.meta.enable = lib.mkDefaultOption "Home-Manager config";

config = lib.mkIf config.home-manager.meta.enable {

# Add some Nix related packages
home.packages = with pkgs; [
nix-cleanup
Expand Down
40 changes: 40 additions & 0 deletions home-manager/minimal.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ config, lib, ... }:

{
imports = [ ./default.nix ];

home = {
# Not sure why this variable is not filling up automatically
sessionPath = [ "${config.home.homeDirectory}/.nix-profile/bin" ];
stateVersion = "23.11";
};

# Disable some modules
home-manager = {
darwin.enable = false;
cli = {
enable = false;
git.enable = true;
htop.enable = true;
tmux.enable = true;
zsh.enable = true;
};
editor.helix.enable = false;
meta.enable = false;
};

# Disable systemd services/sockets/timers/etc.
systemd.user = {
automounts = lib.mkForce { };
mounts = lib.mkForce { };
paths = lib.mkForce { };
services = lib.mkForce { };
sessionVariables = lib.mkForce { };
slices = lib.mkForce { };
sockets = lib.mkForce { };
targets = lib.mkForce { };
timers = lib.mkForce { };
};

manual.manpages.enable = false;
}

0 comments on commit e6321d2

Please sign in to comment.