Change directory structure for home-manager
This commit is contained in:
parent
659c6a82a4
commit
450ca7f685
5 changed files with 31 additions and 75 deletions
|
@ -22,7 +22,7 @@
|
|||
);
|
||||
};
|
||||
perSystem = {
|
||||
pre-commit.settings.excludes = [ "home-manager/profiles/asahi/vencord.nix" ];
|
||||
treefmt.settings.global.excludes = [ "home-manager/profiles/asahi/vencord.nix" ];
|
||||
pre-commit.settings.excludes = [ "home-manager/asahi/vencord.nix" ];
|
||||
treefmt.settings.global.excludes = [ "home-manager/asahi/vencord.nix" ];
|
||||
};
|
||||
}
|
|
@ -22,7 +22,7 @@ in
|
|||
secrets = {
|
||||
openrouter_api_key = { };
|
||||
};
|
||||
defaultSopsFile = ../../../sops/secrets.yaml;
|
||||
defaultSopsFile = ../../sops/secrets.yaml;
|
||||
age.keyFile = /home/${username}/.config/sops/age/keys.txt;
|
||||
};
|
||||
# https://nix.catppuccin.com/search/rolling/
|
|
@ -3,43 +3,14 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
{ inputs, withSystem, ... }:
|
||||
let
|
||||
entries = builtins.attrNames (builtins.readDir ./.);
|
||||
modules = builtins.filter (dir: builtins.pathExists (./. + "/${dir}/default.nix")) entries;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
./profiles
|
||||
];
|
||||
# https://nix-community.github.io/home-manager/options.xhtml
|
||||
# flake.homeConfigurations = {
|
||||
# asahi = withSystem "aarch64-linux" (
|
||||
# { pkgs, ... }:
|
||||
# inputs.home-manager.lib.homeManagerConfiguration {
|
||||
# inherit pkgs;
|
||||
# extraSpecialArgs = { inherit inputs pkgs; };
|
||||
# modules = [
|
||||
# { nixpkgs.overlays = [ inputs.nur.overlays.default ]; }
|
||||
# inputs.lix-module.nixosModules.default
|
||||
# inputs.sops-nix.homeManagerModules.sops
|
||||
# inputs.stylix.homeModules.stylix
|
||||
# inputs.catppuccin.homeModules.catppuccin
|
||||
# ./home.nix
|
||||
# ];
|
||||
# }
|
||||
# );
|
||||
# raspi = withSystem "aarch64-linux" (
|
||||
# { pkgs, ... }:
|
||||
# inputs.home-manager.lib.homeHamagerConfiguration {
|
||||
# inherit pkgs;
|
||||
# extraSpecialArgs = { inherit inputs pkgs; };
|
||||
# modules = [
|
||||
# inputs.lix-module.nixosModules.default
|
||||
# inputs.sops-nix.homeManagerModules.sops
|
||||
# inputs.stylix.homeModules.stylix
|
||||
# inputs.catppuccin.homeModules.catppuccin
|
||||
# ./home.nix
|
||||
# ];
|
||||
# }
|
||||
# );
|
||||
# };
|
||||
] ++ builtins.map (name: (./. + "/${name}")) modules;
|
||||
perSystem =
|
||||
{ config, system, ... }:
|
||||
let
|
||||
|
@ -54,14 +25,29 @@
|
|||
{
|
||||
_module.args.pkgs = pkgs;
|
||||
devshells.default = {
|
||||
commands = [
|
||||
{
|
||||
help = " show home-manager documentation";
|
||||
name = "man-home";
|
||||
command = "${pkgs.man}/bin/man home-configuration.nix";
|
||||
category = " home-manager";
|
||||
}
|
||||
];
|
||||
commands =
|
||||
[
|
||||
{
|
||||
help = " show home-manager documentation";
|
||||
name = "man-home";
|
||||
command = "${pkgs.man}/bin/man home-configuration.nix";
|
||||
category = " home-manager";
|
||||
}
|
||||
]
|
||||
++ builtins.concatMap (name: [
|
||||
{
|
||||
help = " `home-manager switch` for ${name}";
|
||||
name = "hm-${name}";
|
||||
command = "${pkgs.home-manager}/bin/home-manager switch --flake .#${name}";
|
||||
category = " home-manager (${name})";
|
||||
}
|
||||
{
|
||||
help = " `home-manager switch` for ${name} with backup";
|
||||
name = "hm-${name}-backup";
|
||||
command = "${pkgs.home-manager}/bin/home-manager switch --flake .#${name} -b backup";
|
||||
category = " home-manager (${name})";
|
||||
}
|
||||
]) modules;
|
||||
packages = [ pkgs.home-manager ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
{ ... }:
|
||||
let
|
||||
entries = builtins.attrNames (builtins.readDir ./.);
|
||||
modules = builtins.filter (dir: builtins.pathExists (./. + "/${dir}/default.nix")) entries;
|
||||
in
|
||||
{
|
||||
imports = builtins.map (name: (./. + "/${name}")) modules;
|
||||
perSystem =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
devshells.default.commands = builtins.concatMap (name: [
|
||||
{
|
||||
help = " `home-manager switch` for ${name}";
|
||||
name = "hm-${name}";
|
||||
command = "${pkgs.home-manager}/bin/home-manager switch --flake .#${name}";
|
||||
category = " home-manager (${name})";
|
||||
}
|
||||
{
|
||||
help = " `home-manager switch` for ${name} with backup";
|
||||
name = "hm-${name}-backup";
|
||||
command = "${pkgs.home-manager}/bin/home-manager switch --flake .#${name} -b backup";
|
||||
category = " home-manager (${name})";
|
||||
}
|
||||
]) modules;
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue