Migrate old home-manager modules
This commit is contained in:
55
homes/julian/global/default.nix
Normal file
55
homes/julian/global/default.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
outputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../features/cli
|
||||
../features/helix
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
];
|
||||
# warn-dirty = false; # TODO: do I want it? also for systems
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.user.startServices = "sd-switch"; # TODO: what is this
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "julian";
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
stateVersion = lib.mkDefault "23.11";
|
||||
|
||||
sessionPath = [ "$HOME/.local/bin" ];
|
||||
sessionVariables = {
|
||||
FLAKE = "$HOME/Documents/NixConfig";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: colorscheme
|
||||
# colorscheme.mode = lib.mkOverride 1499 "dark";
|
||||
# specialisation = {
|
||||
# dark.configuration.colorscheme.mode = lib.mkOverride 1498 "dark";
|
||||
# light.configuration.colorscheme.mode = lib.mkOverride 1498 "light";
|
||||
# };
|
||||
# home.file = {
|
||||
# ".colorscheme.json".text = builtins.toJSON config.colorscheme;
|
||||
# };
|
||||
|
||||
}
|
||||
45
homes/julian/global/mimeapps.nix
Normal file
45
homes/julian/global/mimeapps.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
# Manage mime-types via home-manager. Sadly the file gets overwritten by some applications and also not all of the desktop file paths are correct
|
||||
# Use from home-manager like this:
|
||||
#
|
||||
# xdg.mimeApps.enable = true;
|
||||
# xdg.mimeApps.defaultApplications = import ./mimeapps.nix {
|
||||
# inherit pkgs;
|
||||
# inherit lib;
|
||||
# };
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
package-names = with pkgs; {
|
||||
"x-scheme-handler/tg" = telegram-desktop;
|
||||
"x-scheme-handler/mailto" = thunderbird;
|
||||
"message/rfc822" = thunderbird;
|
||||
"x-scheme-handler/mid" = thunderbird;
|
||||
"x-scheme-handler/webcal" = thunderbird;
|
||||
"text/calendar" = thunderbird;
|
||||
"application/x-extension-ics" = thunderbird;
|
||||
"x-scheme-handler/webcals" = thunderbird;
|
||||
"application/zip" = mate.engrampa;
|
||||
"text/plain" = xfce.mousepad;
|
||||
"image/jpeg" = nomacs;
|
||||
"application/pdf" = evince;
|
||||
"text/html" = firefox;
|
||||
"x-scheme-handler/http" = firefox;
|
||||
"x-scheme-handler/https" = firefox;
|
||||
"x-scheme-handler/chrome" = firefox;
|
||||
"application/x-extension-htm" = firefox;
|
||||
"application/x-extension-html" = firefox;
|
||||
"application/x-extension-shtml" = firefox;
|
||||
"application/xhtml+xml" = firefox;
|
||||
"application/x-extension-xhtml" = firefox;
|
||||
"application/x-extension-xht" = firefox;
|
||||
"image/svg+xml" = inkscape;
|
||||
"image/png" = nomacs;
|
||||
"x-scheme-handler/eclipse+command" = dbeaver-bin;
|
||||
"video/mp4" = vlc;
|
||||
"audio/mpeg" = vlc;
|
||||
"inode/directory" = pcmanfm;
|
||||
};
|
||||
in
|
||||
lib.mapAttrs (mimeType: package: [
|
||||
"${package}/share/applications/${package.pname}.desktop"
|
||||
]) package-names
|
||||
Reference in New Issue
Block a user