2024-08-26 17:38:47 +02:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
outputs,
|
|
|
|
...
|
|
|
|
}:
|
2023-01-10 02:38:06 +01:00
|
|
|
let
|
2023-05-28 02:00:10 +02:00
|
|
|
# {{{ Imports
|
2023-01-10 02:38:06 +01:00
|
|
|
imports = [
|
2023-12-10 23:48:46 +01:00
|
|
|
# {{{ flake inputs
|
2023-03-12 05:24:25 +01:00
|
|
|
inputs.stylix.homeManagerModules.stylix
|
2023-04-27 01:08:20 +02:00
|
|
|
inputs.impermanence.nixosModules.home-manager.impermanence
|
2023-06-18 18:10:20 +02:00
|
|
|
inputs.spicetify-nix.homeManagerModules.spicetify
|
2023-08-17 09:31:46 +02:00
|
|
|
inputs.anyrun.homeManagerModules.default
|
2023-12-10 23:48:46 +01:00
|
|
|
inputs.nix-index-database.hmModules.nix-index
|
2024-01-31 20:03:00 +01:00
|
|
|
inputs.sops-nix.homeManagerModules.sops
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-12-10 23:48:46 +01:00
|
|
|
# {{{ self management
|
2023-09-04 04:58:39 +02:00
|
|
|
# NOTE: using `pkgs.system` before `module.options` is evaluated
|
|
|
|
# leads to infinite recursion!
|
|
|
|
inputs.intray.homeManagerModules.x86_64-linux.default
|
|
|
|
inputs.smos.homeManagerModules.x86_64-linux.default
|
2023-12-10 23:48:46 +01:00
|
|
|
# }}}
|
|
|
|
# }}}
|
|
|
|
# {{{ global configuration
|
2023-12-02 00:46:56 +01:00
|
|
|
./features/cli
|
|
|
|
./features/persistence.nix
|
|
|
|
../common
|
2024-08-26 17:38:47 +02:00
|
|
|
# }}}
|
2023-01-10 02:38:06 +01:00
|
|
|
];
|
|
|
|
in
|
2024-08-26 17:38:47 +02:00
|
|
|
# }}}
|
2023-01-10 02:38:06 +01:00
|
|
|
{
|
2023-01-10 16:05:48 +01:00
|
|
|
# Import all modules defined in modules/home-manager
|
2023-01-10 20:39:33 +01:00
|
|
|
imports = builtins.attrValues outputs.homeManagerModules ++ imports;
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-05-28 02:00:10 +02:00
|
|
|
# {{{ Nixpkgs
|
2023-01-10 02:38:06 +01:00
|
|
|
nixpkgs = {
|
|
|
|
# Add all overlays defined in the overlays directory
|
2024-08-26 17:38:47 +02:00
|
|
|
overlays =
|
|
|
|
builtins.attrValues outputs.overlays
|
|
|
|
++ lib.lists.optional config.satellite.toggles.neovim-nightly.enable inputs.neovim-nightly-overlay.overlay;
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-12-10 23:48:46 +01:00
|
|
|
config.allowUnfree = true;
|
2024-02-28 07:16:41 +01:00
|
|
|
|
|
|
|
config.permittedInsecurePackages = [
|
|
|
|
"electron-25.9.0"
|
2024-04-01 05:57:56 +02:00
|
|
|
"nix-2.15.3"
|
2024-02-28 07:16:41 +01:00
|
|
|
];
|
2023-01-10 02:38:06 +01:00
|
|
|
};
|
2023-05-28 02:00:10 +02:00
|
|
|
# }}}
|
2023-12-10 23:48:46 +01:00
|
|
|
# {{{ Enable the home-manager and git clis
|
2023-01-10 02:38:06 +01:00
|
|
|
programs = {
|
|
|
|
home-manager.enable = true;
|
|
|
|
git.enable = true;
|
|
|
|
};
|
2023-12-10 23:48:46 +01:00
|
|
|
# }}}
|
|
|
|
# {{{ Set reasonable defaults for some settings
|
2023-01-10 02:38:06 +01:00
|
|
|
home = {
|
|
|
|
username = lib.mkDefault "adrielus";
|
2024-05-21 01:37:39 +02:00
|
|
|
homeDirectory = "/home/${config.home.username}";
|
2023-01-10 02:38:06 +01:00
|
|
|
};
|
2024-08-26 17:38:47 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Ad-hoc settings
|
2023-12-10 23:48:46 +01:00
|
|
|
# Nicely reload system units when changing configs
|
|
|
|
systemd.user.startServices = lib.mkForce "sd-switch";
|
2023-01-10 20:39:33 +01:00
|
|
|
|
2024-01-31 20:03:00 +01:00
|
|
|
# Tell sops-nix to use ssh keys for decrypting secrets
|
|
|
|
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
2023-04-27 01:08:20 +02:00
|
|
|
|
2024-02-02 05:28:32 +01:00
|
|
|
# By default the paths given by sops contain annoying %r sections
|
|
|
|
sops.defaultSymlinkPath = "${config.home.homeDirectory}/.nix-sops";
|
|
|
|
|
2023-12-10 23:48:46 +01:00
|
|
|
# {{{ Ad-hoc stylix targets
|
|
|
|
stylix.targets.xresources.enable = true;
|
|
|
|
# }}}
|
|
|
|
# }}}
|
|
|
|
# {{{ Xdg user directories
|
2023-04-27 01:08:20 +02:00
|
|
|
# Set the xdg env vars
|
|
|
|
xdg.enable = true;
|
2023-05-24 03:17:09 +02:00
|
|
|
|
|
|
|
xdg.userDirs = {
|
|
|
|
enable = lib.mkDefault true;
|
2023-06-09 13:17:34 +02:00
|
|
|
createDirectories = lib.mkDefault false;
|
2023-12-13 19:30:04 +01:00
|
|
|
|
|
|
|
desktop = null;
|
|
|
|
templates = null;
|
|
|
|
download = "${config.home.homeDirectory}/downloads";
|
|
|
|
publicShare = "${config.home.homeDirectory}/public";
|
|
|
|
music = "${config.home.homeDirectory}/media/music";
|
|
|
|
pictures = "${config.home.homeDirectory}/media/pictures";
|
|
|
|
videos = "${config.home.homeDirectory}/media/videos";
|
|
|
|
documents = "${config.home.homeDirectory}/media/documents";
|
|
|
|
|
|
|
|
extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/screenshots";
|
|
|
|
extraConfig.XDG_PROJECTS_DIR = "${config.home.homeDirectory}/projects";
|
2023-05-24 03:17:09 +02:00
|
|
|
};
|
2024-08-30 01:10:41 +02:00
|
|
|
|
|
|
|
systemd.user.tmpfiles.rules = [
|
|
|
|
# Clean screenshots older than a week
|
|
|
|
"d ${config.xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR} - - - 7d"
|
|
|
|
];
|
2023-05-28 02:00:10 +02:00
|
|
|
# }}}
|
2023-01-10 02:38:06 +01:00
|
|
|
}
|