From f0fe297151fdc16c65569b24cae08af1c03b35c0 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 3 Feb 2022 22:57:53 +0100 Subject: [PATCH] Add Solvespace and emacs --- home-manager/modules/emacs/default.nix | 14 ++++++++++ home-manager/modules/firefox/default.nix | 1 - home-manager/modules/solvespace/default.nix | 14 ++++++++++ home-manager/modules/sway/default.nix | 5 ++-- home-manager/modules/waybar/default.nix | 1 + modules/desktop/default.nix | 30 +++++++++++++++------ 6 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 home-manager/modules/emacs/default.nix create mode 100644 home-manager/modules/solvespace/default.nix diff --git a/home-manager/modules/emacs/default.nix b/home-manager/modules/emacs/default.nix new file mode 100644 index 0000000..cdc2995 --- /dev/null +++ b/home-manager/modules/emacs/default.nix @@ -0,0 +1,14 @@ +{ pkgs, config, lib, ... }: +with lib; +let + cfg = config.eboskma.programs.emacs; +in +{ + options.eboskma.programs.emacs = { enable = mkEnableOption "activate emacs"; }; + + config = mkIf (cfg.enable) { + programs.emacs = { + enable = true; + }; + }; +} diff --git a/home-manager/modules/firefox/default.nix b/home-manager/modules/firefox/default.nix index 0fc7f93..dda07de 100644 --- a/home-manager/modules/firefox/default.nix +++ b/home-manager/modules/firefox/default.nix @@ -16,7 +16,6 @@ let "security.tls.enable_0rtt_data" = false; "media.ffmpeg.vaapi.enabled" = true; "media.rdd-ffmpeg.enabled" = true; - # "network.http.http3.enabled" = false; # Temporary workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1749908 }; nonDefaultDesktop = pkgs.makeDesktopItem { diff --git a/home-manager/modules/solvespace/default.nix b/home-manager/modules/solvespace/default.nix new file mode 100644 index 0000000..ef1396f --- /dev/null +++ b/home-manager/modules/solvespace/default.nix @@ -0,0 +1,14 @@ +{ pkgs, config, lib, ... }: +with lib; +let + cfg = config.eboskma.programs.solvespace; +in +{ + options.eboskma.programs.solvespace = { enable = mkEnableOption "activate solvespace"; }; + + config = mkIf (cfg.enable) { + home.packages = with pkgs; [ + solvespace + ]; + }; +} diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index 34a8c1c..f97d506 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -4,6 +4,7 @@ let cfg = config.eboskma.programs.sway; mod = "Mod4"; swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ~/.wallpapers/river-2560.png --fade-in 0.5 --scaling fill"; + # swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ~/.wallpapers/river-2560.png --scaling fill"; rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh); in { @@ -266,8 +267,8 @@ in packages = with pkgs; [ dunst - swayidle - swaylock-effects + # swayidle + # swaylock-effects ]; }; diff --git a/home-manager/modules/waybar/default.nix b/home-manager/modules/waybar/default.nix index c203184..2912ae9 100644 --- a/home-manager/modules/waybar/default.nix +++ b/home-manager/modules/waybar/default.nix @@ -91,6 +91,7 @@ in # TODO: package as nix thingy "custom/now_playing" = { exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token"; + exec-on-event = true; format = " ♪ {}"; interval = 2; on-click = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token play-pause"; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index ecf5a38..ae9b2e7 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -43,6 +43,7 @@ in bat.enable = true; dropbox.enable = true; dunst.enable = true; + emacs.enable = true; electron = { enable = true; wayland = true; @@ -64,6 +65,7 @@ in obs-studio.enable = true; rofi.enable = true; vscode.enable = true; + solvespace.enable = true; ssh.enable = true; sway.enable = true; tmux.enable = true; @@ -134,10 +136,10 @@ in }; }; - i18n.inputMethod = { - enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ]; - }; + # i18n.inputMethod = { + # enabled = "fcitx5"; + # fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ]; + # }; gtk = { enable = true; @@ -174,6 +176,7 @@ in ../../home-manager/modules/bat ../../home-manager/modules/dropbox ../../home-manager/modules/dunst + ../../home-manager/modules/emacs ../../home-manager/modules/electron ../../home-manager/modules/firefox ../../home-manager/modules/fish @@ -184,6 +187,7 @@ in ../../home-manager/modules/obs-studio ../../home-manager/modules/rofi ../../home-manager/modules/vscode + ../../home-manager/modules/solvespace ../../home-manager/modules/ssh ../../home-manager/modules/sway ../../home-manager/modules/tmux @@ -204,7 +208,11 @@ in gtk = true; base = true; }; - extraPackages = with pkgs; [ swaylock-effects swayidle ]; + extraPackages = with pkgs; [ + swaylock-effects + # swaylock + swayidle + ]; }; }; @@ -230,9 +238,15 @@ in security = { pam.services.swaylock = { - text = '' - auth include login - ''; + # text = '' + # auth include login + # ''; + unixAuth = true; + setLoginUid = true; + enableGnomeKeyring = true; + allowNullPassword = true; + updateWtmp = true; + startSession = true; }; pki.certificates = [ (builtins.readFile ./horus-ca.pem) ]; };