format
This commit is contained in:
@@ -40,7 +40,9 @@ in
|
|||||||
apps.art.enable = lib.mkEnableOption "digital art and creative applications";
|
apps.art.enable = lib.mkEnableOption "digital art and creative applications";
|
||||||
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
|
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
|
||||||
};
|
};
|
||||||
config.users.users = let
|
config.users.users =
|
||||||
packages = artPackages ++ gameDevPackages;
|
let
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
packages = artPackages ++ gameDevPackages;
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,25 +50,27 @@ in
|
|||||||
# environmentFile = config.sops.secrets.switch-presence.path;
|
# environmentFile = config.sops.secrets.switch-presence.path;
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit retroarchWithCores;
|
packages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit retroarchWithCores;
|
||||||
shipwright # zelda OoT port
|
inherit (pkgs)
|
||||||
mangohud # fps & stats overlay
|
shipwright # zelda OoT port
|
||||||
lutris # games launcher & emulator hub
|
mangohud # fps & stats overlay
|
||||||
cartridges # games launcher
|
lutris # games launcher & emulator hub
|
||||||
gamemode # optimizes linux to have better gaming performance
|
cartridges # games launcher
|
||||||
heroic # install epic games
|
gamemode # optimizes linux to have better gaming performance
|
||||||
protonup-qt # update proton-ge
|
heroic # install epic games
|
||||||
ns-usbloader # load games into my switch
|
protonup-qt # update proton-ge
|
||||||
# emulators
|
ns-usbloader # load games into my switch
|
||||||
rpcs3 # ps3
|
# emulators
|
||||||
cemu # wii u
|
rpcs3 # ps3
|
||||||
ryubing # switch
|
cemu # wii u
|
||||||
prismlauncher # minecraft launcher with jdk overlays
|
ryubing # switch
|
||||||
;
|
prismlauncher # minecraft launcher with jdk overlays
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,28 +30,30 @@ in
|
|||||||
{
|
{
|
||||||
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";
|
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";
|
||||||
config = lib.mkIf config.my.apps.internet.enable {
|
config = lib.mkIf config.my.apps.internet.enable {
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.apps (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.apps (_user: {
|
||||||
programs.librewolf = import ./librewolf.nix;
|
programs.librewolf = import ./librewolf.nix;
|
||||||
});
|
});
|
||||||
programs.geary.enable = true;
|
programs.geary.enable = true;
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
# inherit (inputs.zen-browser.packages.x86_64-linux) twilight;
|
packages = builtins.attrValues {
|
||||||
inherit krisp-patcher;
|
# inherit (inputs.zen-browser.packages.x86_64-linux) twilight;
|
||||||
inherit (pkgs)
|
inherit krisp-patcher;
|
||||||
# thunderbird # email client
|
inherit (pkgs)
|
||||||
warp # transfer files with based ppl
|
# thunderbird # email client
|
||||||
nextcloud-client # self-hosted google-drive alternative
|
warp # transfer files with based ppl
|
||||||
fragments # beautiful torrent client
|
nextcloud-client # self-hosted google-drive alternative
|
||||||
tor-browser # dark web, so dark!
|
fragments # beautiful torrent client
|
||||||
telegram-desktop # furry chat
|
tor-browser # dark web, so dark!
|
||||||
nicotine-plus # remember Ares?
|
telegram-desktop # furry chat
|
||||||
discord # :3
|
nicotine-plus # remember Ares?
|
||||||
vdhcoapp # video download helper assistant
|
discord # :3
|
||||||
nextcloud-talk-desktop # nextcloud talk client
|
vdhcoapp # video download helper assistant
|
||||||
fractal # matrix client
|
nextcloud-talk-desktop # nextcloud talk client
|
||||||
;
|
fractal # matrix client
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,15 +8,17 @@
|
|||||||
{
|
{
|
||||||
options.my.apps.misc.enable = lib.mkEnableOption "miscellaneous desktop applications";
|
options.my.apps.misc.enable = lib.mkEnableOption "miscellaneous desktop applications";
|
||||||
config = lib.mkIf config.my.apps.misc.enable {
|
config = lib.mkIf config.my.apps.misc.enable {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
blanket # background noise
|
inherit (pkgs)
|
||||||
metadata-cleaner # remove any metadata and geolocation from files
|
blanket # background noise
|
||||||
pika-backup # backups
|
metadata-cleaner # remove any metadata and geolocation from files
|
||||||
gnome-obfuscate # censor private information
|
pika-backup # backups
|
||||||
;
|
gnome-obfuscate # censor private information
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,19 @@
|
|||||||
{
|
{
|
||||||
options.my.apps.multimedia.enable = lib.mkEnableOption "multimedia applications and media players";
|
options.my.apps.multimedia.enable = lib.mkEnableOption "multimedia applications and media players";
|
||||||
config = lib.mkIf config.my.apps.multimedia.enable {
|
config = lib.mkIf config.my.apps.multimedia.enable {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
curtail # image compressor
|
inherit (pkgs)
|
||||||
easyeffects # equalizer
|
curtail # image compressor
|
||||||
identity # compare images or videos
|
easyeffects # equalizer
|
||||||
mousai # poor man shazam
|
identity # compare images or videos
|
||||||
shortwave # listen to world radio
|
mousai # poor man shazam
|
||||||
tagger # tag music files
|
shortwave # listen to world radio
|
||||||
;
|
tagger # tag music files
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,16 @@
|
|||||||
{
|
{
|
||||||
options.my.apps.piano.enable = lib.mkEnableOption "piano learning and music theory apps";
|
options.my.apps.piano.enable = lib.mkEnableOption "piano learning and music theory apps";
|
||||||
config = lib.mkIf config.my.apps.piano.enable {
|
config = lib.mkIf config.my.apps.piano.enable {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
neothesia
|
inherit (pkgs)
|
||||||
linthesia
|
neothesia
|
||||||
timidity
|
linthesia
|
||||||
;
|
timidity
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,17 +9,19 @@
|
|||||||
options.my.apps.office.enable = lib.mkEnableOption "office applications and productivity tools";
|
options.my.apps.office.enable = lib.mkEnableOption "office applications and productivity tools";
|
||||||
config = lib.mkIf config.my.apps.office.enable {
|
config = lib.mkIf config.my.apps.office.enable {
|
||||||
environment.variables.CALIBRE_USE_SYSTEM_THEME = "1";
|
environment.variables.CALIBRE_USE_SYSTEM_THEME = "1";
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
jre17_minimal # for libreoffice extensions
|
inherit (pkgs)
|
||||||
libreoffice # office, but based & european
|
jre17_minimal # for libreoffice extensions
|
||||||
calibre # ugly af eBook library manager
|
libreoffice # office, but based & european
|
||||||
newsflash # feed reader, syncs with nextcloud
|
calibre # ugly af eBook library manager
|
||||||
furtherance # I packaged this one tehee track time utility
|
newsflash # feed reader, syncs with nextcloud
|
||||||
# planify # let's pretend I will organize my tasks
|
furtherance # I packaged this one tehee track time utility
|
||||||
;
|
# planify # let's pretend I will organize my tasks
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.apps packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{
|
{
|
||||||
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
|
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
|
||||||
config = lib.mkIf config.my.emacs.enable {
|
config = lib.mkIf config.my.emacs.enable {
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (_user: {
|
||||||
xdg.dataFile = {
|
xdg.dataFile = {
|
||||||
"doom/templates/events.org".source = ../../dotfiles/doom/templates/events.org;
|
"doom/templates/events.org".source = ../../dotfiles/doom/templates/events.org;
|
||||||
"doom/templates/default.org".source = ../../dotfiles/doom/templates/default.org;
|
"doom/templates/default.org".source = ../../dotfiles/doom/templates/default.org;
|
||||||
@@ -22,31 +22,33 @@
|
|||||||
e = "edit";
|
e = "edit";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs.xorg) xwininfo;
|
packages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs.xorg) xwininfo;
|
||||||
#emacs everywhere
|
inherit (pkgs)
|
||||||
xdotool
|
#emacs everywhere
|
||||||
xclip
|
xdotool
|
||||||
wl-clipboard-rs
|
xclip
|
||||||
fd # modern find, faster searches
|
wl-clipboard-rs
|
||||||
fzf # fuzzy finder! super cool and useful
|
fd # modern find, faster searches
|
||||||
ripgrep # modern grep
|
fzf # fuzzy finder! super cool and useful
|
||||||
tree-sitter # code parsing based on symbols and shit, I do not get it
|
ripgrep # modern grep
|
||||||
graphviz # graphs
|
tree-sitter # code parsing based on symbols and shit, I do not get it
|
||||||
tetex # export pdf
|
graphviz # graphs
|
||||||
languagetool # proofreader for English
|
tetex # export pdf
|
||||||
# lsps
|
languagetool # proofreader for English
|
||||||
yaml-language-server
|
# lsps
|
||||||
markdownlint-cli
|
yaml-language-server
|
||||||
;
|
markdownlint-cli
|
||||||
inherit (pkgs.nodePackages)
|
;
|
||||||
vscode-json-languageserver
|
inherit (pkgs.nodePackages)
|
||||||
prettier # multi-language linter
|
vscode-json-languageserver
|
||||||
;
|
prettier # multi-language linter
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.dev packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.dev packages;
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -57,7 +59,8 @@
|
|||||||
extraPackages =
|
extraPackages =
|
||||||
epkgs:
|
epkgs:
|
||||||
let
|
let
|
||||||
inherit (config.home-manager.users.${inputs.self.lib.getFirstUser config.my.toggleUsers.dev}.programs.emacs)
|
inherit
|
||||||
|
(config.home-manager.users.${inputs.self.lib.getFirstUser config.my.toggleUsers.dev}.programs.emacs)
|
||||||
extraPackages
|
extraPackages
|
||||||
extraConfig
|
extraConfig
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ in
|
|||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (_user: {
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"npm/npmrc".source = ../../dotfiles/npmrc;
|
"npm/npmrc".source = ../../dotfiles/npmrc;
|
||||||
"configstore/update-notifier-npm-check.json".text = builtins.toJSON {
|
"configstore/update-notifier-npm-check.json".text = builtins.toJSON {
|
||||||
|
|||||||
@@ -34,21 +34,19 @@ in
|
|||||||
};
|
};
|
||||||
config = lib.mkIf config.my.dev.nix.enable {
|
config = lib.mkIf config.my.dev.nix.enable {
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (_user: {
|
||||||
programs.${shellType}.shellAliases =
|
programs.${shellType}.shellAliases = inputs.self.lib.mergeAliases inputs.self.lib.commonAliases {
|
||||||
inputs.self.lib.mergeAliases inputs.self.lib.commonAliases
|
nixformat = ''
|
||||||
{
|
deadnix -e && \
|
||||||
nixformat = ''
|
nix run nixpkgs#nixfmt-tree && \
|
||||||
deadnix -e && \
|
statix fix
|
||||||
nix run nixpkgs#nixfmt-tree && \
|
'';
|
||||||
statix fix
|
nix-push-cache = ''
|
||||||
'';
|
nix build $NH_FLAKE#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel \
|
||||||
nix-push-cache = ''
|
--print-out-paths --fallback --max-jobs 100 --cores 0 |
|
||||||
nix build $NH_FLAKE#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel \
|
nix run nixpkgs#attic-client -- push lan:nixos --stdin
|
||||||
--print-out-paths --fallback --max-jobs 100 --cores 0 |
|
'';
|
||||||
nix run nixpkgs#attic-client -- push lan:nixos --stdin
|
};
|
||||||
'';
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ in
|
|||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
users.users = inputs.self.lib.mkUserAttrs lib config.my.toggleUsers.dev { inherit packages; };
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (_user: {
|
||||||
xdg.configFile."python/pythonrc".source = ../../dotfiles/pythonrc;
|
xdg.configFile."python/pythonrc".source = ../../dotfiles/pythonrc;
|
||||||
});
|
});
|
||||||
environment.variables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc";
|
environment.variables.PYTHONSTARTUP = "\${XDG_CONFIG_HOME}/python/pythonrc";
|
||||||
|
|||||||
@@ -37,11 +37,14 @@
|
|||||||
description = "Configuration for multiple scripts.";
|
description = "Configuration for multiple scripts.";
|
||||||
};
|
};
|
||||||
config = lib.mkIf (lib.any (s: s.enable) (lib.attrValues config.my.scripts)) {
|
config = lib.mkIf (lib.any (s: s.enable) (lib.attrValues config.my.scripts)) {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = config.my.scripts
|
let
|
||||||
|> lib.mapAttrsToList (_name: script: lib.optional (script.enable && script.install) script.package)
|
packages =
|
||||||
|> lib.flatten;
|
config.my.scripts
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.scripts packages;
|
|> lib.mapAttrsToList (_name: script: lib.optional (script.enable && script.install) script.package)
|
||||||
|
|> lib.flatten;
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.scripts packages;
|
||||||
systemd.user.services =
|
systemd.user.services =
|
||||||
config.my.scripts
|
config.my.scripts
|
||||||
|> lib.mapAttrs' (
|
|> lib.mapAttrs' (
|
||||||
|
|||||||
@@ -118,8 +118,14 @@ in
|
|||||||
apps = "jawz";
|
apps = "jawz";
|
||||||
dev = "bearded_dragonn";
|
dev = "bearded_dragonn";
|
||||||
shell = "jawz";
|
shell = "jawz";
|
||||||
gaming = [ "jawz" "bearded_dragonn" ];
|
gaming = [
|
||||||
stylix = [ "jawz" "bearded_dragonn" ];
|
"jawz"
|
||||||
|
"bearded_dragonn"
|
||||||
|
];
|
||||||
|
stylix = [
|
||||||
|
"jawz"
|
||||||
|
"bearded_dragonn"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ in
|
|||||||
{
|
{
|
||||||
options.my.services.printing.enable = lib.mkEnableOption "printing services and drivers";
|
options.my.services.printing.enable = lib.mkEnableOption "printing services and drivers";
|
||||||
config = lib.mkIf config.my.services.printing.enable {
|
config = lib.mkIf config.my.services.printing.enable {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = [ pkgs.simple-scan ];
|
let
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.services packages;
|
packages = [ pkgs.simple-scan ];
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.services packages;
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = printingDrivers;
|
drivers = printingDrivers;
|
||||||
|
|||||||
@@ -15,9 +15,11 @@
|
|||||||
description = "The shell to use system-wide (bash or zsh)";
|
description = "The shell to use system-wide (bash or zsh)";
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
users.users = lib.mkMerge (map (user: {
|
users.users = lib.mkMerge (
|
||||||
${user}.shell = pkgs.${config.my.shell.type};
|
map (user: {
|
||||||
}) (inputs.self.lib.normalizeUsers config.my.toggleUsers.shell));
|
${user}.shell = pkgs.${config.my.shell.type};
|
||||||
|
}) (inputs.self.lib.normalizeUsers config.my.toggleUsers.shell)
|
||||||
|
);
|
||||||
programs.zsh.enable = config.my.shell.type == "zsh";
|
programs.zsh.enable = config.my.shell.type == "zsh";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,15 @@
|
|||||||
{
|
{
|
||||||
options.my.shell.exercism.enable = lib.mkEnableOption "Exercism coding practice platform";
|
options.my.shell.exercism.enable = lib.mkEnableOption "Exercism coding practice platform";
|
||||||
config = lib.mkIf config.my.shell.exercism.enable {
|
config = lib.mkIf config.my.shell.exercism.enable {
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
exercism # learn to code
|
inherit (pkgs)
|
||||||
bats # testing system, required by Exercism
|
exercism # learn to code
|
||||||
;
|
bats # testing system, required by Exercism
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,16 @@
|
|||||||
{
|
{
|
||||||
options.my.shell.multimedia.enable = lib.mkEnableOption "multimedia CLI tools and codecs";
|
options.my.shell.multimedia.enable = lib.mkEnableOption "multimedia CLI tools and codecs";
|
||||||
config = lib.mkIf config.my.shell.multimedia.enable {
|
config = lib.mkIf config.my.shell.multimedia.enable {
|
||||||
sops.secrets."gallery-dl/secrets" = let
|
sops.secrets."gallery-dl/secrets" =
|
||||||
# Use first user for secret ownership
|
let
|
||||||
user = inputs.self.lib.getFirstUser config.my.toggleUsers.shell;
|
# Use first user for secret ownership
|
||||||
in {
|
user = inputs.self.lib.getFirstUser config.my.toggleUsers.shell;
|
||||||
sopsFile = ../../secrets/gallery.yaml;
|
in
|
||||||
owner = user;
|
{
|
||||||
mode = "0400";
|
sopsFile = ../../secrets/gallery.yaml;
|
||||||
};
|
owner = user;
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.shell (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.shell (user: {
|
||||||
programs = {
|
programs = {
|
||||||
yt-dlp = {
|
yt-dlp = {
|
||||||
@@ -42,14 +44,16 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
ffmpeg # not ffmpreg, the coolest video conversion tool!
|
inherit (pkgs)
|
||||||
imagemagick # photoshop what??
|
ffmpeg # not ffmpreg, the coolest video conversion tool!
|
||||||
ffpb # make ffmpeg encoding... a bit fun
|
imagemagick # photoshop what??
|
||||||
;
|
ffpb # make ffmpeg encoding... a bit fun
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,78 +13,78 @@ in
|
|||||||
config = lib.mkIf config.my.shell.tools.enable {
|
config = lib.mkIf config.my.shell.tools.enable {
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.shell (user: {
|
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.shell (user: {
|
||||||
programs = {
|
programs = {
|
||||||
hstr.enable = true;
|
hstr.enable = true;
|
||||||
htop = {
|
htop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.htop-vim;
|
package = pkgs.htop-vim;
|
||||||
};
|
|
||||||
eza = {
|
|
||||||
enable = true;
|
|
||||||
git = true;
|
|
||||||
icons = "auto";
|
|
||||||
};
|
|
||||||
zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = shellType == "bash";
|
|
||||||
enableZshIntegration = shellType == "zsh";
|
|
||||||
};
|
|
||||||
bat = {
|
|
||||||
enable = true;
|
|
||||||
config.pager = "less -FR";
|
|
||||||
extraPackages = builtins.attrValues {
|
|
||||||
inherit (pkgs.bat-extras)
|
|
||||||
batman # man pages
|
|
||||||
batpipe # piping
|
|
||||||
batgrep # ripgrep
|
|
||||||
batdiff # this is getting crazy!
|
|
||||||
batwatch # probably my next best friend
|
|
||||||
prettybat # trans your sourcecode!
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
};
|
eza = {
|
||||||
password-store = {
|
enable = true;
|
||||||
enable = false;
|
git = true;
|
||||||
package = pkgs.gopass;
|
icons = "auto";
|
||||||
settings = {
|
|
||||||
PASSWORD_STORE_AUTOCLIP = "true";
|
|
||||||
PASSWORD_STORE_AUTOIMPORT = "false";
|
|
||||||
PASSWORD_STORE_CLIPTIMEOUT = "45";
|
|
||||||
PASSWORD_STORE_EXPORTKEYS = "false";
|
|
||||||
PASSWORD_STORE_NOPAGER = "false";
|
|
||||||
PASSWORD_STORE_NOTIFICATIONS = "false";
|
|
||||||
PASSWORD_STORE_PARSING = "true";
|
|
||||||
PASSWORD_STORE_PATH = "/home/${user}/.local/share/pass";
|
|
||||||
PASSWORD_STORE_SAFECONTENT = "true";
|
|
||||||
};
|
};
|
||||||
};
|
zoxide = {
|
||||||
${shellType} = {
|
enable = true;
|
||||||
shellAliases = inputs.self.lib.mergeAliases inputs.self.lib.commonAliases {
|
enableBashIntegration = shellType == "bash";
|
||||||
cd = "z";
|
enableZshIntegration = shellType == "zsh";
|
||||||
hh = "hstr";
|
|
||||||
ls = "eza --icons --group-directories-first";
|
|
||||||
rm = "trash";
|
|
||||||
b = "bat";
|
|
||||||
f = "fzf --multi --exact -i";
|
|
||||||
unique-extensions = ''
|
|
||||||
fd -tf | rev | cut -d. -f1 | rev |
|
|
||||||
tr '[:upper:]' '[:lower:]' | sort |
|
|
||||||
uniq --count | sort -rn'';
|
|
||||||
};
|
};
|
||||||
}
|
bat = {
|
||||||
//
|
enable = true;
|
||||||
inputs.self.lib.shellConditional shellType
|
config.pager = "less -FR";
|
||||||
''
|
extraPackages = builtins.attrValues {
|
||||||
if command -v fzf-share >/dev/null; then
|
inherit (pkgs.bat-extras)
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
batman # man pages
|
||||||
source "$(fzf-share)/completion.bash"
|
batpipe # piping
|
||||||
fi
|
batgrep # ripgrep
|
||||||
''
|
batdiff # this is getting crazy!
|
||||||
''
|
batwatch # probably my next best friend
|
||||||
if command -v fzf-share >/dev/null; then
|
prettybat # trans your sourcecode!
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
;
|
||||||
source "$(fzf-share)/completion.bash"
|
};
|
||||||
fi
|
};
|
||||||
'';
|
password-store = {
|
||||||
|
enable = false;
|
||||||
|
package = pkgs.gopass;
|
||||||
|
settings = {
|
||||||
|
PASSWORD_STORE_AUTOCLIP = "true";
|
||||||
|
PASSWORD_STORE_AUTOIMPORT = "false";
|
||||||
|
PASSWORD_STORE_CLIPTIMEOUT = "45";
|
||||||
|
PASSWORD_STORE_EXPORTKEYS = "false";
|
||||||
|
PASSWORD_STORE_NOPAGER = "false";
|
||||||
|
PASSWORD_STORE_NOTIFICATIONS = "false";
|
||||||
|
PASSWORD_STORE_PARSING = "true";
|
||||||
|
PASSWORD_STORE_PATH = "/home/${user}/.local/share/pass";
|
||||||
|
PASSWORD_STORE_SAFECONTENT = "true";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
${shellType} = {
|
||||||
|
shellAliases = inputs.self.lib.mergeAliases inputs.self.lib.commonAliases {
|
||||||
|
cd = "z";
|
||||||
|
hh = "hstr";
|
||||||
|
ls = "eza --icons --group-directories-first";
|
||||||
|
rm = "trash";
|
||||||
|
b = "bat";
|
||||||
|
f = "fzf --multi --exact -i";
|
||||||
|
unique-extensions = ''
|
||||||
|
fd -tf | rev | cut -d. -f1 | rev |
|
||||||
|
tr '[:upper:]' '[:lower:]' | sort |
|
||||||
|
uniq --count | sort -rn'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//
|
||||||
|
inputs.self.lib.shellConditional shellType
|
||||||
|
''
|
||||||
|
if command -v fzf-share >/dev/null; then
|
||||||
|
source "$(fzf-share)/key-bindings.bash"
|
||||||
|
source "$(fzf-share)/completion.bash"
|
||||||
|
fi
|
||||||
|
''
|
||||||
|
''
|
||||||
|
if command -v fzf-share >/dev/null; then
|
||||||
|
source "$(fzf-share)/key-bindings.bash"
|
||||||
|
source "$(fzf-share)/completion.bash"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
programs = {
|
programs = {
|
||||||
@@ -96,23 +96,25 @@ in
|
|||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users = let
|
users.users =
|
||||||
packages = builtins.attrValues {
|
let
|
||||||
inherit (pkgs)
|
packages = builtins.attrValues {
|
||||||
ripgrep # modern grep
|
inherit (pkgs)
|
||||||
dust # rusty du similar to gdu
|
ripgrep # modern grep
|
||||||
fd # modern find, faster searches
|
dust # rusty du similar to gdu
|
||||||
fzf # fuzzy finder! super cool and useful
|
fd # modern find, faster searches
|
||||||
gdu # disk-space utility checker, somewhat useful
|
fzf # fuzzy finder! super cool and useful
|
||||||
tealdeer # man for retards
|
gdu # disk-space utility checker, somewhat useful
|
||||||
trash-cli # oop! did not meant to delete that
|
tealdeer # man for retards
|
||||||
jq # json parser
|
trash-cli # oop! did not meant to delete that
|
||||||
yq # yaml parser
|
jq # json parser
|
||||||
smartmontools # check hard drie health
|
yq # yaml parser
|
||||||
rmlint # amazing dupe finder that integrates well with BTRFS
|
smartmontools # check hard drie health
|
||||||
;
|
rmlint # amazing dupe finder that integrates well with BTRFS
|
||||||
};
|
;
|
||||||
in inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
};
|
||||||
|
in
|
||||||
|
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.shell packages;
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
|
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
|
||||||
LESSHISTFILE = "-";
|
LESSHISTFILE = "-";
|
||||||
|
|||||||
@@ -214,22 +214,29 @@ in
|
|||||||
};
|
};
|
||||||
getSshKeys = keyNames: keyNames |> map (name: inputs.self.lib.sshKeys.${name});
|
getSshKeys = keyNames: keyNames |> map (name: inputs.self.lib.sshKeys.${name});
|
||||||
# Helper functions for multi-user toggle support
|
# Helper functions for multi-user toggle support
|
||||||
normalizeUsers = users:
|
normalizeUsers = users: if builtins.isString users then [ users ] else users;
|
||||||
if builtins.isString users then [ users ] else users;
|
mkUserPackages =
|
||||||
mkUserPackages = lib: users: packages:
|
lib: users: packages:
|
||||||
lib.mkMerge (map (user: {
|
lib.mkMerge (
|
||||||
${user}.packages = packages;
|
map (user: {
|
||||||
}) (inputs.self.lib.normalizeUsers users));
|
${user}.packages = packages;
|
||||||
mkUserAttrs = lib: users: attrs:
|
}) (inputs.self.lib.normalizeUsers users)
|
||||||
lib.mkMerge (map (user: {
|
);
|
||||||
${user} = attrs;
|
mkUserAttrs =
|
||||||
}) (inputs.self.lib.normalizeUsers users));
|
lib: users: attrs:
|
||||||
mkHomeManagerUsers = lib: users: fn:
|
lib.mkMerge (
|
||||||
lib.mkMerge (map (user: {
|
map (user: {
|
||||||
${user} = fn user;
|
${user} = attrs;
|
||||||
}) (inputs.self.lib.normalizeUsers users));
|
}) (inputs.self.lib.normalizeUsers users)
|
||||||
getFirstUser = users:
|
);
|
||||||
if builtins.isString users then users else (builtins.head users);
|
mkHomeManagerUsers =
|
||||||
|
lib: users: fn:
|
||||||
|
lib.mkMerge (
|
||||||
|
map (user: {
|
||||||
|
${user} = fn user;
|
||||||
|
}) (inputs.self.lib.normalizeUsers users)
|
||||||
|
);
|
||||||
|
getFirstUser = users: if builtins.isString users then users else (builtins.head users);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user