current state of things
This commit is contained in:
parent
63fbd6d499
commit
b8d157ab6f
85 changed files with 895 additions and 6014 deletions
|
@ -1,36 +1,15 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
mainUser,
|
||||
...
|
||||
}:
|
||||
{
|
||||
inherit mainUser;
|
||||
|
||||
imports = [
|
||||
./home.nix
|
||||
# ./util/local-webapp.nix
|
||||
# ./util/containers.nix
|
||||
# ./programs/stable-diffusion.nix
|
||||
inputs.comfyui.homeManagerModules.comfyui
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nicotine-plus
|
||||
];
|
||||
|
||||
programs.comfyui = {
|
||||
enable = false;
|
||||
storage = "/home/${config.mainUser}/.local/share/comfyui/";
|
||||
plugins =
|
||||
let
|
||||
inherit (pkgs.comfyui-plugins) gguf openpose;
|
||||
in
|
||||
[
|
||||
gguf
|
||||
# essentials
|
||||
openpose
|
||||
];
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs) nicotine-plus;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
./util/ez.nix
|
||||
./util/name.nix
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
inputs.ironbar.homeManagerModules.default
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
|
@ -52,8 +51,14 @@
|
|||
home.packages =
|
||||
let
|
||||
inherit (rice) icons fonts cursor;
|
||||
inherit (pkgs) tauon;
|
||||
in
|
||||
fonts.pkgs ++ icons.pkgs ++ [ cursor.package ];
|
||||
fonts.pkgs
|
||||
++ icons.pkgs
|
||||
++ [
|
||||
cursor.package
|
||||
tauon
|
||||
];
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
|
@ -90,7 +95,7 @@
|
|||
# programs.nix-index.enable = true;
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
# ezServices = {
|
||||
# ckb-next = "${getExe pkgs.ckb-next} -c -b";
|
||||
# };
|
||||
ezServices = {
|
||||
ckb-next = "${lib.getExe pkgs.ckb-next} -c -b";
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 103 KiB |
|
@ -5,16 +5,18 @@
|
|||
# ../programs/zsh.nix
|
||||
# ../programs/xresources.nix
|
||||
../programs/helix.nix
|
||||
../programs/atuin.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
bat
|
||||
ripgrep
|
||||
fd
|
||||
lazygit
|
||||
zoxide
|
||||
zellij
|
||||
ouch
|
||||
# ../programs/atuin.nix
|
||||
];
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
btop
|
||||
bat
|
||||
ripgrep
|
||||
fd
|
||||
lazygit
|
||||
zoxide
|
||||
zellij
|
||||
ouch
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) range mapAttrsToList;
|
||||
inherit (builtins) toString;
|
||||
workspaceRange = range 1 6;
|
||||
makeWorkspaceBinding =
|
||||
modifiers: action:
|
||||
map (i: {
|
||||
inherit modifiers;
|
||||
key = toString i;
|
||||
action = {
|
||||
type = action;
|
||||
data = i;
|
||||
};
|
||||
}) workspaceRange;
|
||||
focusWsBindings = makeWorkspaceBinding [ "Super" ] "Workspace";
|
||||
moveWsBindings = makeWorkspaceBinding [ "Super" "Shift" ] "SendToWorkspace";
|
||||
|
||||
hjkl = {
|
||||
"h" = "Left";
|
||||
"j" = "Down";
|
||||
"k" = "Up";
|
||||
"l" = "Right";
|
||||
# "i" = "In";
|
||||
# "u" = "Out";
|
||||
};
|
||||
makeDirBinding =
|
||||
modifiers: action:
|
||||
mapAttrsToList (key: dir: {
|
||||
inherit key modifiers;
|
||||
action = {
|
||||
type = action;
|
||||
data = dir;
|
||||
};
|
||||
}) hjkl;
|
||||
focusBindings = makeDirBinding [ "Super" ] "Focus";
|
||||
moveBindings = makeDirBinding [ "Super" "Shift" ] "Move";
|
||||
winManagementBindings = focusWsBindings ++ moveWsBindings ++ focusBindings ++ moveBindings;
|
||||
binding = key: modifiers: action: {
|
||||
inherit key modifiers action;
|
||||
};
|
||||
spawnBinding = key: modifiers: app: {
|
||||
inherit key modifiers;
|
||||
action = {
|
||||
type = "Spawn";
|
||||
data = app;
|
||||
};
|
||||
};
|
||||
systemBinding = key: modifiers: action: {
|
||||
inherit key modifiers;
|
||||
action = {
|
||||
type = "System";
|
||||
data = action;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../util/cosmic.nix
|
||||
];
|
||||
config.cosmic = {
|
||||
enable = true;
|
||||
defaultKeybindings = false;
|
||||
keybindings = winManagementBindings ++ [
|
||||
# System bindings appear broken?
|
||||
(binding "q" [ "Super" "Shift" ] "Close")
|
||||
(binding "w" [ "Super" ] "ToggleStacking")
|
||||
(binding "s" [ "Super" ] "ToggleOrientation")
|
||||
(binding "space" [ "Super" ] "ToggleWindowFloating")
|
||||
(binding "space" [ "Super" "Shift" ] "Maximize")
|
||||
(binding "minus" [ "Super" ] "Minimize")
|
||||
(binding "r" [ "Super" ] {
|
||||
type = "Resizing";
|
||||
data = "Outwards";
|
||||
})
|
||||
(binding "r" [ "Super" "Shift" ] {
|
||||
type = "Resizing";
|
||||
data = "Inwards";
|
||||
})
|
||||
(binding "tab" [ "Super" ] "NextOutput")
|
||||
(binding "tab" [ "Super" "Shift" ] "MoveToNextOutput")
|
||||
(binding "grave" [ "Super" ] "PreviousOutput")
|
||||
(binding "grave" [ "Super" "Shift" ] "MoveToPreviousOutput")
|
||||
(spawnBinding "equal" [ "Super" ] "keepassxc")
|
||||
(systemBinding "f" [ "Super" ] "WebBrowser")
|
||||
# my mime handling is fucked
|
||||
# (systemBinding "e" ["Super"] "HomeFolder")
|
||||
# (systemBinding "return" ["Super"] "Terminal")
|
||||
(spawnBinding "return" [ "Super" ] "kitty")
|
||||
# (systemBinding "s" ["Super" "Shift"] "Screenshot")
|
||||
(systemBinding null [ "Super" ] "Launcher")
|
||||
(systemBinding "d" [ "Super" ] "AppLibrary")
|
||||
(systemBinding "XF86AudioRaiseVolume" [ ] "VolumeRaise")
|
||||
(systemBinding "XF86AudioLowerVolume" [ ] "VolumeLower")
|
||||
(systemBinding "XF86AudioMute" [ ] "Mute")
|
||||
(spawnBinding "XF86AudioNext" [ ] "playerctl next")
|
||||
(spawnBinding "XF86AudioPrev" [ ] "playerctl previous")
|
||||
(spawnBinding "XF86AudioPlay" [ ] "playerctl play-pause")
|
||||
(spawnBinding "XF86AudioStop" [ ] "playerctl stop")
|
||||
(systemBinding "XF86MonBrightnessUp" [ ] "BrightnessUp")
|
||||
(systemBinding "XF86MonBrightnessDown" [ ] "BrightnessDown")
|
||||
(spawnBinding "e" [ "Super" "Shift" ] "wlogout")
|
||||
|
||||
# old, pre-System bindings
|
||||
# (binding "q" ["Super" "Shift"] "Close")
|
||||
# (binding "w" ["Super"] "ToggleStacking")
|
||||
# (binding "s" ["Super"] "ToggleOrientation")
|
||||
# (binding "space" ["Super"] "ToggleWindowFloating")
|
||||
# (binding "space" ["Super" "Shift"] "Maximize")
|
||||
# (binding "minus" ["Super"] "Minimize")
|
||||
# (binding "r" ["Super"] {
|
||||
# type = "Resizing";
|
||||
# data = "Outwards";
|
||||
# })
|
||||
# (binding "r" ["Super" "Shift"] {
|
||||
# type = "Resizing";
|
||||
# data = "Inwards";
|
||||
# })
|
||||
# (binding "tab" ["Super"] "NextOutput")
|
||||
# (binding "tab" ["Super" "Shift"] "MoveToNextOutput")
|
||||
# (binding "grave" ["Super"] "PreviousOutput")
|
||||
# (binding "grave" ["Super" "Shift"] "MoveToPreviousOutput")
|
||||
# (spawnBinding "f" ["Super"] "firefox")
|
||||
(spawnBinding "e" [ "Super" ] "nautilus")
|
||||
# (spawnBinding "equal" ["Super"] "keepassxc")
|
||||
# (spawnBinding "return" ["Super"] "kitty")
|
||||
(spawnBinding "s" [ "Super" "Shift" ] "cosmic-screenshot")
|
||||
# (spawnBinding null ["Super"] "cosmic-launcher")
|
||||
# (spawnBinding "d" ["Super"] "cosmic-app-library")
|
||||
# (spawnBinding "XF86AudioRaiseVolume" [] "amixer sset Master 5%+")
|
||||
# (spawnBinding "XF86AudioLowerVolume" [] "amixer sset Master 5%-")
|
||||
# (spawnBinding "XF86AudioMute" [] "amixer sset Master toggle")
|
||||
# (spawnBinding "XF86AudioNext" [] "playerctl next")
|
||||
# (spawnBinding "XF86AudioPrev" [] "playerctl previous")
|
||||
# (spawnBinding "XF86AudioPlay" [] "playerctl play-pause")
|
||||
# (spawnBinding "XF86AudioStop" [] "playerctl stop")
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessUp" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon IncreaseDisplayBrightness"
|
||||
# )
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessDown" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon DecreaseDisplayBrightness"
|
||||
# )
|
||||
# (spawnBinding "e" ["Super" "Shift"] "wlogout")
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./cosmic.nix
|
||||
./media-players.nix
|
||||
./webapps.nix
|
||||
./documents.nix
|
||||
|
@ -10,10 +9,12 @@
|
|||
../programs/firefox.nix
|
||||
../programs/wlogout.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
file-roller
|
||||
nautilus
|
||||
thunderbird
|
||||
keepassxc
|
||||
];
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
file-roller
|
||||
nautilus
|
||||
thunderbird
|
||||
keepassxc
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@ let
|
|||
get = builtins.attrValues;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../programs/vscode.nix
|
||||
];
|
||||
# imports = [
|
||||
# ../programs/vscode.nix
|
||||
# ];
|
||||
|
||||
home.packages = get {
|
||||
inherit (pkgs)
|
||||
|
@ -66,7 +66,7 @@ in
|
|||
programs.git = {
|
||||
enable = true;
|
||||
userName = "atagen";
|
||||
userEmail = "atagen@boss.co";
|
||||
userEmail = "boss@atagen.co";
|
||||
extraConfig = {
|
||||
credential.helper = "keepassxc";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
libreoffice
|
||||
home.packages = [
|
||||
pkgs.libreoffice
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) rice;
|
||||
palette = pkgs.lib.nix-rice.palette.toRGBShortHex rice.palette;
|
||||
in
|
||||
{
|
||||
programs.hyprlock = {
|
||||
# enable = true;
|
||||
};
|
||||
|
||||
services.hypridle = {
|
||||
# enable = true;
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
# enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.x86_64-linux.hyprland;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
general =
|
||||
let
|
||||
inherit (rice.borders) thickness;
|
||||
inherit (palette) normal;
|
||||
in
|
||||
{
|
||||
inherit (rice.borders) gaps_in gaps_out;
|
||||
border_size = thickness;
|
||||
layout = "dwindle";
|
||||
"col.inactive_border" = "rgb(${normal.black})";
|
||||
"col.active_border" = "rgb(${normal.yellow})";
|
||||
"col.nogroup_border" = "rgb(${normal.black})";
|
||||
"col.nogroup_border_active" = "rgb(${normal.yellow})";
|
||||
snap.enabled = true;
|
||||
};
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
};
|
||||
decoration = {
|
||||
inherit (rice.borders) rounding;
|
||||
blur.enabled = false;
|
||||
shadow.enabled = false;
|
||||
};
|
||||
# input.numlock_by_default = true;
|
||||
# groups = let
|
||||
# inherit (palette) normal;
|
||||
# in {
|
||||
# "col.border_active" = "rgb(${normal.red})";
|
||||
# "col.border_inactive" = "rgb(${normal.black})";
|
||||
# "col.border_locked_active" = "rgb(${normal.red})";
|
||||
# "col.border_locked_inactive" = "rgb(${normal.black})";
|
||||
# };
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
vrr = 0;
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
background_color = "rgb(${palette.normal.black})";
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
force_split = 2;
|
||||
preserve_split = true;
|
||||
};
|
||||
monitor = [
|
||||
"DP-1, 2560x1440@165, 1080x0, 1"
|
||||
"HDMI-A-2, 1920x1080@60, auto-left, 1"
|
||||
"Unknown-1, disable"
|
||||
];
|
||||
bind =
|
||||
let
|
||||
makeDirBind =
|
||||
bind: extraMods:
|
||||
lib.mapAttrsToList (key: dir: "$mainMod${extraMods}, ${key}, ${bind}, ${dir}") {
|
||||
h = "l";
|
||||
j = "d";
|
||||
k = "u";
|
||||
l = "r";
|
||||
};
|
||||
in
|
||||
[
|
||||
"$mainMod, Return, exec, ${lib.getExe pkgs.kitty}"
|
||||
]
|
||||
++ makeDirBind "movefocus" ""
|
||||
++ makeDirBind "movewindow" "+SHIFT";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
mpv
|
||||
imv
|
||||
strawberry
|
||||
resonance
|
||||
zathura
|
||||
playerctl
|
||||
];
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
mpv
|
||||
imv
|
||||
strawberry
|
||||
resonance
|
||||
zathura
|
||||
playerctl
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,23 +4,22 @@
|
|||
config,
|
||||
nix-rice,
|
||||
rice,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
services =
|
||||
let
|
||||
inherit (pkgs) swaynotificationcenter sway-audio-idle-inhibit;
|
||||
inherit (pkgs) swaynotificationcenter;
|
||||
in
|
||||
[
|
||||
swaynotificationcenter
|
||||
sway-audio-idle-inhibit
|
||||
];
|
||||
errata =
|
||||
let
|
||||
inherit (pkgs) sirula avizo playerctl;
|
||||
inherit (pkgs) avizo playerctl;
|
||||
in
|
||||
[
|
||||
sirula
|
||||
avizo
|
||||
playerctl
|
||||
];
|
||||
|
@ -30,9 +29,10 @@ let
|
|||
swayidle
|
||||
swaybg
|
||||
systemd
|
||||
niri-unstable
|
||||
avizo
|
||||
;
|
||||
|
||||
inherit (inputs.niri.packages.x86_64-linux) niri-unstable;
|
||||
in
|
||||
[
|
||||
{
|
||||
|
@ -104,7 +104,13 @@ in
|
|||
);
|
||||
in
|
||||
{
|
||||
"Mod+D".action.spawn = "sirula";
|
||||
"Mod+D".action.spawn = [
|
||||
"qs"
|
||||
"ipc"
|
||||
"call"
|
||||
"launch"
|
||||
"toggle"
|
||||
];
|
||||
"Mod+F".action.spawn = "firefox";
|
||||
"Mod+E".action.spawn = "nautilus";
|
||||
"Mod+Return".action.spawn = "kitty";
|
||||
|
@ -185,7 +191,7 @@ in
|
|||
];
|
||||
focus-ring =
|
||||
let
|
||||
pal = nix-rice.palette.toRgbHex rice.palette;
|
||||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
active = {
|
||||
|
@ -198,75 +204,64 @@ in
|
|||
};
|
||||
prefer-no-csd = true;
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
};
|
||||
|
||||
programs.ironbar = {
|
||||
enable = true;
|
||||
systemd = true;
|
||||
config = {
|
||||
monitors."DP-1" = {
|
||||
position = "top";
|
||||
height = 16;
|
||||
start = [
|
||||
window-rules =
|
||||
let
|
||||
v = 10.0;
|
||||
in
|
||||
[
|
||||
{
|
||||
type = "music";
|
||||
player_type = "mpris";
|
||||
geometry-corner-radius = {
|
||||
bottom-left = v;
|
||||
bottom-right = 0.0;
|
||||
top-left = 0.0;
|
||||
top-right = v;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
type = "focused";
|
||||
icon_size = 16;
|
||||
truncate = "middle";
|
||||
}
|
||||
];
|
||||
end = [
|
||||
{ type = "clock"; }
|
||||
{ type = "tray"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.ironbar = {
|
||||
# programs.ironbar = {
|
||||
# enable = true;
|
||||
# systemd = true;
|
||||
# config = {
|
||||
# monitors."DP-1" = {
|
||||
# position = "top";
|
||||
# height = 16;
|
||||
# start = [
|
||||
# {
|
||||
# type = "music";
|
||||
# player_type = "mpris";
|
||||
# }
|
||||
# ];
|
||||
# center = [
|
||||
# {
|
||||
# type = "focused";
|
||||
# icon_size = 16;
|
||||
# truncate = "middle";
|
||||
# }
|
||||
# ];
|
||||
# end = [
|
||||
# { type = "clock"; }
|
||||
# { type = "tray"; }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
systemd.user.services.quickshell = {
|
||||
Unit.PartOf = [ "graphical-session.target" ];
|
||||
Unit.After = [
|
||||
"graphical-session.target"
|
||||
"niri.service"
|
||||
];
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
|
||||
withHyprland = false;
|
||||
withI3 = false;
|
||||
}) "qs"}";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"sirula/config.toml".text = ''
|
||||
exclusive = false
|
||||
icon_size = 24
|
||||
lines = 2
|
||||
anchor_left = false
|
||||
anchor_right = true
|
||||
anchor_bottom = false
|
||||
anchor_top = false
|
||||
width = 320
|
||||
height = 720
|
||||
command_prefix = ":"
|
||||
frequent_first = true
|
||||
recent_first = true
|
||||
term_command = "kitty {}"
|
||||
'';
|
||||
|
||||
"sirula/style.css".text =
|
||||
let
|
||||
pal = nix-rice.palette.toRgbHex rice.palette;
|
||||
in
|
||||
''
|
||||
#root-box {
|
||||
background-color: ${pal.normal.black};
|
||||
color: ${pal.normal.yellow};
|
||||
font-family: '${rice.fonts.sans.name}';
|
||||
}
|
||||
/* what's the name of the highlighted search text?
|
||||
color: ${pal.normal.white};
|
||||
*/
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 3021;
|
||||
in
|
||||
{
|
||||
imports = [ ./ollama.nix ];
|
||||
|
||||
localWebApps = {
|
||||
anything-llm = {
|
||||
name = "Anything LLM";
|
||||
genericName = "Chatbot";
|
||||
icon = ../icons/anythingllm.png;
|
||||
inherit port;
|
||||
requires.containers = [
|
||||
"anything-llm"
|
||||
"ollama"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.podman.containers.anything-llm =
|
||||
let
|
||||
str = builtins.toString;
|
||||
username = config.mainUser;
|
||||
in
|
||||
{
|
||||
image = "docker.io/mintplexlabs/anythingllm";
|
||||
devices = [ "nvidia.com/gpu=all" ];
|
||||
ports = [ "${str port}:3001" ];
|
||||
autoStart = false;
|
||||
autoUpdate = "registry";
|
||||
network = [ "ollama" ];
|
||||
volumes =
|
||||
let
|
||||
home = "/home/${username}";
|
||||
share = "${home}/.local/share/anything-llm";
|
||||
in
|
||||
[
|
||||
"${share}:/app/server/storage"
|
||||
"${share}/.env:/app/server/.env"
|
||||
"${share}/config:/home/anythingllm/.config/anythingllm-desktop"
|
||||
"${share}/config:/home/${username}/.config/anythingllm-desktop"
|
||||
];
|
||||
environment = {
|
||||
STORAGE_DIR = "/app/server/storage";
|
||||
LLM_PROVIDER = "ollama";
|
||||
OLLAMA_BASE_PATH = "http://ollama:11434";
|
||||
EMBEDDING_ENGINE = "ollama";
|
||||
EMBEDDING_BASE_PATH = "http://ollama:11434";
|
||||
VECTOR_DB = "lancedb";
|
||||
WHISPER_PROVIDER = "local";
|
||||
TTS_PROVIDER = "native";
|
||||
};
|
||||
extraConfig.Unit.Requires = [ "podman-ollama.service" ];
|
||||
extraPodmanArgs = [
|
||||
"--health-cmd"
|
||||
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/3001'")
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
_: {
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
inline_height = 20;
|
||||
show_preview = true;
|
||||
show_help = false;
|
||||
enter_accept = false;
|
||||
keymap_mode = "vim-normal";
|
||||
style = "compact";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,347 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
|
||||
in
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
themes = with palette-hex; {
|
||||
nix-rice = {
|
||||
"attribute" = bright.cyan;
|
||||
"keyword" = {
|
||||
fg = normal.red;
|
||||
};
|
||||
"keyword.directive" = normal.red;
|
||||
"namespace" = bright.cyan;
|
||||
"punctuation" = bright.yellow;
|
||||
"punctuation.delimiter" = bright.yellow;
|
||||
"operator" = bright.magenta;
|
||||
"special" = normal.magenta;
|
||||
"variable.other.member" = bright.blue;
|
||||
"variable" = util.fg;
|
||||
"variable.builtin" = bright.yellow;
|
||||
"variable.parameter" = bright.white;
|
||||
"type" = normal.yellow;
|
||||
"type.builtin" = normal.yellow;
|
||||
"constructor" = {
|
||||
fg = bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function" = {
|
||||
fg = normal.green;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function.macro" = bright.cyan;
|
||||
"function.builtin" = normal.yellow;
|
||||
"tag" = normal.red;
|
||||
"comment" = {
|
||||
fg = normal.magenta;
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"constant" = {
|
||||
fg = bright.magenta;
|
||||
};
|
||||
"constant.builtin" = {
|
||||
fg = bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"string" = normal.green;
|
||||
"constant.numeric" = bright.magenta;
|
||||
"constant.character.escape" = {
|
||||
fg = bright.white;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"label" = bright.cyan;
|
||||
"module" = bright.cyan;
|
||||
"diff.plus" = bright.green;
|
||||
"diff.delta" = bright.yellow;
|
||||
"diff.minus" = bright.red;
|
||||
"warning" = bright.yellow;
|
||||
"error" = bright.red;
|
||||
"info" = bright.cyan;
|
||||
"hint" = bright.blue;
|
||||
"ui.background" = {
|
||||
inherit (util) bg;
|
||||
};
|
||||
"ui.linenr" = {
|
||||
fg = normal.cyan;
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = normal.yellow;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.cursorline" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.statusline" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
inherit (util) fg;
|
||||
bg = normal.blue;
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.yellow;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = normal.white;
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.popup" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.window" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.help" = {
|
||||
bg = normal.black;
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.text" = {
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.text.focus" = {
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.selection" = {
|
||||
# modifiers = ["reversed"];
|
||||
bg = bright.yellow;
|
||||
};
|
||||
"ui.selection.primary" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
# "ui.selection.primary" = { bg = bright.cyan; };
|
||||
"ui.cursor.primary" = {
|
||||
bg = normal.white;
|
||||
fg = normal.black;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
bg = bright.cyan;
|
||||
};
|
||||
"ui.menu" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = bright.black;
|
||||
bg = bright.blue;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.virtual.whitespace" = bright.black;
|
||||
"ui.virtual.ruler" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = normal.magenta;
|
||||
};
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
color = bright.yellow;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
color = bright.red;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
color = bright.cyan;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
color = bright.blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"markup.heading" = bright.cyan;
|
||||
"markup.bold" = {
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"markup.italic" = {
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"markup.strikethrough" = {
|
||||
modifiers = [ "crossed_out" ];
|
||||
};
|
||||
"markup.link.url" = {
|
||||
fg = bright.green;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"markup.link.text" = bright.red;
|
||||
"markup.raw" = bright.red;
|
||||
};
|
||||
};
|
||||
|
||||
# theme = "nix-rice"
|
||||
|
||||
# [editor]
|
||||
# bufferline = "multiple"
|
||||
# cursorline = true
|
||||
# true-color = true
|
||||
|
||||
# [editor.cursor-shape]
|
||||
# insert = "bar"
|
||||
# normal = "block"
|
||||
# select = "underline"
|
||||
|
||||
# [editor.lsp]
|
||||
# display-messages = true
|
||||
|
||||
# [editor.statusline]
|
||||
# left = ["mode", "spinner", "version-control", "file-name", "file-modification-indicator"]
|
||||
|
||||
settings = {
|
||||
theme = "nix-rice";
|
||||
editor = {
|
||||
bufferline = "multiple";
|
||||
cursorline = true;
|
||||
true-color = true;
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
statusline.left = [
|
||||
"mode"
|
||||
"spinner"
|
||||
"version-control"
|
||||
"file-name"
|
||||
"file-modification-indicator"
|
||||
];
|
||||
lsp.display-messages = true;
|
||||
keys =
|
||||
let
|
||||
extend = {
|
||||
"A-x" = "extend_to_line_bounds";
|
||||
"X" = [
|
||||
"extend_line_up"
|
||||
"extend_to_line_bounds"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
normal = extend;
|
||||
select = extend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "rust";
|
||||
language-servers = [
|
||||
"rust-analyzer"
|
||||
"lsp-ai"
|
||||
];
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
language-servers = [
|
||||
"nixd"
|
||||
"lsp-ai"
|
||||
];
|
||||
file-types = [ "nix" ];
|
||||
# auto-format = true;
|
||||
formatter = {
|
||||
command = "alejandra";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "ocaml";
|
||||
language-servers = [
|
||||
"ocamllsp"
|
||||
"lsp-ai"
|
||||
];
|
||||
file-types = [
|
||||
"ml"
|
||||
"mli"
|
||||
];
|
||||
auto-format = true;
|
||||
formatter = {
|
||||
command = "ocamlformat";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
language-server = {
|
||||
nixd = {
|
||||
command = "nixd";
|
||||
};
|
||||
|
||||
lsp-ai = {
|
||||
command = "lsp-ai";
|
||||
config = {
|
||||
memory.fileStore = { };
|
||||
models = {
|
||||
llama32 = {
|
||||
type = "ollama";
|
||||
model = "llama3.2";
|
||||
};
|
||||
starcoder2 = {
|
||||
type = "ollama";
|
||||
model = "starcoder2:7b";
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
model = "starcoder2";
|
||||
parameters = {
|
||||
maxContext = 1024;
|
||||
options = {
|
||||
numPredict = 32;
|
||||
};
|
||||
postProcess = {
|
||||
removeDuplicateStart = true;
|
||||
removeDuplicateEnd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
chat = {
|
||||
trigger = "!C";
|
||||
action_display_name = "Chat";
|
||||
model = "llama32";
|
||||
parameters = {
|
||||
max_context = 4096;
|
||||
max_tokens = 1024;
|
||||
system = "You are a code assistant chatbot. The user will ask you for assistance coding and you will do your best to answer succinctly and accurately.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rust-analyzer = {
|
||||
config = {
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
procMacro = {
|
||||
enable = true;
|
||||
};
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
}; # language-server
|
||||
}; # languages
|
||||
}; # helix config
|
||||
}
|
|
@ -1,15 +1,17 @@
|
|||
{
|
||||
nix-rice,
|
||||
inputs,
|
||||
pkgs,
|
||||
rice,
|
||||
...
|
||||
}:
|
||||
let
|
||||
palette-hex = nix-rice.palette.toRgbHex rice.palette;
|
||||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
themes = with palette-hex; {
|
||||
package = inputs.helix.packages.${pkgs.system}.helix;
|
||||
themes = with pal; {
|
||||
nix-rice = {
|
||||
"attribute" = bright.cyan;
|
||||
"keyword" = {
|
||||
|
@ -208,15 +210,6 @@ in
|
|||
"file-modification-indicator"
|
||||
];
|
||||
lsp.display-messages = true;
|
||||
# keys = let
|
||||
# extend = {
|
||||
# "A-x" = "extend_to_line_bounds";
|
||||
# "X" = ["extend_line_up" "extend_to_line_bounds"];
|
||||
# };
|
||||
# in {
|
||||
# normal = extend;
|
||||
# select = extend;
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -238,23 +231,20 @@ in
|
|||
];
|
||||
|
||||
language-server = {
|
||||
qmlls = {
|
||||
command = "qmlls";
|
||||
args = [ "-E" ];
|
||||
};
|
||||
|
||||
nil = {
|
||||
command = "nil";
|
||||
};
|
||||
|
||||
rust-analyzer = {
|
||||
config = {
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
procMacro = {
|
||||
enable = true;
|
||||
};
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
cargo.buildScripts.enable = true;
|
||||
procMacro.enable = true;
|
||||
check.command = "clippy";
|
||||
};
|
||||
};
|
||||
}; # language-server
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
nix-rice,
|
||||
rice,
|
||||
...
|
||||
}:
|
||||
let
|
||||
palette-hex = nix-rice.palette.toRgbHex rice.palette;
|
||||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
|
@ -12,7 +11,7 @@ in
|
|||
font = {
|
||||
inherit (rice.fonts.monospace) name size;
|
||||
};
|
||||
settings = with palette-hex; {
|
||||
settings = with pal; {
|
||||
foreground = util.fg;
|
||||
background = util.bg;
|
||||
inherit (util) cursor;
|
||||
|
@ -37,6 +36,7 @@ in
|
|||
color15 = bright.white;
|
||||
sync_to_monitor = "yes";
|
||||
shell = "fish";
|
||||
cursor_trail = 100;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.desktopEntries.ollama = {
|
||||
name = "Ollama";
|
||||
type = "Application";
|
||||
icon = ../icons/ollama.png;
|
||||
exec =
|
||||
let
|
||||
inherit (lib) getExe getExe';
|
||||
notify-send = "${getExe' pkgs.libnotify "notify-send"} -a \"Ollama\"";
|
||||
systemctl = "${getExe' pkgs.systemd "systemctl"}";
|
||||
podman = "${getExe pkgs.podman}";
|
||||
in
|
||||
"${pkgs.writeShellScript "ollama" ''
|
||||
set -euo pipefail
|
||||
|
||||
exit_error() {
|
||||
${notify-send} -w "Failure" $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
container_checks() {
|
||||
if [ "$(${podman} inspect -f {{.State.Health.Status}} ollama)" == "healthy" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
${notify-send} "Launching Ollama.." "Please be patient."
|
||||
|
||||
${systemctl} --user start podman-ollama
|
||||
checks=0
|
||||
until container_checks; do
|
||||
sleep 2
|
||||
checks=$((checks+1))
|
||||
if [ $((checks%10)) -eq 0 ]; then
|
||||
${notify-send} "Launching.."
|
||||
fi
|
||||
if [ $checks -ge 60 ]; then
|
||||
${systemctl} --no-block --user stop podman-ollama.target
|
||||
exit_error "Failed to launch!"
|
||||
fi
|
||||
done
|
||||
|
||||
${notify-send} "Ollama serving on port 11434."
|
||||
''}";
|
||||
};
|
||||
|
||||
services.podman = {
|
||||
containers.ollama =
|
||||
let
|
||||
username = config.mainUser;
|
||||
in
|
||||
{
|
||||
image = "docker.io/ollama/ollama:latest";
|
||||
devices = [ "nvidia.com/gpu=all" ];
|
||||
autoStart = false;
|
||||
autoUpdate = "registry";
|
||||
network = [ "ollama" ];
|
||||
ports = [ "11434:11434" ];
|
||||
volumes = [
|
||||
"/home/${username}/.local/share/ollama:/models"
|
||||
];
|
||||
environment.OLLAMA_MODELS = "/models";
|
||||
extraPodmanArgs = [
|
||||
"--health-cmd"
|
||||
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/11434'")
|
||||
];
|
||||
};
|
||||
|
||||
networks.ollama = {
|
||||
subnet = "192.168.10.0/24";
|
||||
gateway = "192.168.10.1";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 3021;
|
||||
in
|
||||
{
|
||||
imports = [ ./ollama.nix ];
|
||||
|
||||
localWebApps = {
|
||||
openwebui = {
|
||||
name = "OpenWebUI";
|
||||
genericName = "LLM";
|
||||
icon = ../icons/openwebui.png;
|
||||
inherit port;
|
||||
requires.containers = [
|
||||
"openwebui"
|
||||
"ollama"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.podman = {
|
||||
containers.openwebui =
|
||||
let
|
||||
str = builtins.toString;
|
||||
in
|
||||
{
|
||||
# serviceName = "openwebui";
|
||||
image = "ghcr.io/open-webui/open-webui:main";
|
||||
ports = [ "${str port}:${str port}" ];
|
||||
environment = {
|
||||
WEBUI_AUTH = "False";
|
||||
PORT = "${str port}";
|
||||
};
|
||||
autoStart = false;
|
||||
networks = [ "ollama" ];
|
||||
unitConfig = {
|
||||
Requires = [ "podman-ollama.service" ];
|
||||
};
|
||||
extraOptions = [
|
||||
"--health-cmd"
|
||||
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/${str port}'")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
localWebApps = {
|
||||
stable-diffusion = {
|
||||
name = "Stable Diffusion";
|
||||
genericName = "Image Generator";
|
||||
icon = ../icons/comfyui.png;
|
||||
id = 5;
|
||||
port = 7860;
|
||||
requires = [ "stable-diffusion" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
{ rice, inputs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
mutableExtensionsDir = false;
|
||||
profiles.default = {
|
||||
extensions = with inputs.nix-vscode.extensions.x86_64-linux.vscode-marketplace; [
|
||||
rust-lang.rust-analyzer
|
||||
ocamllabs.ocaml-platform
|
||||
jnoortheen.nix-ide
|
||||
mkhl.direnv
|
||||
barbosshack.crates-io
|
||||
vadimcn.vscode-lldb
|
||||
kend.dancehelixkey
|
||||
hikionori.kanagawa-vscode-theme
|
||||
dbaeumer.vscode-eslint
|
||||
ms-vscode.extension-test-runner
|
||||
];
|
||||
userSettings = {
|
||||
"window.titleBarStyle" = "custom";
|
||||
"editor.fontFamily" = "${rice.fonts.monospace.name}";
|
||||
"editor.fontSize" = 12;
|
||||
"editor.formatOnSave" = true;
|
||||
"workbench.colorTheme" = "KanagawaTheme";
|
||||
"rust-analyzer.debug.engine" = "vadimcn.vscode-lldb";
|
||||
"rust-analyzer.inlayHints.chainingHints.enable" = false;
|
||||
"rust-analyzer.inlayHints.parameterHints.enable" = false;
|
||||
"rust-analyzer.inlayHints.typeHints.enable" = false;
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "nil";
|
||||
"nix.serverSettings" = {
|
||||
nil.formatting.command = [
|
||||
"nixfmt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
nix-rice,
|
||||
rice,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
palette-hex = nix-rice.palette.toRgbHex rice.palette;
|
||||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
programs.wlogout = {
|
||||
|
@ -13,7 +12,7 @@ in
|
|||
package = pkgs.wleave;
|
||||
layout = builtins.fromJSON (builtins.readFile ../dots/wlogout/layout);
|
||||
style =
|
||||
with palette-hex;
|
||||
with pal;
|
||||
(builtins.replaceStrings
|
||||
[
|
||||
"/usr/share/wlogout"
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) getExe;
|
||||
inherit (config.home) homeDirectory;
|
||||
palette-hex = inputs.nix-rice.palette.toRgbHex pkgs.rice.palette;
|
||||
in
|
||||
{
|
||||
ezOneShots = with pkgs; {
|
||||
xrdb = "${getExe xorg.xrdb} -load ${homeDirectory}/.Xresources";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
xorg.xrdb
|
||||
];
|
||||
xresources.properties = with palette-hex; {
|
||||
"*.foreground" = util.fg;
|
||||
"*.background" = util.bg;
|
||||
"*.cursorColor" = util.cursor;
|
||||
"*.selection_foreground" = util.fg_sel;
|
||||
"*.selection_background" = util.bg_sel;
|
||||
"*.color0" = normal.black;
|
||||
"*.color1" = normal.red;
|
||||
"*.color2" = normal.green;
|
||||
"*.color3" = normal.yellow;
|
||||
"*.color4" = normal.blue;
|
||||
"*.color5" = normal.magenta;
|
||||
"*.color6" = normal.cyan;
|
||||
"*.color7" = normal.white;
|
||||
"*.color8" = bright.black;
|
||||
"*.color9" = bright.red;
|
||||
"*.color10" = bright.green;
|
||||
"*.color11" = bright.yellow;
|
||||
"*.color12" = bright.blue;
|
||||
"*.color13" = bright.magenta;
|
||||
"*.color14" = bright.cyan;
|
||||
"*.color15" = bright.white;
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
enableVteIntegration = true;
|
||||
autocd = true;
|
||||
defaultKeymap = "viins";
|
||||
initExtra = builtins.readFile ../dots/zsh;
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "zsh-vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.zsh-autopair;
|
||||
file = "share/zsh-autopair/zsh-autopair.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.zsh-completions;
|
||||
file = "share/zsh-completions/zsh-completions.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-command-time";
|
||||
src = pkgs.zsh-command-time;
|
||||
file = "share/zsh-completions/zsh-command-time.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autocomplete";
|
||||
src = pkgs.zsh-autocomplete;
|
||||
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
src = pkgs.zsh-nix-shell;
|
||||
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "any-nix-shell";
|
||||
src = pkgs.any-nix-shell;
|
||||
file = "share/any-nix-shell/any-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "nix-zsh-completions";
|
||||
src = pkgs.nix-zsh-completions;
|
||||
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,382 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
containerOptions = _: {
|
||||
options = {
|
||||
pullPolicy = mkOption {
|
||||
type = with types; str;
|
||||
description = "Podman container pulling policy";
|
||||
default = "newer";
|
||||
};
|
||||
image = mkOption {
|
||||
type = with types; str;
|
||||
description = "OCI image to run.";
|
||||
example = "library/hello-world";
|
||||
};
|
||||
|
||||
imageFile = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to an image file to load before running the image. This can
|
||||
be used to bypass pulling the image from the registry.
|
||||
|
||||
The `image` attribute must match the name and
|
||||
tag of the image contained in this file, as they will be used to
|
||||
run the container with that image. If they do not match, the
|
||||
image will be pulled from the registry as usual.
|
||||
'';
|
||||
example = literalExpression "pkgs.dockerTools.buildImage {...};";
|
||||
};
|
||||
|
||||
login = {
|
||||
username = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Username for login.";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Path to file containing password.";
|
||||
example = "/etc/nixos/dockerhub-password.txt";
|
||||
};
|
||||
|
||||
registry = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Registry where to login to.";
|
||||
example = "https://docker.pkg.github.com";
|
||||
};
|
||||
};
|
||||
|
||||
cmd = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "Commandline arguments to pass to the image's entrypoint.";
|
||||
example = literalExpression ''
|
||||
["--port=9000"]
|
||||
'';
|
||||
};
|
||||
|
||||
labels = mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = { };
|
||||
description = "Labels to attach to the container at runtime.";
|
||||
example = literalExpression ''
|
||||
{
|
||||
"traefik.https.routers.example.rule" = "Host(`example.container`)";
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
entrypoint = mkOption {
|
||||
type = with types; nullOr str;
|
||||
description = "Override the default entrypoint of the image.";
|
||||
default = null;
|
||||
example = "/bin/my-app";
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = { };
|
||||
description = "Environment variables to set for this container.";
|
||||
example = literalExpression ''
|
||||
{
|
||||
DATABASE_HOST = "db.example.com";
|
||||
DATABASE_PORT = "3306";
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
environmentFiles = mkOption {
|
||||
type = with types; listOf path;
|
||||
default = [ ];
|
||||
description = "Environment files for this container.";
|
||||
example = literalExpression ''
|
||||
[
|
||||
/path/to/.env
|
||||
/path/to/.env.secret
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
log-driver = mkOption {
|
||||
type = types.str;
|
||||
default = "journald";
|
||||
description = ''
|
||||
Logging driver for the container. The default of
|
||||
`"journald"` means that the container's logs will be
|
||||
handled as part of the systemd unit.
|
||||
|
||||
For more details and a full list of logging drivers, refer to podman documentation.
|
||||
|
||||
For Docker:
|
||||
[Docker engine documentation](https://docs.docker.com/engine/reference/run/#logging-drivers---log-driver)
|
||||
|
||||
For Podman:
|
||||
Refer to the docker-run(1) man page.
|
||||
'';
|
||||
};
|
||||
|
||||
ports = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Network ports to publish from the container to the outer host.
|
||||
|
||||
Valid formats:
|
||||
- `<ip>:<hostPort>:<containerPort>`
|
||||
- `<ip>::<containerPort>`
|
||||
- `<hostPort>:<containerPort>`
|
||||
- `<containerPort>`
|
||||
|
||||
Both `hostPort` and `containerPort` can be specified as a range of
|
||||
ports. When specifying ranges for both, the number of container
|
||||
ports in the range must match the number of host ports in the
|
||||
range. Example: `1234-1236:1234-1236/tcp`
|
||||
|
||||
When specifying a range for `hostPort` only, the `containerPort`
|
||||
must *not* be a range. In this case, the container port is published
|
||||
somewhere within the specified `hostPort` range.
|
||||
Example: `1234-1236:1234/tcp`
|
||||
|
||||
Refer to the
|
||||
[Docker engine documentation](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) for full details.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
[
|
||||
"8080:9000"
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Override the username or UID (and optionally groupname or GID) used
|
||||
in the container.
|
||||
'';
|
||||
example = "nobody:nogroup";
|
||||
};
|
||||
|
||||
volumes = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of volumes to attach to this container.
|
||||
|
||||
Note that this is a list of `"src:dst"` strings to
|
||||
allow for `src` to refer to `/nix/store` paths, which
|
||||
would be difficult with an attribute set. There are
|
||||
also a variety of mount options available as a third
|
||||
field; please refer to the
|
||||
[docker engine documentation](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) for details.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
[
|
||||
"volume_name:/path/inside/container"
|
||||
"/path/on/host:/path/inside/container"
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
workdir = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Override the default working directory for the container.";
|
||||
example = "/var/lib/hello_world";
|
||||
};
|
||||
|
||||
dependsOn = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Define which other containers this one depends on. They will be added to both After and Requires for the unit.
|
||||
|
||||
Use the same name as the attribute under `virtualisation.oci-containers.containers`.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
containers = {
|
||||
node1 = {};
|
||||
node2 = {
|
||||
dependsOn = [ "node1" ];
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "The hostname of the container.";
|
||||
example = "hello-world";
|
||||
};
|
||||
|
||||
preRunExtraOptions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "Extra options for podman that go before the `run` argument.";
|
||||
example = [
|
||||
"--runtime"
|
||||
"runsc"
|
||||
];
|
||||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "Extra options for podman run`.";
|
||||
example = literalExpression ''
|
||||
["--network=host"]
|
||||
'';
|
||||
};
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
When enabled, the container is automatically started on boot.
|
||||
If this option is set to false, the container has to be started on-demand via its service.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mkService =
|
||||
name: container:
|
||||
let
|
||||
podman = lib.getExe pkgs.podman;
|
||||
rm = lib.getExe' pkgs.coreutils "rm";
|
||||
printf = lib.getExe' pkgs.coreutils "printf";
|
||||
getId = ''"$(${lib.getExe' pkgs.coreutils "id"} -u)"'';
|
||||
dependsOn = map (x: "podman-${x}.service") container.dependsOn;
|
||||
escapedName = lib.escapeShellArg name;
|
||||
preStartScript = pkgs.writeShellApplication {
|
||||
name = "pre-start";
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
${printf} "Running pre-start script.."
|
||||
${podman} rm -f ${name} || true
|
||||
${lib.optionalString (container.imageFile != null) ''
|
||||
${podman} load -i ${container.imageFile}
|
||||
''}
|
||||
${rm} -f /run/user/${getId}/podman-${escapedName}.ctr-id
|
||||
${printf} " success.\nStarting Podman...\n"
|
||||
'';
|
||||
};
|
||||
script = concatStringsSep " \\\n " (
|
||||
[
|
||||
"exec ${podman} "
|
||||
]
|
||||
++ map escapeShellArg container.preRunExtraOptions
|
||||
++ [
|
||||
"run"
|
||||
"--log-level=debug"
|
||||
"--rm"
|
||||
"--name=${escapedName}"
|
||||
"--log-driver=${container.log-driver}"
|
||||
]
|
||||
++ optional (container.entrypoint != null) "--entrypoint=${escapeShellArg container.entrypoint}"
|
||||
++ optional (container.hostname != null) "--hostname=${escapeShellArg container.hostname}"
|
||||
++ optional (container.pullPolicy != null) "--pull=${container.pullPolicy}"
|
||||
++ [
|
||||
"--cidfile=/run/user/${getId}/podman-${escapedName}.ctr-id"
|
||||
# "--sdnotify=ignore"
|
||||
"--cgroups=no-conmon"
|
||||
"--sdnotify=conmon"
|
||||
"-d"
|
||||
"--replace"
|
||||
]
|
||||
++ (mapAttrsToList (k: v: "-e ${escapeShellArg k}=${escapeShellArg v}") container.environment)
|
||||
++ map (f: "--env-file ${escapeShellArg f}") container.environmentFiles
|
||||
++ map (p: "-p ${escapeShellArg p}") container.ports
|
||||
++ optional (container.user != null) "-u ${escapeShellArg container.user}"
|
||||
++ map (v: "-v ${escapeShellArg v}") container.volumes
|
||||
++ (mapAttrsToList (k: v: "-l ${escapeShellArg k}=${escapeShellArg v}") container.labels)
|
||||
++ optional (container.workdir != null) "-w ${escapeShellArg container.workdir}"
|
||||
++ map escapeShellArg container.extraOptions
|
||||
++ [ container.image ]
|
||||
++ map escapeShellArg container.cmd
|
||||
);
|
||||
|
||||
inherit (lib)
|
||||
concatStringsSep
|
||||
escapeShellArg
|
||||
optional
|
||||
mapAttrsToList
|
||||
;
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
WantedBy = lib.optional container.autoStart "default.target"; # graphical-session instead maybe?
|
||||
After = dependsOn;
|
||||
Requires = dependsOn;
|
||||
# StopWhenUnneeded = true;
|
||||
};
|
||||
# TODO make network target..
|
||||
# wants = lib.optional (container.imageFile == null) "network-online.target";
|
||||
# after = lib.optionals (container.imageFile == null) [ "network-online.target" ]
|
||||
# ++ dependsOn;
|
||||
# environment = proxy_env;
|
||||
|
||||
Service = {
|
||||
### There is no generalized way of supporting `reload` for docker
|
||||
### containers. Some containers may respond well to SIGHUP sent to their
|
||||
### init process, but it is not guaranteed; some apps have other reload
|
||||
### mechanisms, some don't have a reload signal at all, and some docker
|
||||
### images just have broken signal handling. The best compromise in this
|
||||
### case is probably to leave ExecReload undefined, so `systemctl reload`
|
||||
### will at least result in an error instead of potentially undefined
|
||||
### behaviour.
|
||||
###
|
||||
### Advanced users can still override this part of the unit to implement
|
||||
### a custom reload handler, since the result of all this is a normal
|
||||
### systemd service from the perspective of the NixOS module system.
|
||||
###
|
||||
# ExecReload = ...;
|
||||
###
|
||||
ExecStartPre = [ "${preStartScript}/bin/pre-start" ];
|
||||
ExecStart = [
|
||||
"${pkgs.writeShellScript "start" script}"
|
||||
];
|
||||
ExecStop = [
|
||||
"${podman} stop --ignore --cidfile=/run/user/${getId}/podman-${escapedName}.ctr-id"
|
||||
"${podman} rm -f --ignore --cidfile=/run/user/${getId}/podman-${escapedName}.ctr-id"
|
||||
];
|
||||
# TimeoutStartSec = 0;
|
||||
# TimeoutStopSec = 120;
|
||||
# Restart = "always";
|
||||
Environment = [ "PODMAN_SYSTEMD_UNIT=podman-${name}.service" ];
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
# Type = "exec";
|
||||
};
|
||||
};
|
||||
|
||||
cfg = config.containers;
|
||||
inherit (lib)
|
||||
mapAttrs'
|
||||
nameValuePair
|
||||
mkOption
|
||||
types
|
||||
mkIf
|
||||
literalExpression
|
||||
;
|
||||
in
|
||||
{
|
||||
options.containers = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (submodule containerOptions);
|
||||
};
|
||||
|
||||
config = mkIf (cfg != { }) {
|
||||
systemd.user.services = mapAttrs' (k: v: nameValuePair "podman-${k}" (mkService k v)) cfg;
|
||||
};
|
||||
}
|
|
@ -1,212 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
filterAttrs
|
||||
concatStrings
|
||||
concatStringsSep
|
||||
mapAttrsToList
|
||||
concatLists
|
||||
foldlAttrs
|
||||
concatMapAttrs
|
||||
mapAttrs'
|
||||
nameValuePair
|
||||
boolToString
|
||||
;
|
||||
inherit (builtins) typeOf toString stringLength;
|
||||
|
||||
# build up serialisation machinery from here for various types
|
||||
|
||||
# list -> array
|
||||
array = a: "[${concatStringsSep "," a}]";
|
||||
# attrset -> hashmap
|
||||
_assoc = a: mapAttrsToList (name: val: "${name}: ${val}") a;
|
||||
assoc = a: ''
|
||||
{
|
||||
${concatStringsSep ",\n" (concatLists (map _assoc a))}
|
||||
}'';
|
||||
# attrset -> struct
|
||||
_struct_kv =
|
||||
k: v:
|
||||
if v == null then
|
||||
""
|
||||
else
|
||||
(concatStringsSep ":" [
|
||||
k
|
||||
(serialise.${typeOf v} v)
|
||||
]);
|
||||
_struct_concat =
|
||||
s:
|
||||
foldlAttrs (
|
||||
acc: k: v:
|
||||
if stringLength acc > 0 then
|
||||
concatStringsSep ", " [
|
||||
acc
|
||||
(_struct_kv k v)
|
||||
]
|
||||
else
|
||||
_struct_kv k v
|
||||
) "" s;
|
||||
_struct_filt = s: _struct_concat (filterAttrs (_k: v: v != null) s);
|
||||
struct = s: "(${_struct_filt s})";
|
||||
toQuotedString = s: ''"${toString s}"'';
|
||||
|
||||
# make an attrset for struct serialisation
|
||||
serialise = {
|
||||
int = toString;
|
||||
float = toString;
|
||||
bool = boolToString;
|
||||
string = toString;
|
||||
path = toString;
|
||||
null = toString;
|
||||
set = struct;
|
||||
list = array;
|
||||
};
|
||||
|
||||
# define the key for a keybind
|
||||
defineBinding =
|
||||
binding:
|
||||
struct {
|
||||
inherit (binding) modifiers;
|
||||
key = if (binding.key == null) then null else toQuotedString binding.key;
|
||||
};
|
||||
|
||||
# map keybinding from list of attrset to hashmap of (mod,key): action
|
||||
_mapBindings =
|
||||
bindings:
|
||||
map (inner: { "${defineBinding inner}" = maybeToString (checkAction inner.action); }) bindings;
|
||||
mapBindings = bindings: assoc (_mapBindings bindings);
|
||||
|
||||
# check a keybinding's action
|
||||
# escape with quotes if it's a Spawn action
|
||||
checkAction =
|
||||
a:
|
||||
if typeOf a == "set" && a.type == "Spawn" then
|
||||
{
|
||||
inherit (a) type;
|
||||
data = toQuotedString a.data;
|
||||
}
|
||||
else
|
||||
a;
|
||||
|
||||
maybeToString =
|
||||
s:
|
||||
if typeOf s == "set" then
|
||||
concatStrings [
|
||||
s.type
|
||||
"("
|
||||
(toString s.data)
|
||||
")"
|
||||
]
|
||||
else
|
||||
s;
|
||||
|
||||
mapCosmicSettings =
|
||||
application: options:
|
||||
mapAttrs' (
|
||||
k: v:
|
||||
nameValuePair "cosmic/${application}/v${options.version}/${k}" {
|
||||
enable = true;
|
||||
text = serialise.${typeOf v} v;
|
||||
}
|
||||
) options.option;
|
||||
in
|
||||
# deconstructKeybindAttr = attr: mapAttrs' (
|
||||
# name: value:
|
||||
# ) attr;
|
||||
# rec_attr = lib.types.attrsOf (lib.types.oneOf lib.types.string rec_attr);
|
||||
{
|
||||
options.cosmic = {
|
||||
enable =
|
||||
with lib;
|
||||
mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
defaultKeybindings =
|
||||
with lib;
|
||||
mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
# binds = with lib;
|
||||
# mkOption {
|
||||
# default = {};
|
||||
# type = with types; rec_attr;
|
||||
# };
|
||||
|
||||
keybindings =
|
||||
with lib;
|
||||
mkOption {
|
||||
default = [ ];
|
||||
type =
|
||||
with types;
|
||||
listOf (submodule {
|
||||
options = {
|
||||
modifiers = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
};
|
||||
key = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
};
|
||||
action = mkOption {
|
||||
type = either str (submodule {
|
||||
options = {
|
||||
type = mkOption {
|
||||
type = str;
|
||||
};
|
||||
data = mkOption {
|
||||
type = oneOf [
|
||||
str
|
||||
int
|
||||
];
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
otherSettings =
|
||||
with lib;
|
||||
mkOption {
|
||||
default = { };
|
||||
type =
|
||||
with types;
|
||||
attrsOf (submodule {
|
||||
options = {
|
||||
version = mkOption {
|
||||
type = str;
|
||||
default = "1";
|
||||
};
|
||||
option = mkOption {
|
||||
type = attrsOf anything;
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
# TODO we need to split between system_actions, workspaces, custom
|
||||
config.xdg.configFile =
|
||||
{
|
||||
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/custom".text =
|
||||
mapBindings config.cosmic.keybindings;
|
||||
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/defaults" = {
|
||||
text = "{}";
|
||||
enable = !config.cosmic.defaultKeybindings;
|
||||
};
|
||||
}
|
||||
// concatMapAttrs (
|
||||
application: options: mapCosmicSettings application options
|
||||
) config.cosmic.otherSettings;
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption;
|
||||
inherit (builtins) typeOf listToAttrs;
|
||||
in
|
||||
{
|
||||
options.flatpaks = mkOption {
|
||||
default = [ ];
|
||||
type =
|
||||
with lib.types;
|
||||
listOf (
|
||||
either str (submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = str;
|
||||
};
|
||||
overrides = mkOption {
|
||||
type = attrsOf (attrsOf (either str (listOf str)));
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
})
|
||||
);
|
||||
};
|
||||
config.services.flatpak =
|
||||
let
|
||||
userOverrides = listToAttrs (
|
||||
map (
|
||||
fp:
|
||||
if (typeOf fp == "string") then
|
||||
{
|
||||
name = fp;
|
||||
value = { };
|
||||
}
|
||||
else
|
||||
{
|
||||
inherit (fp) name;
|
||||
value = fp.overrides;
|
||||
}
|
||||
) config.flatpaks
|
||||
);
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
uninstallUnmanaged = true;
|
||||
update.auto.enable = true;
|
||||
packages = map (fp: if (typeOf fp == "set") then fp.name else fp) config.flatpaks;
|
||||
overrides = userOverrides // {
|
||||
global = {
|
||||
Context.sockets = [ "wayland" ];
|
||||
Environment = {
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue