This commit is contained in:
parent
30f81b2b79
commit
d9d4e43c35
17 changed files with 310 additions and 276 deletions
|
|
@ -1,230 +1,241 @@
|
|||
{ machine, ... }@inputs:
|
||||
{ machine, lib, ... }@inputs:
|
||||
{
|
||||
imports = [
|
||||
./nvim
|
||||
./fish
|
||||
./kanata
|
||||
./kitty
|
||||
./tmux
|
||||
./git
|
||||
./jj
|
||||
./niri
|
||||
./zed
|
||||
./firefox
|
||||
];
|
||||
|
||||
custom.program.graphcial-packages = machine.program {
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
obsidian
|
||||
element-desktop
|
||||
# chromium
|
||||
bind.dnsutils
|
||||
mpv
|
||||
vlc
|
||||
libreoffice-qt
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
];
|
||||
};
|
||||
};
|
||||
imports = lib.concatLists [
|
||||
[
|
||||
./xdg.nix
|
||||
./nvim
|
||||
./fish
|
||||
./kanata
|
||||
./kitty
|
||||
./tmux
|
||||
./git
|
||||
./jj
|
||||
./niri
|
||||
./zed
|
||||
./firefox
|
||||
]
|
||||
|
||||
custom.program.discord = machine.program {
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
disableFeatures = [
|
||||
"WebRtcAllowInputVolumeAdjustment"
|
||||
"ChromeWideEchoCancellation"
|
||||
];
|
||||
enableFeatures = [ ];
|
||||
commandLineArgs =
|
||||
lib.optionals (enableFeatures != [ ]) [
|
||||
"--enable-features=${lib.concatStringsSep "," enableFeatures}"
|
||||
]
|
||||
++ lib.optionals (disableFeatures != [ ]) [
|
||||
"--disable-features=${lib.concatStringsSep "," disableFeatures}"
|
||||
(machine.program {
|
||||
name = "graphcial-packages";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
obsidian
|
||||
element-desktop
|
||||
# chromium
|
||||
bind.dnsutils
|
||||
mpv
|
||||
vlc
|
||||
libreoffice-qt
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
];
|
||||
joinedArgs = lib.concatStringsSep " " commandLineArgs;
|
||||
in
|
||||
{
|
||||
home.file."${config.xdg.configHome}/discord/settings.json".source = pkgs.writeText "settings.json" (
|
||||
lib.strings.toJSON (
|
||||
let
|
||||
endpoint = "https://inject.shelter.uwu.network/shelter+yt_ad_block+yt_embed_fix";
|
||||
in
|
||||
{
|
||||
SKIP_HOST_UPDATE = true;
|
||||
MINIMIZE_TO_TRAY = false;
|
||||
OPEN_ON_STARTUP = false;
|
||||
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
|
||||
enableHardwareAcceleration = true;
|
||||
UPDATE_ENDPOINT = endpoint;
|
||||
NEW_UPDATE_ENDPOINT = "${endpoint}/";
|
||||
BACKGROUND_COLOR = "#2c2d32";
|
||||
};
|
||||
})
|
||||
|
||||
openasar = {
|
||||
setup = true;
|
||||
# using the performance preset breaks vaapi
|
||||
cmdPreset = "balanced";
|
||||
# quickstart is buggy and breaks discord sometimes.
|
||||
quickstart = false;
|
||||
# this css is made for discord compact mode. if you're not using that, stuff won't align!!
|
||||
css =
|
||||
# css
|
||||
''
|
||||
/* Hide nitro begging */
|
||||
@import url("https://raw.codeberg.page/AllPurposeMat/Disblock-Origin/DisblockOrigin.theme.css");
|
||||
(machine.program {
|
||||
name = "discord";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
disableFeatures = [
|
||||
"WebRtcAllowInputVolumeAdjustment"
|
||||
"ChromeWideEchoCancellation"
|
||||
];
|
||||
enableFeatures = [ ];
|
||||
commandLineArgs =
|
||||
lib.optionals (enableFeatures != [ ]) [
|
||||
"--enable-features=${lib.concatStringsSep "," enableFeatures}"
|
||||
]
|
||||
++ lib.optionals (disableFeatures != [ ]) [
|
||||
"--disable-features=${lib.concatStringsSep "," disableFeatures}"
|
||||
];
|
||||
joinedArgs = lib.concatStringsSep " " commandLineArgs;
|
||||
in
|
||||
{
|
||||
home.file."${config.xdg.configHome}/discord/settings.json".source = pkgs.writeText "settings.json" (
|
||||
lib.strings.toJSON (
|
||||
let
|
||||
endpoint = "https://inject.shelter.uwu.network/shelter+yt_ad_block+yt_embed_fix";
|
||||
in
|
||||
{
|
||||
SKIP_HOST_UPDATE = true;
|
||||
MINIMIZE_TO_TRAY = false;
|
||||
OPEN_ON_STARTUP = false;
|
||||
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
|
||||
enableHardwareAcceleration = true;
|
||||
UPDATE_ENDPOINT = endpoint;
|
||||
NEW_UPDATE_ENDPOINT = "${endpoint}/";
|
||||
BACKGROUND_COLOR = "#2c2d32";
|
||||
|
||||
/* Hide the Visual Refresh title bar */
|
||||
.visual-refresh {
|
||||
/* Hide the bar itself */
|
||||
--custom-app-top-bar-height: 0px !important;
|
||||
openasar = {
|
||||
setup = true;
|
||||
# using the performance preset breaks vaapi
|
||||
cmdPreset = "balanced";
|
||||
# quickstart is buggy and breaks discord sometimes.
|
||||
quickstart = false;
|
||||
# this css is made for discord compact mode. if you're not using that, stuff won't align!!
|
||||
css =
|
||||
# css
|
||||
''
|
||||
/* Hide nitro begging */
|
||||
@import url("https://raw.codeberg.page/AllPurposeMat/Disblock-Origin/DisblockOrigin.theme.css");
|
||||
|
||||
/* Title bar buttons are still visible so hide them too */
|
||||
div.base__5e434 > div.bar_c38106 {
|
||||
display: none;
|
||||
/* Hide the Visual Refresh title bar */
|
||||
.visual-refresh {
|
||||
/* Hide the bar itself */
|
||||
--custom-app-top-bar-height: 0px !important;
|
||||
|
||||
/* Title bar buttons are still visible so hide them too */
|
||||
div.base__5e434 > div.bar_c38106 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Bring the server list down a few pixels */
|
||||
ul[data-list-id="guildsnav"] > div.itemsContainer_ef3116 {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Bring the server list down a few pixels */
|
||||
ul[data-list-id="guildsnav"] > div.itemsContainer_ef3116 {
|
||||
margin-top: 8px;
|
||||
:root {
|
||||
/* Disblock settings */
|
||||
--display-clan-tags: none;
|
||||
--display-active-now: none;
|
||||
--display-hover-reaction-emoji: none;
|
||||
--bool-show-name-gradients: false;
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Disblock settings */
|
||||
--display-clan-tags: none;
|
||||
--display-active-now: none;
|
||||
--display-hover-reaction-emoji: none;
|
||||
--bool-show-name-gradients: false;
|
||||
}
|
||||
/* Make "Read All" vencord button text smaller */
|
||||
button.vc-ranb-button {
|
||||
font-size: 9.5pt;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Make "Read All" vencord button text smaller */
|
||||
button.vc-ranb-button {
|
||||
font-size: 9.5pt;
|
||||
font-weight: normal;
|
||||
}
|
||||
/* Hide Discover button */
|
||||
div[data-list-item-id="guildsnav___guild-discover-button"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide Discover button */
|
||||
div[data-list-item-id="guildsnav___guild-discover-button"] {
|
||||
display: none !important;
|
||||
}
|
||||
/* Hide voice settings menus in user panel */
|
||||
div[class^="micButtonParent__"] button[role="switch"] {
|
||||
border-radius: var(--radius-sm);
|
||||
& ~ button { display: none; }
|
||||
}
|
||||
/* Also reduce the gap between the buttons */
|
||||
div.container__37e49 > div.buttons__37e49 {
|
||||
gap: 1px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
/* Hide voice settings menus in user panel */
|
||||
div[class^="micButtonParent__"] button[role="switch"] {
|
||||
border-radius: var(--radius-sm);
|
||||
& ~ button { display: none; }
|
||||
}
|
||||
/* Also reduce the gap between the buttons */
|
||||
div.container__37e49 > div.buttons__37e49 {
|
||||
gap: 1px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
home.packages = with pkgs; [
|
||||
(discord.override {
|
||||
# we disable updates in settings.json
|
||||
disableUpdates = false;
|
||||
commandLineArgs = joinedArgs;
|
||||
withTTS = false;
|
||||
enableAutoscroll = true;
|
||||
withOpenASAR = true;
|
||||
})
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(discord.override {
|
||||
# we disable updates in settings.json
|
||||
disableUpdates = false;
|
||||
commandLineArgs = joinedArgs;
|
||||
withTTS = false;
|
||||
enableAutoscroll = true;
|
||||
withOpenASAR = true;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
(machine.program {
|
||||
name = "fun-packages";
|
||||
inherit inputs;
|
||||
requirements = [ "fun" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
custom.p1n3appl3.tab
|
||||
prismlauncher
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
custom.program.fun-packages = machine.program {
|
||||
requirements = [ "fun" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
custom.p1n3appl3.tab
|
||||
prismlauncher
|
||||
];
|
||||
};
|
||||
};
|
||||
(machine.program {
|
||||
name = "cli-packages";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# general cli tools
|
||||
sops
|
||||
fzf
|
||||
htop
|
||||
ncdu
|
||||
psmisc
|
||||
ripgrep
|
||||
rsync
|
||||
zoxide
|
||||
tmux
|
||||
direnv
|
||||
atuin
|
||||
rcon
|
||||
lix
|
||||
nix-output-monitor
|
||||
wget
|
||||
comma
|
||||
unzip
|
||||
pciutils
|
||||
difftastic
|
||||
|
||||
custom.program.cli-packages = machine.program {
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# general cli tools
|
||||
sops
|
||||
fzf
|
||||
htop
|
||||
ncdu
|
||||
psmisc
|
||||
ripgrep
|
||||
rsync
|
||||
zoxide
|
||||
tmux
|
||||
direnv
|
||||
atuin
|
||||
rcon
|
||||
lix
|
||||
nix-output-monitor
|
||||
wget
|
||||
comma
|
||||
unzip
|
||||
pciutils
|
||||
difftastic
|
||||
# dev tools
|
||||
gdb
|
||||
clang-tools
|
||||
rustup
|
||||
git
|
||||
python3
|
||||
unixtools.xxd
|
||||
net-tools
|
||||
sqlite-interactive
|
||||
tokei
|
||||
just
|
||||
uv
|
||||
llvmPackages.bintools
|
||||
|
||||
# dev tools
|
||||
gdb
|
||||
clang-tools
|
||||
rustup
|
||||
git
|
||||
python3
|
||||
unixtools.xxd
|
||||
net-tools
|
||||
sqlite-interactive
|
||||
tokei
|
||||
just
|
||||
uv
|
||||
llvmPackages.bintools
|
||||
(writeShellScriptBin "nas" ''
|
||||
mkdir -p ~/Documents/nas
|
||||
${sshfs}/bin/sshfs fili:/storage/storage/data/ ~/Documents/nas
|
||||
cd ~/Documents/nas
|
||||
'')
|
||||
];
|
||||
|
||||
(writeShellScriptBin "nas" ''
|
||||
mkdir -p ~/Documents/nas
|
||||
${sshfs}/bin/sshfs fili:/storage/storage/data/ ~/Documents/nas
|
||||
cd ~/Documents/nas
|
||||
'')
|
||||
];
|
||||
# Set up direnv
|
||||
programs.direnv = {
|
||||
package = pkgs.direnv;
|
||||
silent = false;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
package = pkgs.nix-direnv;
|
||||
};
|
||||
};
|
||||
|
||||
# Set up direnv
|
||||
programs.direnv = {
|
||||
package = pkgs.direnv;
|
||||
silent = false;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
package = pkgs.nix-direnv;
|
||||
home.file = {
|
||||
"${config.xdg.configHome}/sqlite3/sqliterc".source = pkgs.writeText ".sqliterc" ''
|
||||
.mode box
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
"${config.xdg.configHome}/sqlite3/sqliterc".source = pkgs.writeText ".sqliterc" ''
|
||||
.mode box
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.firefox = machine.program {
|
||||
imports = machine.program {
|
||||
name = "firefox";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.fish = machine.program {
|
||||
imports = machine.program {
|
||||
name = "fish";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{
|
||||
|
|
@ -227,6 +229,7 @@
|
|||
|
||||
function fish_greeting
|
||||
${pkgs.blahaj}/bin/blahaj -s
|
||||
echo "welcome to $(uname -n), $(whoami)!"
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.git = machine.program {
|
||||
imports = machine.program {
|
||||
name = "git";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config = _: {
|
||||
programs.git = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.jujutsu = machine.program {
|
||||
imports = machine.program {
|
||||
name = "jujutsu";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ config, pkgs, ... }:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ machine, pkgs, ... }:
|
||||
inputs@{ machine, pkgs, ... }:
|
||||
let
|
||||
kanata-config = ''
|
||||
(defcfg
|
||||
|
|
@ -86,7 +86,9 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
custom.program.kanata = machine.program {
|
||||
imports = machine.program {
|
||||
name = "kanata";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.kitty = machine.program {
|
||||
imports = machine.program {
|
||||
name = "kitty";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{ pkgs, flakes, ... }:
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.niri = machine.program {
|
||||
imports = machine.program {
|
||||
name = "niri";
|
||||
inherit inputs;
|
||||
requirements = [ "graphical" ];
|
||||
home-config =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
flakes,
|
||||
lib,
|
||||
...
|
||||
{ config
|
||||
, pkgs
|
||||
, flakes
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
noctalia =
|
||||
|
|
@ -241,7 +242,7 @@
|
|||
}
|
||||
|
||||
{
|
||||
matches = [ { app-id = "firefox"; } ];
|
||||
matches = [{ app-id = "firefox"; }];
|
||||
open-on-workspace = "browser";
|
||||
}
|
||||
|
||||
|
|
@ -599,7 +600,7 @@
|
|||
id = "Volume";
|
||||
}
|
||||
]
|
||||
++ [ { id = "Battery"; } ]
|
||||
++ [{ id = "Battery"; }]
|
||||
++ [
|
||||
{
|
||||
id = "KeyboardLayout";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.nvim = machine.program {
|
||||
imports = machine.program {
|
||||
name = "nvim";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.tmux = machine.program {
|
||||
imports = machine.program {
|
||||
name = "tmux";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
|
|
|
|||
159
programs/xdg.nix
Normal file
159
programs/xdg.nix
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
{ machine, ... }@inputs:
|
||||
let
|
||||
browsers = [
|
||||
"firefox.desktop"
|
||||
];
|
||||
|
||||
defaultApps = {
|
||||
text = [
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanvim.desktop"
|
||||
];
|
||||
image = [ "org.gnome.Loupe.desktop" ];
|
||||
audio = [ "mpv.desktop" ];
|
||||
video = [ "mpv.desktop" ];
|
||||
directory = [
|
||||
"nautilus.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
];
|
||||
mail = [ ] ++ browsers;
|
||||
calendar = [ ] ++ browsers;
|
||||
browser = [ ] ++ browsers;
|
||||
office = [ "libreoffice.desktop" ];
|
||||
pdf = [ ] ++ browsers;
|
||||
ebook = [ ];
|
||||
magnet = [ ];
|
||||
signal = [ "signal.desktop" ];
|
||||
};
|
||||
|
||||
mimeMap = {
|
||||
text = [
|
||||
"text/plain"
|
||||
"text/english"
|
||||
"application/x-zerosize"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
image = [
|
||||
"image/bmp"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/jpg"
|
||||
"image/png"
|
||||
"image/svg+xml"
|
||||
"image/tiff"
|
||||
"image/vnd.microsoft.icon"
|
||||
"image/webp"
|
||||
];
|
||||
audio = [
|
||||
"audio/aac"
|
||||
"audio/mpeg"
|
||||
"audio/ogg"
|
||||
"audio/opus"
|
||||
"audio/wav"
|
||||
"audio/webm"
|
||||
"audio/x-matroska"
|
||||
];
|
||||
video = [
|
||||
"video/mp2t"
|
||||
"video/mp4"
|
||||
"video/mpeg"
|
||||
"video/ogg"
|
||||
"video/webm"
|
||||
"video/x-flv"
|
||||
"video/x-matroska"
|
||||
"video/x-msvideo"
|
||||
];
|
||||
directory = [ "inode/directory" ];
|
||||
mail = [ "x-scheme-handler/mailto" ];
|
||||
calendar = [
|
||||
"text/calendar"
|
||||
"x-scheme-handler/webcal"
|
||||
];
|
||||
browser = [
|
||||
"text/html"
|
||||
"x-scheme-handler/about"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/unknown"
|
||||
];
|
||||
office = [
|
||||
"application/vnd.oasis.opendocument.text"
|
||||
"application/vnd.oasis.opendocument.spreadsheet"
|
||||
"application/vnd.oasis.opendocument.presentation"
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
"application/msword"
|
||||
"application/vnd.ms-excel"
|
||||
"application/vnd.ms-powerpoint"
|
||||
"application/rtf"
|
||||
];
|
||||
pdf = [ "application/pdf" ];
|
||||
ebook = [ "application/epub+zip" ];
|
||||
magnet = [ "x-scheme-handler/magnet" ];
|
||||
signal = [ "signal.desktop" ];
|
||||
};
|
||||
|
||||
associations =
|
||||
with inputs.lib;
|
||||
with builtins;
|
||||
listToAttrs (
|
||||
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
|
||||
);
|
||||
removedAssociations = {
|
||||
"text/plain" = "dev.zed.Zed.desktop";
|
||||
"application/x-zerosize" = "dev.zed.Zed.desktop";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = machine.program {
|
||||
name = "xdg";
|
||||
inherit inputs;
|
||||
requirements = [ ];
|
||||
home-config =
|
||||
{ config, ... }:
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
desktop = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
music = "${config.home.homeDirectory}/Documents/personal/music";
|
||||
pictures = "${config.home.homeDirectory}/Documents/personal/pictures";
|
||||
};
|
||||
configFile."mimeapps.list".force = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
associations.added = associations;
|
||||
associations.removed = removedAssociations;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
};
|
||||
};
|
||||
system-config = _: {
|
||||
xdg = {
|
||||
mime = {
|
||||
enable = true;
|
||||
defaultApplications = associations;
|
||||
addedAssociations = associations;
|
||||
inherit removedAssociations;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
{ machine, ... }:
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
custom.program.zed = machine.program {
|
||||
imports = machine.program {
|
||||
name = "zed";
|
||||
inherit inputs;
|
||||
requirements = [
|
||||
"work"
|
||||
"graphical"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue