flakfiy some Justfile recipes and experiment with wayland based custom desktop

This commit is contained in:
steveej 2023-05-21 11:58:57 +02:00
parent 06a47c0d23
commit 476e10780b
18 changed files with 739 additions and 149 deletions

View file

@ -16,9 +16,12 @@ in {
# FIXME: fix homeshick when no WAN connection is available
# ../programs/homeshick.nix
# ../profiles/gnome-desktop.nix
../profiles/sway-desktop.nix
../profiles/experimental-desktop.ni
../programs/redshift.nix
../programs/espanso.nix
../programs/gnome-desktop.nix
../programs/gpg-agent.nix
../programs/radicale.nix
@ -30,14 +33,21 @@ in {
../programs/neovim.nix
../programs/pass.nix
../programs/vscode
../programs/holochain-launcher.nix
];
home.sessionVariables.HM_CONFIG = "graphical-fullblown";
home.sessionVariables.GOPATH = "$HOME/src/go";
home.sessionVariables.PATH = pkgs.lib.concatStringsSep ":" ["$HOME/.local/bin" "$PATH"];
# workaround: usually created by 'home.xsession.enabled=true' and i don't use with gnome
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
home.packages =
[]
++ (with pkgs; [
@ -91,12 +101,14 @@ in {
# Messaging/Communication
signal-desktop
pidgin
pkgsUnstable.session-desktop
# pidgin
hexchat
schildichat-desktop
aspellDicts.en
aspellDicts.de
skypeforlinux
pkgsUnstable.jitsi-meet-electron
# skypeforlinux
# pkgsUnstable.jitsi-meet-electron
thunderbird
evolution # gnome4.glib_networking
kotatogram-desktop
@ -168,6 +180,7 @@ in {
# Document Processing and Management
mendeley
evince
(pkgsUnstable.logseq.override (_: {electron = pkgs.electron_20;}))
# File Synchronzation

View file

@ -0,0 +1,28 @@
{
pkgs,
config,
lib,
nodeFlake,
packages',
...
}: let
pkgsUnstable = pkgs.callPackage nodeFlake.inputs.nixpkgs-unstable.outPath {};
in {
imports = [
../profiles/wayland-desktop.nix
];
home.packages = with pkgs; [
# experimental WMs
packages'.jay
packages'.magmawm
# swayidle
# swaylock
# # fonts
# noto-fonts
# font-awesome
# noto-fonts-emoji
];
}

View file

@ -5,6 +5,10 @@
...
}: let
in {
imports = [
../profiles/wayland-desktop.nix
];
services = {
gnome-keyring.enable = false;
blueman-applet.enable = true;
@ -20,20 +24,6 @@ in {
services.gpg-agent.pinentryFlavor = "gnome3";
# workaround: usually created by 'home.xsession.enabled=true' and i don't use with gnome
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
home.packages = [
pkgs.wmctrl
];
home.sessionVariables.MOZ_ENABLE_WAYLAND = "1";
dconf.settings = let
manualKeybindings = [
{
@ -76,12 +66,17 @@ in {
};
# disable the builtin <Super>[1-9] functionality
"org/gnome/shell/keybindings" = builtins.listToAttrs (builtins.genList
"org/gnome/shell/keybindings" = builtins.listToAttrs ((builtins.genList
(i: {
name = "switch-to-application-${toString (i + 1)}";
value = [];
})
numWorkspaces);
numWorkspaces) ++ [
{
name = "toggle-overview";
value = [];
}
]);
# remap it to switching to the workspaces
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs (builtins.genList

View file

@ -0,0 +1,84 @@
{
pkgs,
config,
lib,
...
}: let
inherit (import ../lib.nix {}) mkSimpleTrayService;
in {
imports = [
../profiles/wayland-desktop.nix
];
home.packages = with pkgs; [
swayidle
swaylock
# fonts
noto-fonts
font-awesome
noto-fonts-emoji
];
wayland.windowManager.sway = {
enable = true;
systemdIntegration = true;
config = let
modifier = "Mod4";
in {
inherit modifier;
keybindings = lib.mkOptionDefault {
"${modifier}+Ctrl+l" = "exec ${pkgs.swaylock}/bin/swaylock -fF";
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
};
terminal = "alacritty";
startup = [
# Launch Firefox on start
# {command = "firefox";}
# {command = "gnome-keyring --replace"}
];
fonts = {
names = [ "Noto Sans" "Font Awesome 5 Free" ];
style = "Heavy";
size = 10.0;
};
#fonts = {
# names = [ "DejaVu Sans Mono" "FontAwesome5Free" ];
# style = "Bold Semi-Condensed";
# size = 11.0;
#};
colors.focused = {
childBorder = "#ffa500";
# border = "#ffa500";
# TODO: refer to the defaults for these
border = "#4c7899";
background = "#285577";
text = "#ffffff";
indicator = "#2e9ef4";
};
window = {
border = 4;
};
};
};
services.swayidle = {
enable = true;
timeouts = [
{ timeout = 60 * 5; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
];
};
}

View file

@ -0,0 +1,43 @@
{
pkgs,
config,
...
}: let
inherit (import ../lib.nix {}) mkSimpleTrayService;
in {
services.gpg-agent.pinentryFlavor = "gtk2";
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
wlr-randr
wayout
wl-clipboard
wmctrl
# identifies key input syms
wev
# TODO: whwat's this for?
# wltype
pavucontrol
playerctl
pasystray
qt5.qtwayland
qt6.qtwayland
];
home.sessionVariables = {
XDG_SESSION_TYPE = "wayland";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
};
home.pointerCursor = {
name = "Vanilla-DMZ";
package = pkgs.vanilla-dmz;
size = 32;
x11.enable = true;
gtk.enable = true;
};
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
home.packages = [pkgs.holochain-launcher];
}

View file

@ -5,5 +5,13 @@
programs.browserpass.enable = true;
home.packages = with pkgs; [pass rofi-pass gnupg];
home.packages = with pkgs; [
gnupg
pass
# broken on wayland
# rofi-pass
prs
];
}

View file

@ -32,28 +32,37 @@
old.propagatedBuildInputs
++ [radicale-storage-decsync];
});
radicale-config = pkgs.writeText "radicale-config" ''
[auth]
type = htpasswd
htpasswd_filename = ${
pkgs.writeText "radicale" ''
radicale:${passwords.users.radicale}
''
}
htpasswd_encryption = bcrypt
[storage]
type = radicale_storage_decsync
filesystem_folder = ${config.xdg.dataHome}/radicale
decsync_dir = ${config.xdg.dataHome}/decsync
'';
in {
systemd.user.services.radicale = {
Unit.Description = "Radicale with DecSync";
Service = {
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
Restart = "on-failure";
mkRadicaleService = { suffix, port }: let
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
[server]
hosts = localhost:${builtins.toString(port)}
[auth]
type = htpasswd
htpasswd_filename = ${
pkgs.writeText "radicale" ''
radicale:${passwords.users.radicale}
''
}
htpasswd_encryption = bcrypt
[storage]
type = radicale_storage_decsync
filesystem_folder = ${config.xdg.dataHome}/radicale-${suffix}
decsync_dir = ${config.xdg.dataHome}/decsync-${suffix}
'';
in {
systemd.user.services."radicale-${suffix}" = {
Unit.Description = "Radicale with DecSync (${suffix})";
Service = {
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
Restart = "on-failure";
};
Install.WantedBy = ["default.target"];
};
Install.WantedBy = ["default.target"];
};
}
in builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) {} [
{suffix = "personal"; port = 5232;}
{suffix = "family"; port = 5233;}
]

View file

@ -5,7 +5,7 @@
}: let
passwords = import ../../variables/passwords.crypt.nix;
in {
services.redshift = {
services.gammastep = {
enable = true;
inherit (passwords.location.stefan) longitude latitude;
temperature = {
@ -14,10 +14,9 @@ in {
};
tray = true;
settings = {
redshift = {
gammastep = {
brightness-day = 1.0;
brightness-night = 0.5;
adjustment-method = "randr";
};
};
};