refactor: move scripts into nixpkgs via packageOverrides
This commit is contained in:
parent
f586de1cb1
commit
f3c7e2b6c4
11 changed files with 117 additions and 114 deletions
10
flake.nix
10
flake.nix
|
@ -20,8 +20,16 @@
|
|||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [ overlays.calibre ];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
custom = {
|
||||
scripts = import ./home/scripts { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
|
|
|
@ -1,8 +1,2 @@
|
|||
# This file contains default settings used across different systems
|
||||
{
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
}
|
||||
{ }
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
sd = ''cd "$(dirname "$HOME/$(env --chdir ~ fzf)")"'';
|
||||
mkdir = "mkdir --parent";
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
};
|
||||
functions =
|
||||
let
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
# Formatter
|
||||
python311Packages.black # Python formatter
|
||||
#rPackages.styler # R formatter
|
||||
clang-tools
|
||||
nodePackages_latest.prettier # JSON, JS, TS formatter
|
||||
yamlfmt # YAML formatter
|
||||
|
@ -27,6 +26,7 @@
|
|||
rustfmt # Rust formatter
|
||||
shfmt # Shell, Bash etc.
|
||||
nixfmt-rfc-style
|
||||
stylua # lua formatter
|
||||
|
||||
# Misc
|
||||
ripgrep
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
screenshot = (import ../scripts { inherit pkgs; }).screenshot;
|
||||
set-background = (import ../scripts { inherit pkgs; }).set-background;
|
||||
|
||||
homeDirectory = config.home.homeDirectory;
|
||||
term = "${pkgs.alacritty}/bin/alacritty";
|
||||
filemanager = "${pkgs.gnome.nautilus}/bin/nautilus";
|
||||
|
@ -93,8 +90,8 @@
|
|||
"--locked XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"--locked XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"--locked XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"Print" = "exec ${screenshot}/bin/screenshot";
|
||||
"${mod}+u" = "exec ${screenshot}/bin/screenshot";
|
||||
"Print" = "exec ${pkgs.custom.scripts.screenshot}/bin/screenshot";
|
||||
"${mod}+u" = "exec ${pkgs.custom.scripts.screenshot}/bin/screenshot";
|
||||
#: Workspace movement {{{
|
||||
"--input-device=${inputs.kb.builtin} ${mod}+ampersand" = "workspace number 1";
|
||||
"--input-device=${inputs.kb.builtin} ${mod}+eacute" = "workspace number 2";
|
||||
|
@ -127,7 +124,7 @@
|
|||
{ command = "${pkgs.kdeconnect}/bin/kdeconnect-indicator"; }
|
||||
{ command = "${pkgs.protonmail-bridge-gui}/bin/protonmail-bridge-gui --no-window"; }
|
||||
{
|
||||
command = "${set-background}/bin/set-background -f ${wallpaper}";
|
||||
command = "${pkgs.custom.scripts.set-background}/bin/set-background -f ${wallpaper}";
|
||||
always = true;
|
||||
}
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
../../modules
|
||||
./home.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
|
|
|
@ -33,10 +33,7 @@
|
|||
stateVersion = config.system.stateVersion;
|
||||
inherit username;
|
||||
|
||||
packages =
|
||||
let
|
||||
scripts = import ../../home/scripts/list.nix { inherit pkgs; };
|
||||
programs = with pkgs; [
|
||||
packages = with pkgs; [
|
||||
keepassxc
|
||||
kdeconnect
|
||||
nextcloud-client
|
||||
|
@ -59,6 +56,7 @@
|
|||
signal-desktop
|
||||
calibre
|
||||
alacritty
|
||||
tagger
|
||||
|
||||
# proprietary
|
||||
obsidian
|
||||
|
@ -76,9 +74,8 @@
|
|||
fd
|
||||
ripgrep
|
||||
|
||||
custom.scripts.nixedit
|
||||
];
|
||||
in
|
||||
programs ++ scripts;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -38,9 +38,7 @@
|
|||
stateVersion = config.system.stateVersion;
|
||||
inherit username;
|
||||
|
||||
packages =
|
||||
let
|
||||
pk = with pkgs; [
|
||||
packages = with pkgs; [
|
||||
digikam
|
||||
fragments
|
||||
element-desktop
|
||||
|
@ -76,14 +74,10 @@
|
|||
fd
|
||||
ripgrep
|
||||
swaybg
|
||||
|
||||
custom.scripts.screenshot
|
||||
custom.scripts.set-background
|
||||
];
|
||||
scripts = with import ../../home/scripts { inherit pkgs; }; [
|
||||
screenshot
|
||||
set-background
|
||||
nixedit
|
||||
];
|
||||
in
|
||||
scripts ++ pk;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = with pkgs; {
|
||||
packages = [
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
fontDir.enable = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "Noto" ]; })
|
||||
d2coding
|
||||
jigmo
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,16 +29,24 @@ lib.mkIf config.programs.firefox.enable {
|
|||
AutofillCreditCardEnabled = false;
|
||||
AutofillAddressEnabled = false;
|
||||
# Check about:support for extension/add-on ID strings.
|
||||
ExtensionSettings = {
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "normal_install";
|
||||
};
|
||||
"firefox-translations-addon@mozilla.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/firefox-translations/latest.xpi";
|
||||
installation_mode = "normal_install";
|
||||
# WARNING: Does not seem to install extension, i.e useless
|
||||
ExtensionSettings =
|
||||
let
|
||||
extension = shortId: uuid: {
|
||||
name = uuid;
|
||||
value = {
|
||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.listToAttrs [
|
||||
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||
(extension "firefox-translations" "firefox-translations-addon@mozilla.org")
|
||||
(extension "private-relay" "private-relay@firefox.com")
|
||||
(extension "decentraleyes" "jid1-BoFifL9Vbdl2zQ@jetpack")
|
||||
(extension "duckduckgo-for-firefox" "ddg@search.mozilla.org")
|
||||
];
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
TopSites = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue