mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: clean up flake
This commit is contained in:
parent
178d51cde6
commit
6ca7717d3e
63 changed files with 5134 additions and 1157 deletions
|
|
@ -1,4 +1,7 @@
|
|||
{ lib, config, ... }:
|
||||
{ lib, config, globals, ... }:
|
||||
let
|
||||
atuinDomain = globals.services.atuin.domain;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.atuin = lib.mkEnableOption "atuin settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.atuin {
|
||||
|
|
@ -8,7 +11,7 @@
|
|||
settings = {
|
||||
auto_sync = true;
|
||||
sync_frequency = "5m";
|
||||
sync_address = "https://shellhistory.swarsel.win";
|
||||
sync_address = "https://${atuinDomain}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{ lib, config, nixosConfig, ... }:
|
||||
{ lib, config, nixosConfig, globals, ... }:
|
||||
let
|
||||
inherit (nixosConfig.repo.secrets.common.mail) address1 address2 address3 address4 allMailAddresses;
|
||||
inherit (nixosConfig.repo.secrets.common) fullName;
|
||||
crocDomain = globals.services.croc.domain;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.env = lib.mkEnableOption "env settings";
|
||||
|
|
@ -9,11 +10,11 @@ in
|
|||
home.sessionVariables = {
|
||||
EDITOR = "e -w";
|
||||
DISPLAY = ":0";
|
||||
CROC_RELAY = "send.swarsel.win";
|
||||
CROC_RELAY = crocDomain;
|
||||
SWARSEL_LO_RES = config.swarselsystems.lowResolution;
|
||||
SWARSEL_HI_RES = config.swarselsystems.highResolution;
|
||||
};
|
||||
systemd.user.sessionVariables = {
|
||||
systemd.user.sessionVariables = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) {
|
||||
SWARSEL_MAIL1 = address1;
|
||||
SWARSEL_MAIL2 = address2;
|
||||
SWARSEL_MAIL3 = address3;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ in
|
|||
{
|
||||
options.swarselsystems.modules.gammastep = lib.mkEnableOption "gammastep settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.gammastep {
|
||||
services.gammastep = {
|
||||
services.gammastep = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
inherit longitude latitude;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
{ lib, config, nixosConfig, ... }:
|
||||
{ lib, config, nixosConfig, globals, ... }:
|
||||
let
|
||||
inherit (nixosConfig.repo.secrets.common.mail) address1;
|
||||
inherit (nixosConfig.repo.secrets.common) fullName;
|
||||
|
||||
gitUser = globals.user.name;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.git = lib.mkEnableOption "git settings";
|
||||
|
|
@ -25,15 +27,15 @@ in
|
|||
key = "0x76FD3810215AE097";
|
||||
signByDefault = true;
|
||||
};
|
||||
userEmail = lib.mkDefault address1;
|
||||
userName = fullName;
|
||||
userEmail = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) (lib.mkDefault address1);
|
||||
userName = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) fullName;
|
||||
difftastic.enable = true;
|
||||
lfs.enable = true;
|
||||
includes = [
|
||||
{
|
||||
contents = {
|
||||
github = {
|
||||
user = "Swarsel";
|
||||
user = gitUser;
|
||||
};
|
||||
commit = {
|
||||
template = "~/.gitmessage";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ in
|
|||
# this is needed so that mbsync can use the passwords from sops
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
|
||||
accounts = lib.mkIf (!config.swarselsystems.isPublic) {
|
||||
accounts = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) {
|
||||
email = {
|
||||
maildirBasePath = "Mail";
|
||||
accounts = {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
obsidian
|
||||
spotify
|
||||
vesktop # discord client
|
||||
nextcloud-client
|
||||
# nextcloud-client # enables a systemd service that I do not want
|
||||
spotify-player
|
||||
element-desktop
|
||||
nicotine-plus
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, config, lib, ... }:
|
||||
{ self, config, lib, pkgs, ... }:
|
||||
let
|
||||
generateIcons = n: lib.concatStringsSep " " (builtins.map (x: "{icon" + toString x + "}") (lib.range 0 (n - 1)));
|
||||
modulesLeft = [
|
||||
|
|
@ -79,28 +79,28 @@ in
|
|||
|
||||
"custom/pseudobat" = lib.mkIf (!config.swarselsystems.isLaptop) {
|
||||
format = "";
|
||||
on-click-right = "wlogout -p layer-shell";
|
||||
on-click-right = "${pkgs.wlogout}/bin/wlogout -p layer-shell";
|
||||
};
|
||||
|
||||
"custom/configwarn" = {
|
||||
exec = "waybarupdate";
|
||||
exec = "${pkgs.waybarupdate}/bin/waybarupdate";
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
"custom/scratchpad-indicator" = {
|
||||
interval = 3;
|
||||
exec = "swaymsg -t get_tree | jq 'recurse(.nodes[]) | first(select(.name==\"__i3_scratch\")) | .floating_nodes | length | select(. >= 1)'";
|
||||
exec = "${pkgs.swayfx}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq 'recurse(.nodes[]) | first(select(.name==\"__i3_scratch\")) | .floating_nodes | length | select(. >= 1)'";
|
||||
format = "{} ";
|
||||
on-click = "swaymsg 'scratchpad show'";
|
||||
on-click-right = "swaymsg 'move scratchpad'";
|
||||
on-click = "${pkgs.swayfx}/bin/swaymsg 'scratchpad show'";
|
||||
on-click-right = "${pkgs.swayfx}/bin/swaymsg 'move scratchpad'";
|
||||
};
|
||||
|
||||
"custom/github" = {
|
||||
format = "{} ";
|
||||
return-type = "json";
|
||||
interval = 60;
|
||||
exec = "github-notifications";
|
||||
on-click = "xdg-open https://github.com/notifications";
|
||||
exec = "${pkgs.github-notifications}/bin/github-notifications";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open https://github.com/notifications";
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
|
|
@ -235,8 +235,8 @@ in
|
|||
];
|
||||
};
|
||||
scroll-step = 1;
|
||||
on-click = "pamixer -t";
|
||||
on-click-right = "pavucontrol";
|
||||
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
||||
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
|
||||
memory = {
|
||||
|
|
@ -250,13 +250,13 @@ in
|
|||
interval = 5;
|
||||
format-icons = [ "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ];
|
||||
# on-click-right= "com.github.stsdc.monitor";
|
||||
on-click-right = "kitty -o confirm_os_window_close=0 btm";
|
||||
on-click-right = "${pkgs.kitty}/bin/kitty -o confirm_os_window_close=0 btm";
|
||||
|
||||
};
|
||||
"custom/vpn" = {
|
||||
format = "()";
|
||||
exec = "echo '{\"class\": \"connected\"}'";
|
||||
exec-if = "test -d /proc/sys/net/ipv4/conf/tun0";
|
||||
exec-if = "${pkgs.toybox}/bin/test -d /proc/sys/net/ipv4/conf/tun0";
|
||||
return-type = "json";
|
||||
interval = 5;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
options.swarselsystems.modules.yubikey = lib.mkEnableOption "yubikey settings";
|
||||
|
||||
config = lib.mkIf config.swarselsystems.modules.yubikey {
|
||||
pam.yubico.authorizedYubiKeys = {
|
||||
pam.yubico.authorizedYubiKeys = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) {
|
||||
ids = [
|
||||
nixosConfig.repo.secrets.common.yubikeys.dev1
|
||||
nixosConfig.repo.secrets.common.yubikeys.dev2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue