♻️ [shared] Moved Hm configs to shared base
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
common,
|
||||
systemConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@ -12,41 +9,23 @@ in
|
||||
{
|
||||
imports = [
|
||||
(lib.custom.relativeToBase "home-manager")
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
./development
|
||||
./hyprland
|
||||
./media
|
||||
./rofi
|
||||
./shell
|
||||
./zen
|
||||
./cursors.nix
|
||||
./default-applications.nix
|
||||
./development
|
||||
./freetube.nix
|
||||
./gtk.nix
|
||||
./gpg.nix
|
||||
./kitty.nix
|
||||
./media
|
||||
./nextcloud.nix
|
||||
./rofi
|
||||
./hyprland
|
||||
./shell
|
||||
./sioyek.nix
|
||||
./spicetify.nix
|
||||
./zen
|
||||
];
|
||||
|
||||
home = {
|
||||
username = systemConfig.username;
|
||||
homeDirectory = dir.home;
|
||||
|
||||
sessionVariables = {
|
||||
XDG_PICTURES_DIR = dir.pictures; # Define the default dir for pictures
|
||||
};
|
||||
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = systemConfig.version;
|
||||
home.sessionVariables = {
|
||||
XDG_PICTURES_DIR = dir.pictures; # Define the default dir for pictures
|
||||
};
|
||||
|
||||
# Adds pkgs.unstable in order to fetch packages from unstable repositories
|
||||
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./helix.nix
|
||||
./zed.nix
|
||||
];
|
||||
# TODO set Wayland vmOptions in Jetbrains products, Requires current installed version in path
|
||||
|
@ -1,35 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-crypt
|
||||
gitmoji-cli
|
||||
];
|
||||
|
||||
programs.git =
|
||||
let
|
||||
package = pkgs.git.override { withLibsecret = true; };
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = package;
|
||||
userName = "Martin Berg Alstad";
|
||||
userEmail = "git@martials.no";
|
||||
|
||||
aliases = {
|
||||
amend = "commit --amend";
|
||||
cm = "commit";
|
||||
s = "status";
|
||||
p = "push";
|
||||
};
|
||||
|
||||
signing.signByDefault = true;
|
||||
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
safe.directory = "/etc/nixos";
|
||||
credential.helper = "${package}/bin/git-credential-libsecret";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
catppuccin.helix = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.shellAliases.edit = "hx";
|
||||
helix =
|
||||
let
|
||||
prettier = format: {
|
||||
command = "prettier";
|
||||
args = [
|
||||
"--stdin-filepath"
|
||||
"file.${format}"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Markdown
|
||||
marksman
|
||||
markdown-oxide
|
||||
# Html, css, Json, Eslint
|
||||
vscode-langservers-extracted
|
||||
# Yaml
|
||||
ansible-language-server
|
||||
yaml-language-server
|
||||
];
|
||||
settings = {
|
||||
editor = {
|
||||
auto-save = {
|
||||
after-delay.enable = true;
|
||||
focus-lost = true;
|
||||
};
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
lsp = {
|
||||
display-inlay-hints = true;
|
||||
display-messages = true;
|
||||
};
|
||||
};
|
||||
keys.normal = {
|
||||
C-f = ":format";
|
||||
};
|
||||
};
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "css";
|
||||
formatter = prettier "css";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "json";
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = prettier "json";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "jsonc";
|
||||
language-servers = [
|
||||
];
|
||||
formatter = prettier "jsonc";
|
||||
file-types = [
|
||||
"jsonc"
|
||||
];
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
formatter = prettier "md";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "yaml";
|
||||
formatter = prettier "yaml";
|
||||
auto-format = true;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.btop = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.btop.enable = true;
|
||||
}
|
@ -1,12 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./btop.nix
|
||||
./cava
|
||||
./eza.nix
|
||||
./fastfetch.nix
|
||||
./fish.nix
|
||||
./fzf.nix
|
||||
./yazi
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
programs = {
|
||||
eza = {
|
||||
enable = true;
|
||||
colors = "always";
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
icons = "always";
|
||||
};
|
||||
fish.shellAliases.ls = "eza";
|
||||
};
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
fish.shellAliases.fetch = "fastfetch";
|
||||
|
||||
fastfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
logo = {
|
||||
source = "${lib.custom.relativeToRoot "shared/assets/Catppuccin.png"}";
|
||||
type = "kitty";
|
||||
height = 18;
|
||||
padding.top = 2;
|
||||
};
|
||||
display.separator = " ";
|
||||
modules =
|
||||
let
|
||||
keyColor = "34";
|
||||
module = type: key: {
|
||||
inherit type key keyColor;
|
||||
};
|
||||
formatModule = type: key: format: {
|
||||
inherit
|
||||
type
|
||||
key
|
||||
format
|
||||
keyColor
|
||||
;
|
||||
};
|
||||
in
|
||||
[
|
||||
"break"
|
||||
"break"
|
||||
{
|
||||
type = "title";
|
||||
keyWidth = 10;
|
||||
}
|
||||
"break"
|
||||
(module "os" " ")
|
||||
(module "kernel" " ")
|
||||
(formatModule "packages" " " "{} (nixpkgs)")
|
||||
(module "shell" " ")
|
||||
(module "terminal" " ")
|
||||
(module "wm" " ")
|
||||
(module "theme" " ")
|
||||
(module "cursor" " ")
|
||||
(module "terminalfont" " ")
|
||||
(module "uptime" " ")
|
||||
(formatModule "datetime" " " "{1}-{3}-{11}")
|
||||
(module "cpu" " ")
|
||||
(module "gpu" " ")
|
||||
(module "sound" " ")
|
||||
(module "lm" " ")
|
||||
"break"
|
||||
"colors"
|
||||
"break"
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
{ pkgs, theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin = {
|
||||
fish = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
# Start starship when creating a new shell
|
||||
interactiveShellInit = ''
|
||||
starship init fish | source
|
||||
${pkgs.fortune}/bin/fortune | ${pkgs.cowsay}/bin/cowsay -f tux
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
# !! to get the previous command
|
||||
# https://github.com/BrewingWeasel/fishbang
|
||||
name = "fishbang";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "BrewingWeasel";
|
||||
repo = "fishbang";
|
||||
rev = "50389667eb9ac79edcff9b987c83e1de8ac93921";
|
||||
hash = "sha256-IneNWyfo29C7FDA5b6pTZRX3HpP6y/dRM6GXuLq2+zc=";
|
||||
};
|
||||
}
|
||||
];
|
||||
shellAliases = {
|
||||
nix-shell = "nix-shell --run fish"; # Start nix-shells using fish
|
||||
};
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory.substitutions = {
|
||||
"Documents" = " ";
|
||||
"Downloads" = " ";
|
||||
"Music" = " ";
|
||||
"Pictures" = " ";
|
||||
"Git" = " ";
|
||||
"nextcloud" = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.fzf = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# cd alternative
|
||||
{
|
||||
programs = {
|
||||
fish.shellAliases.cd = "z";
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user