feat(home-manager): service defs and fmt
fmt: reformatted using nixpkgs-fmt prettifier mpd: created configuration hypr: add window rules commons: add usingMusicPlayerDaemon variable
This commit is contained in:
parent
2d4b39c72f
commit
7d88765f5d
67 changed files with 633 additions and 573 deletions
|
@ -1,4 +1,4 @@
|
|||
{pkgs}: {
|
||||
{ pkgs }: {
|
||||
gil = "${pkgs.lazygit}/bin/lazygit";
|
||||
cd = "z";
|
||||
cdi = "zi";
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.myShells;
|
||||
in
|
||||
with lib; {
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./fish
|
||||
./nushell
|
||||
./zoxide.nix
|
||||
./direnv.nix
|
||||
./starship
|
||||
];
|
||||
with lib; {
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./fish
|
||||
./nushell
|
||||
./zoxide.nix
|
||||
./direnv.nix
|
||||
./starship
|
||||
];
|
||||
|
||||
options.myShells = {
|
||||
defaultShell = with types; mkOption {type = str;};
|
||||
enable = mkEnableOption "Enables the shell customisation module.";
|
||||
options.myShells = {
|
||||
defaultShell = with types; mkOption { type = str; };
|
||||
enable = mkEnableOption "Enables the shell customisation module.";
|
||||
};
|
||||
config = {
|
||||
myShells = {
|
||||
zsh.enable = false;
|
||||
fish.enable = true;
|
||||
#nushell.enable = true;
|
||||
defaultShell = "${config.programs.fish.package}/bin/fish";
|
||||
prompts.starship.enable = true;
|
||||
};
|
||||
config = {
|
||||
myShells = {
|
||||
zsh.enable = false;
|
||||
fish.enable = true;
|
||||
#nushell.enable = true;
|
||||
defaultShell = "${config.programs.fish.package}/bin/fish";
|
||||
prompts.starship.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{config, ...}: {
|
||||
{ config, ... }: {
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
|
|
7
home-manager/stvnliu/shells/env/default.nix
vendored
7
home-manager/stvnliu/shells/env/default.nix
vendored
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
EDITOR = "nvim";
|
||||
}
|
||||
|
|
|
@ -1,65 +1,65 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.myShells.fish;
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.fish = {enable = mkEnableOption "Enables fish and components.";};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
${builtins.readFile ./init/zoxide.fish}
|
||||
${builtins.readFile ./init/nh.fish}
|
||||
${builtins.readFile ./init/tailscale.fish}
|
||||
${builtins.readFile ./init/pass.fish}
|
||||
function fish_greeting
|
||||
${(pkgs.fortune.override {withOffensive = true;})}/bin/fortune -as
|
||||
end
|
||||
funcsave -q fish_greeting
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.fish = { enable = mkEnableOption "Enables fish and components."; };
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
${builtins.readFile ./init/zoxide.fish}
|
||||
${builtins.readFile ./init/nh.fish}
|
||||
${builtins.readFile ./init/tailscale.fish}
|
||||
${builtins.readFile ./init/pass.fish}
|
||||
function fish_greeting
|
||||
${(pkgs.fortune.override {withOffensive = true;})}/bin/fortune -as
|
||||
end
|
||||
funcsave -q fish_greeting
|
||||
|
||||
${pkgs.thefuck}/bin/thefuck --alias | source
|
||||
'';
|
||||
shellAliases = import ../aliases {inherit pkgs;};
|
||||
plugins = with pkgs.fishPlugins; [
|
||||
{
|
||||
name = "z";
|
||||
src = z.src;
|
||||
}
|
||||
{
|
||||
name = "plugin-git";
|
||||
src = plugin-git.src;
|
||||
}
|
||||
{
|
||||
name = "transient-fish";
|
||||
src = transient-fish.src;
|
||||
}
|
||||
{
|
||||
name = "done";
|
||||
src = done.src;
|
||||
}
|
||||
{
|
||||
name = "gruvbox";
|
||||
src = gruvbox.src;
|
||||
}
|
||||
{
|
||||
name = "colored-man-pages";
|
||||
src = colored-man-pages.src;
|
||||
}
|
||||
{
|
||||
name = "puffer";
|
||||
src = puffer.src;
|
||||
}
|
||||
{
|
||||
name = "pisces";
|
||||
src = pisces.src;
|
||||
}
|
||||
];
|
||||
};
|
||||
${pkgs.thefuck}/bin/thefuck --alias | source
|
||||
'';
|
||||
shellAliases = import ../aliases { inherit pkgs; };
|
||||
plugins = with pkgs.fishPlugins; [
|
||||
{
|
||||
name = "z";
|
||||
src = z.src;
|
||||
}
|
||||
{
|
||||
name = "plugin-git";
|
||||
src = plugin-git.src;
|
||||
}
|
||||
{
|
||||
name = "transient-fish";
|
||||
src = transient-fish.src;
|
||||
}
|
||||
{
|
||||
name = "done";
|
||||
src = done.src;
|
||||
}
|
||||
{
|
||||
name = "gruvbox";
|
||||
src = gruvbox.src;
|
||||
}
|
||||
{
|
||||
name = "colored-man-pages";
|
||||
src = colored-man-pages.src;
|
||||
}
|
||||
{
|
||||
name = "puffer";
|
||||
src = puffer.src;
|
||||
}
|
||||
{
|
||||
name = "pisces";
|
||||
src = pisces.src;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.myShells.nushell;
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.nushell = {enable = mkEnableOption "Enables nushell config";};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
nushell = {
|
||||
enable = true;
|
||||
configFile.source = ./init/config.nu;
|
||||
shellAliases = import ../aliases/default.nix {inherit pkgs;};
|
||||
};
|
||||
carapace = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.nushell = { enable = mkEnableOption "Enables nushell config"; };
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
nushell = {
|
||||
enable = true;
|
||||
configFile.source = ./init/config.nu;
|
||||
shellAliases = import ../aliases/default.nix { inherit pkgs; };
|
||||
};
|
||||
carapace = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.myShells.prompts.starship;
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
|
||||
myShells.prompts.starship.confPath = mkOption {
|
||||
type = types.path;
|
||||
default = ./presets/default.toml;
|
||||
};
|
||||
with lib; {
|
||||
options = {
|
||||
myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
|
||||
myShells.prompts.starship.confPath = mkOption {
|
||||
type = types.path;
|
||||
default = ./presets/default.toml;
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
myShells.prompts.starship.confPath = ./presets/pure-direnv.toml;
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = config.myShells.zsh.enable;
|
||||
enableFishIntegration = config.myShells.fish.enable;
|
||||
enableNushellIntegration = config.myShells.nushell.enable;
|
||||
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
myShells.prompts.starship.confPath = ./presets/pure-direnv.toml;
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = config.myShells.zsh.enable;
|
||||
enableFishIntegration = config.myShells.fish.enable;
|
||||
enableNushellIntegration = config.myShells.nushell.enable;
|
||||
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.shell.zsh;
|
||||
in
|
||||
with lib; {
|
||||
options.myShells.zsh = {
|
||||
enable = mkEnableOption "Enables zsh and components.";
|
||||
};
|
||||
config = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = import ./aliases {inherit pkgs;};
|
||||
dirHashes = {
|
||||
docs = "$HOME/Documents";
|
||||
dl = "$HOME/Downloads";
|
||||
dev = "$HOME/devel";
|
||||
screen = "$HOME/Pictures/Screenshots";
|
||||
};
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"rsync"
|
||||
"zoxide"
|
||||
];
|
||||
theme = "agnoster";
|
||||
};
|
||||
with lib; {
|
||||
options.myShells.zsh = {
|
||||
enable = mkEnableOption "Enables zsh and components.";
|
||||
};
|
||||
config = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = import ./aliases { inherit pkgs; };
|
||||
dirHashes = {
|
||||
docs = "$HOME/Documents";
|
||||
dl = "$HOME/Downloads";
|
||||
dev = "$HOME/devel";
|
||||
screen = "$HOME/Pictures/Screenshots";
|
||||
};
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"rsync"
|
||||
"zoxide"
|
||||
];
|
||||
theme = "agnoster";
|
||||
};
|
||||
home.packages = with pkgs; [zoxide];
|
||||
};
|
||||
}
|
||||
home.packages = with pkgs; [ zoxide ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue