Compare commits
120 Commits
Author | SHA1 | Date |
---|---|---|
genofire | 76ae1ed41b | |
genofire | 48927ca38a | |
genofire | ff4a62fb51 | |
genofire | 330aded669 | |
genofire | 6b6dc1eb2a | |
genofire | 7afbd98bd0 | |
genofire | 7cec90c2f2 | |
genofire | b30cff45db | |
genofire | dc756f87b8 | |
genofire | 0e2e500739 | |
genofire | abcabee811 | |
genofire | 36e47947bd | |
genofire | 2dc698c8ab | |
genofire | 0e18524a24 | |
genofire | a80f9cb2e8 | |
genofire | 2da7cd2ea7 | |
genofire | 58b2e5cce0 | |
genofire | fd01cf370c | |
genofire | 3e44bcc52f | |
genofire | 050d3d57e7 | |
genofire | e7d4e90e4a | |
genofire | f2cd5f96f2 | |
genofire | 5ea77333b4 | |
genofire | 85cc291fd4 | |
genofire | 8efe99074d | |
genofire | f7bc43fce0 | |
genofire | c54639a536 | |
genofire | 18f0160c49 | |
genofire | f41f6591b3 | |
genofire | a854d5a602 | |
genofire | 8f2104599f | |
genofire | 288e3c4cff | |
genofire | 920f107388 | |
genofire | c25f7997ab | |
genofire | 90c8802883 | |
genofire | 7b3e923bb6 | |
genofire | 8889d6ac24 | |
genofire | 15b7f85589 | |
genofire | 18e717b3b2 | |
genofire | 1f51dd2424 | |
genofire | bd92691a60 | |
genofire | aa04e9cdf0 | |
genofire | 2c93bde9cb | |
genofire | 9f53453e3a | |
genofire | 0e4b1207a0 | |
genofire | 8083563206 | |
genofire | e4cefd323c | |
genofire | 21eda88027 | |
genofire | 72128d7f41 | |
genofire | f76b3e4c3b | |
genofire | d90f0abf5c | |
genofire | 847d4500ba | |
genofire | 677821fee4 | |
genofire | 67874d12b3 | |
genofire | 1d5c402503 | |
genofire | c23a57a21a | |
genofire | 9287ae33bb | |
genofire | 8ea023fce8 | |
genofire | a8c930f589 | |
genofire | fa4b52168f | |
genofire | 20158d71a4 | |
genofire | 1c4cfbe63e | |
genofire | 4a2b226739 | |
genofire | 582c7e969d | |
genofire | 4cc1a69110 | |
genofire | 63c0fa7a1f | |
genofire | 641a558528 | |
genofire | 6debd358e6 | |
genofire | 877fc0f997 | |
genofire | 2db41e0489 | |
genofire | 01b7e061fc | |
genofire | a126559750 | |
genofire | 9952b76d7d | |
genofire | 5b3dede64b | |
genofire | 101fa886c8 | |
genofire | d26623cc9a | |
genofire | 61f614fb9c | |
genofire | 1caa0314e1 | |
genofire | 5786aded9d | |
genofire | 1a8f5640d6 | |
genofire | 77d1fe8bd0 | |
genofire | 1deb6b8b96 | |
genofire | 037cbab877 | |
genofire | af8dc3153d | |
genofire | 45b7d81eb2 | |
genofire | b9c340a8ee | |
genofire | 40c40945dc | |
genofire | f1d24d39ee | |
genofire | 683e786a60 | |
genofire | 1272765bb3 | |
genofire | 0724d0d2f9 | |
genofire | ec816b0ebe | |
genofire | 511072b0c2 | |
genofire | bb80de1cbf | |
genofire | 0e1c7aeb49 | |
genofire | bdd2d675bb | |
genofire | d0d20657f3 | |
genofire | 9e01a1f6fa | |
genofire | 44aef90e3f | |
genofire | 6a27d9b52c | |
genofire | 0b56fd5af6 | |
genofire | f17138bcbc | |
genofire | d2bec4151a | |
genofire | 3b4c9ea8bb | |
genofire | e4b13361f3 | |
genofire | 02d9d7d911 | |
genofire | f3444de1dc | |
genofire | c564857aa4 | |
genofire | 691893cde9 | |
genofire | 2b96ebb4d6 | |
genofire | 278aeba9e4 | |
genofire | d0a3f80139 | |
genofire | 9d0fd9fe5a | |
genofire | def929e652 | |
genofire | 86e6bd6184 | |
genofire | ab01192de5 | |
genofire | 2a1af4a61c | |
genofire | 96071612a7 | |
genofire | 7ba5c282e0 | |
genofire | e62982f5cc |
|
@ -1,14 +1,27 @@
|
|||
# Home-Manager
|
||||
|
||||
```bash
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
nix-channel --update
|
||||
```
|
||||
|
||||
Create `~/.config/nixpkgs/home.nix` with:
|
||||
```nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
./repo/default.nix
|
||||
./repo/desktop.nix
|
||||
./repo/sway.nix
|
||||
./repo/desktop-gnome.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# yaru-remix-theme
|
||||
yaru-theme
|
||||
];
|
||||
|
||||
# dconf.settings."org/gnome/shell/extensions/user-theme".name = "Yaru-remix-dark";
|
||||
dconf.settings."org/gnome/shell/extensions/user-theme".name = "Yaru";
|
||||
|
||||
gtk.theme.name = "Flat-Remix-GTK-Violet-Darkest";
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
imports = [./default.nix];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
poezio
|
||||
iamb
|
||||
];
|
||||
}
|
192
home/default.nix
192
home/default.nix
|
@ -1,60 +1,181 @@
|
|||
{pkgs, ...}:
|
||||
{pkgs, lib, ...}:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"ookla-speedtest"
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
python3
|
||||
(python3.withPackages(ps: with ps; [
|
||||
# ansible
|
||||
dnspython
|
||||
youtube-dl
|
||||
boto3 # aws-s3 support for ansible
|
||||
kubernetes # is in ansible kubernetes.core module
|
||||
# dict_utils for an ansible filter_plugin
|
||||
setuptools
|
||||
deepmerge
|
||||
pip
|
||||
passlib # bcrypt
|
||||
pyyaml
|
||||
]))
|
||||
ansible
|
||||
killall
|
||||
exa
|
||||
# tree # use exa
|
||||
htop
|
||||
mosh
|
||||
git
|
||||
dasel
|
||||
pre-commit
|
||||
git-lfs
|
||||
git-crypt
|
||||
git-annex
|
||||
ghorg
|
||||
tig
|
||||
cocogitto
|
||||
tea
|
||||
glab
|
||||
figlet
|
||||
grml-zsh-config
|
||||
tmux
|
||||
#neovim
|
||||
w3m
|
||||
wget
|
||||
xh
|
||||
minio-client
|
||||
liboping # fix it
|
||||
mtr
|
||||
ookla-speedtest
|
||||
hey
|
||||
colordiff
|
||||
git-annex
|
||||
direnv
|
||||
pure-prompt
|
||||
## nice prompt together with grml
|
||||
# pure-prompt
|
||||
# vimPlugins.nvim-lspconfig
|
||||
# vimPlugins.nerdtree
|
||||
#go_1_18
|
||||
go gcc libcap
|
||||
go-langserver
|
||||
pass-wayland
|
||||
gopls
|
||||
# cargo
|
||||
rustup
|
||||
yarn
|
||||
cmake
|
||||
pwgen
|
||||
hugo
|
||||
asciidoctor-with-extensions
|
||||
# gotify-cli # use ntfy.sh
|
||||
glow
|
||||
imagemagick
|
||||
ffmpeg
|
||||
# devOps
|
||||
terraform
|
||||
tflint
|
||||
kubectl
|
||||
kustomize
|
||||
(wrapHelm kubernetes-helm {
|
||||
plugins = with kubernetes-helmPlugins; [
|
||||
helm-diff
|
||||
helm-secrets
|
||||
];
|
||||
})
|
||||
helmfile
|
||||
stern
|
||||
kubeswitch
|
||||
kubespy
|
||||
fluxcd
|
||||
kubeseal
|
||||
# nixopsUnstable
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
k9sctx = "k9s --kubeconfig=$(switch)";
|
||||
k9s = "k9s --headless";
|
||||
kubectx = "export KUBECONFIG=$(switch)";
|
||||
ls = "exa";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = false; # use OS
|
||||
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass-wayland.withExtensions (exts: [
|
||||
exts.pass-otp
|
||||
]);
|
||||
settings = {
|
||||
PASSWORD_STORE_DIR = "$HOME/.password-store";
|
||||
};
|
||||
};
|
||||
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
# envFile.text = ''
|
||||
# let-env config = {
|
||||
# hooks: {
|
||||
# pre_prompt: [{
|
||||
# code: "
|
||||
# let direnv = (direnv export json | from json)
|
||||
# let direnv = if ($direnv | length) == 1 { $direnv } else { {} }
|
||||
# $direnv | load-env
|
||||
# "
|
||||
# }]
|
||||
# }
|
||||
# }
|
||||
# '';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
enableAutosuggestions = true;
|
||||
# broken: enableSyntaxHighlighting = true;
|
||||
# grml and pure enabled ....
|
||||
syntaxHighlighting.enable = true;
|
||||
# initExtra = ''
|
||||
# source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
# prompt pure
|
||||
# '';
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory ={
|
||||
truncation_length = 0;
|
||||
};
|
||||
helm = {
|
||||
disabled = true;
|
||||
};
|
||||
kubernetes = {
|
||||
disabled = false;
|
||||
format = "[$symbol$cluster( \($namespace\))]($style) in ";
|
||||
detect_extensions = [
|
||||
"package" # helm
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.atuin = {
|
||||
enable = false;
|
||||
settings = {
|
||||
auto_sync = false;
|
||||
style = "compact";
|
||||
search_mode = "fulltext";
|
||||
filter_mode_shell_up_key_binding = "directory";
|
||||
exit_mode = "return-query";
|
||||
};
|
||||
};
|
||||
programs.direnv.enable = true;
|
||||
programs.btop.enable = true;
|
||||
programs.tealdeer.enable = true; # man / tldr ...
|
||||
programs.gitui.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName= "genofire";
|
||||
userEmail = "geno+dev@fireorbit.de";
|
||||
signing = {
|
||||
signByDefault = false;
|
||||
key = "386ED1BF848ABB4A6B4A3C45FC83907C125BC2BC";
|
||||
};
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
annex.sshcaching = true;
|
||||
filter.lfs = {
|
||||
required = "true";
|
||||
clean = "git-lfs clean -- %f";
|
||||
smudge = "git-lfs smudge -- %f";
|
||||
process = "git-lfs filter-process";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
extraConfig = ''
|
||||
syntax on
|
||||
set number relativenumber
|
||||
|
@ -69,4 +190,29 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
languages.language = [];
|
||||
settings = {
|
||||
theme = "base16_default";
|
||||
editor = {
|
||||
lsp.display-messages = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray.enable = true;
|
||||
};
|
||||
|
||||
programs.k9s = {
|
||||
enable = true;
|
||||
# does not open ERROR with clusters settings
|
||||
#settings.k9s = {
|
||||
# headless = true;
|
||||
# logger.fullScreenLogs = true;
|
||||
#};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# env
|
||||
libnotify
|
||||
mpv
|
||||
pavucontrol
|
||||
# glib gsettings-desktop-schemas - # run gsettings for gnome
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
powerline-fonts
|
||||
line-awesome
|
||||
yubikey-manager
|
||||
# yubikey-personalization
|
||||
pinentry-gnome
|
||||
# dbus
|
||||
gcr
|
||||
gnome3.dconf
|
||||
# apps
|
||||
gnome.seahorse
|
||||
nextcloud-client
|
||||
thunderbird-wayland
|
||||
dino
|
||||
homebank
|
||||
gramps
|
||||
tootle
|
||||
fractal
|
||||
];
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Blue-Darkest-NoBorder";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.defaultIconTheme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
keyserver = "hkps://keys.openpgp.org";
|
||||
};
|
||||
};
|
||||
services.gnome-keyring.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
browsers = ["firefox"];
|
||||
};
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-wayland;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
imports = [../default.nix];
|
||||
|
||||
home.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
BROWSER = "firefox";
|
||||
GDK_BACKEND = "wayland";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_WEBRENDER = "1";
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# env
|
||||
libnotify
|
||||
mpv
|
||||
pavucontrol
|
||||
# glib gsettings-desktop-schemas - # run gsettings for gnome
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
powerline-fonts
|
||||
line-awesome
|
||||
yubikey-manager
|
||||
# yubikey-personalization
|
||||
pinentry-gnome
|
||||
# dbus
|
||||
gcr
|
||||
dconf
|
||||
# gotify-desktop # use ntfy.sh instatt
|
||||
# apps
|
||||
virt-manager
|
||||
openlens
|
||||
evince
|
||||
gthumb
|
||||
gnome.seahorse
|
||||
gnome.cheese
|
||||
nextcloud-client
|
||||
dino # xmpp
|
||||
onlyoffice-bin
|
||||
libreoffice-fresh
|
||||
inkscape
|
||||
gimp
|
||||
homebank
|
||||
# ahnen
|
||||
(gramps.override {
|
||||
enableOSM = true;
|
||||
enableGraphviz = true;
|
||||
enableGhostscript = true;
|
||||
# pythonPath = [ pythonPackages.keyring ];
|
||||
})
|
||||
python310Packages.keyring
|
||||
graphviz-nox
|
||||
tootle # mastodon
|
||||
# fractal # matrix
|
||||
fractal-next
|
||||
# fluffychat
|
||||
cozy # audiobooks
|
||||
];
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
# package = pkgs.yaru-theme;
|
||||
# name = "Yaru-dark";
|
||||
|
||||
# package = pkgs.flat-remix-gtk;
|
||||
# name = "Flat-Remix-GTK-Blue-Darkest";
|
||||
# name = "Flat-Remix-GTK-Blue-Darkest-NoBorder";
|
||||
# name = "Flat-Remix-GTK-Blue-Darker";
|
||||
package = pkgs.colloid-gtk-theme.override {
|
||||
sizeVariants = [ "compact" ];
|
||||
tweaks = [ "black" "rimless" ];
|
||||
themeVariants = [ "all" ];
|
||||
};
|
||||
name = "Colloid-Compact";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.yaru-theme;
|
||||
name = "Yaru";
|
||||
|
||||
# package = pkgs.flat-remix-icon-theme;
|
||||
# name = "Flat-Remix-Violet-Dark";
|
||||
};
|
||||
};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
scdaemonSettings = {
|
||||
disable-ccid = true;
|
||||
};
|
||||
settings = {
|
||||
keyserver = "hkps://keys.openpgp.org";
|
||||
};
|
||||
};
|
||||
services.gnome-keyring.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
browsers = ["firefox"];
|
||||
};
|
||||
programs.librewolf = {
|
||||
enable = false;
|
||||
settings = {
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearOnShutdown.downloads" = false;
|
||||
"browser.sessionstore.privacy_level" = 0;
|
||||
};
|
||||
};
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
# nixos not home-manager
|
||||
# nativeMessagingHosts = {
|
||||
# fxCast = true;
|
||||
#};
|
||||
# package = pkgs.firefox-beta-bin;
|
||||
# # package = pkgs.firefox-devedition-bin;
|
||||
# package = pkgs.librewolf;
|
||||
};
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
package = pkgs.thunderbird-wayland;
|
||||
settings = {
|
||||
"general.useragent.override" = "";
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"mailnews.mark_message_read.auto" = false;
|
||||
};
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
{ config, pkgs, lib, ...}:
|
||||
{
|
||||
imports = [./default.nix];
|
||||
|
||||
dconf.settings = {
|
||||
"com/gexperts/Tilix" = {
|
||||
"focus-follow-mouse" = true;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
"workspaces-only-on-primary" = true;
|
||||
# display: partly scale (like 150% or 125%)
|
||||
"experimental-features" = [ "scale-monitor-framebuffer" ];
|
||||
};
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
"sources" = [
|
||||
(lib.hm.gvariant.mkTuple ["xkb" "de"])
|
||||
(lib.hm.gvariant.mkTuple ["xkb" "us"])
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
"allow-volume-above-100-percent" = true;
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
"toggle-maximized" = [ "<Super>z" ];
|
||||
"maximize" = [];
|
||||
"unmaximize" = [];
|
||||
|
||||
"close" = [ "<Super>c" "<Alt>F4" ];
|
||||
|
||||
"switch-input-source" = [ "<Super>i" "XF86Keyboard" ];
|
||||
"switch-input-source-backward" = [ "<Shift><Super>i" "<Shift>XF86Keyboard" ];
|
||||
|
||||
"switch-to-workspace-1" = [ "<Super>1" ];
|
||||
"switch-to-workspace-2" = [ "<Super>2" ];
|
||||
"switch-to-workspace-3" = [ "<Super>3" ];
|
||||
"switch-to-workspace-4" = [ "<Super>4" ];
|
||||
"switch-to-workspace-5" = [ "<Super>5" ];
|
||||
"switch-to-workspace-6" = [ "<Super>6" ];
|
||||
"switch-to-workspace-7" = [ "<Super>7" ];
|
||||
"switch-to-workspace-8" = [ "<Super>8" ];
|
||||
"switch-to-workspace-9" = [ "<Super>9" ];
|
||||
"switch-to-workspace-10" = [ "<Super>0" ];
|
||||
|
||||
"move-to-workspace-1" = [ "<Shift><Super>1" ];
|
||||
"move-to-workspace-2" = [ "<Shift><Super>2" ];
|
||||
"move-to-workspace-3" = [ "<Shift><Super>3" ];
|
||||
"move-to-workspace-4" = [ "<Shift><Super>4" ];
|
||||
"move-to-workspace-5" = [ "<Shift><Super>5" ];
|
||||
"move-to-workspace-6" = [ "<Shift><Super>6" ];
|
||||
"move-to-workspace-7" = [ "<Shift><Super>7" ];
|
||||
"move-to-workspace-8" = [ "<Shift><Super>8" ];
|
||||
"move-to-workspace-9" = [ "<Shift><Super>9" ];
|
||||
"move-to-workspace-10" = [ "<Shift><Super>0" ];
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
"enabled-extensions" = [
|
||||
"places-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"drive-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com"
|
||||
"auto-move-windows@gnome-shell-extensions.gcampax.github.com"
|
||||
"pop-shell@system76.com"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
];
|
||||
};
|
||||
# key bindings
|
||||
"org/gnome/shell/keybindings" = {
|
||||
"switch-to-application-1" = [];
|
||||
"switch-to-application-2" = [];
|
||||
"switch-to-application-3" = [];
|
||||
"switch-to-application-4" = [];
|
||||
"switch-to-application-5" = [];
|
||||
"switch-to-application-6" = [];
|
||||
"switch-to-application-7" = [];
|
||||
"switch-to-application-8" = [];
|
||||
"switch-to-application-9" = [];
|
||||
};
|
||||
};
|
||||
|
||||
# programs.firefox.nativeMessagingHosts.gsconnect = true;
|
||||
|
||||
# new/replace
|
||||
# programs.firefox.enableGnomeExtensions = true;
|
||||
# TODO hä services.gnome.gnome-browser-connector.enable = true;
|
||||
# programs.firefox.package = pkgs.firefox.overwrite {
|
||||
# cfg = {
|
||||
# enableGnomeExtensions = true;
|
||||
# };
|
||||
#};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
tilix
|
||||
gnome.gnome-tweaks
|
||||
];
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2016 James Murphy
|
||||
# Licensed under the GPL version 2 only
|
||||
#
|
||||
# A battery indicator blocklet script for i3blocks
|
||||
|
||||
import re
|
||||
from subprocess import check_output
|
||||
|
||||
status = check_output(['acpi'], universal_newlines=True)
|
||||
|
||||
if not status:
|
||||
# stands for no battery found
|
||||
fulltext = "<span color='red'>🔞🔋</span>"
|
||||
percentleft = 100
|
||||
else:
|
||||
# if there is more than one battery in one laptop, the percentage left is
|
||||
# available for each battery separately, although state and remaining
|
||||
# time for overall block is shown in the status of the first battery
|
||||
batteries = status.split("\n")
|
||||
state_batteries=[]
|
||||
commasplitstatus_batteries=[]
|
||||
percentleft_batteries=[]
|
||||
time = ""
|
||||
for battery in batteries:
|
||||
if battery!='':
|
||||
state_batteries.append(battery.split(": ")[1].split(", ")[0])
|
||||
commasplitstatus = battery.split(", ")
|
||||
if not time:
|
||||
time = commasplitstatus[-1].strip()
|
||||
# check if it matches a time
|
||||
time = re.match(r"(\d+):(\d+)", time)
|
||||
if time:
|
||||
time = ":".join(time.groups())
|
||||
timeleft = " ({})".format(time)
|
||||
else:
|
||||
timeleft = ""
|
||||
|
||||
p = int(commasplitstatus[1].rstrip("%\n"))
|
||||
if p>0:
|
||||
percentleft_batteries.append(p)
|
||||
commasplitstatus_batteries.append(commasplitstatus)
|
||||
state = state_batteries[0]
|
||||
commasplitstatus = commasplitstatus_batteries[0]
|
||||
if percentleft_batteries:
|
||||
percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries))
|
||||
else:
|
||||
percentleft = 0
|
||||
|
||||
# stands for charging
|
||||
#FA_LIGHTNING = "<span color='#E88939' font='FontAwesome'>\uf0e7</span>"
|
||||
#FA_LIGHTNING = "<span color='#E88939'>⚡</span>"
|
||||
FA_LIGHTNING = "<span color='#E88939'>⚡</span>"
|
||||
|
||||
# stands for plugged in
|
||||
#FA_PLUG = "<span color='#E88939' font='FontAwesome'>\uf1e6</span>"
|
||||
#FA_PLUG = "<span color='#E88939'>🔌</span>"
|
||||
FA_PLUG = "<span color='#E88939'>🔌</span>"
|
||||
|
||||
# stands for using battery
|
||||
#FA_BATTERY = "<span color='#E88939' font='FontAwesome'>\uf240</span>"
|
||||
FA_BATTERY = "<span color='#E88939'>🔋</span>"
|
||||
|
||||
# stands for unknown status of battery
|
||||
#FA_QUESTION = "<span color='#E88939' font='FontAwesome'>\uf128</span>"
|
||||
FA_QUESTION = "<span color='#E88939'>❔</span>"
|
||||
|
||||
|
||||
if state == "Discharging":
|
||||
fulltext = FA_BATTERY + " "
|
||||
elif state == "Full":
|
||||
fulltext = FA_PLUG + " "
|
||||
timeleft = ""
|
||||
elif state == "Unknown":
|
||||
fulltext = FA_BATTERY + " " + FA_QUESTION + " "
|
||||
timeleft = ""
|
||||
else:
|
||||
fulltext = FA_LIGHTNING + " " + FA_PLUG + " "
|
||||
|
||||
percentcolor = "#FFFFFF"
|
||||
|
||||
if percentleft < 10:
|
||||
# exit code 33 will turn background red
|
||||
percentcolor = "#FFFFFF"
|
||||
elif percentleft < 20:
|
||||
percentcolor = "#FF3300"
|
||||
elif percentleft < 30:
|
||||
percentcolor = "#FF6600"
|
||||
elif percentleft < 40:
|
||||
percentcolor = "#FF9900"
|
||||
elif percentleft < 50:
|
||||
percentcolor = "#FFCC00"
|
||||
elif percentleft < 60:
|
||||
percentcolor = "#FFFF00"
|
||||
elif percentleft < 70:
|
||||
percentcolor = "#FFFF33"
|
||||
elif percentleft < 80:
|
||||
percentcolor = "#FFFF66"
|
||||
|
||||
fulltext += '<span color="{}">{}%</span>'.format(percentcolor, percentleft)
|
||||
fulltext += timeleft
|
||||
|
||||
print(fulltext)
|
||||
print(fulltext)
|
||||
if percentleft < 10:
|
||||
exit(33)
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
|
||||
# connection (think desktop), the corresponding block should not be displayed.
|
||||
[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] ||
|
||||
[[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit
|
||||
|
||||
COLOR_MAC="${COLOR_MAC:-grey}"
|
||||
COLOR_FREQ="${COLOR_FREQ:-white}"
|
||||
COLOR_SIGNAL="${COLOR_SIGNAL:-#589df6}"
|
||||
COLOR_BANDWIDTH="${COLOR_BANDWIDTH:-grey}"
|
||||
|
||||
echo -n " ";
|
||||
iw dev $INTERFACE link | head -8 | grep -vE '(SSID|TX|RX)' \
|
||||
| sed -e "s/.*to .*\([0-9a-f:]\{5\}\) .on.*/<span color='$COLOR_MAC'>\1<\/span>/g; s/^\s//g" \
|
||||
| tr -d "\n" \
|
||||
| sed -e "s/freq: / <span color='$COLOR_FREQ'>/g; s/signal: /<\/span> <span color='$COLOR_SIGNAL'>/g; s/mrx bitrate: \([0-9\.]*\).*tx bitrate: \([0-9\.]*\).*/<\/span> <span color='$COLOR_BANDWIDTH'>\1\/\2<\/span>/g;"
|
||||
echo ""
|
|
@ -0,0 +1,556 @@
|
|||
{ config, pkgs, lib, ...}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.my.sway;
|
||||
lock = "${pkgs.swaylock-effects}/bin/swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 10 --fade-in 0.2 --submit-on-touch";
|
||||
in
|
||||
{
|
||||
imports = [./default.nix];
|
||||
|
||||
options.my.sway = with pkgs.lib; {
|
||||
KDEConnect = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "enable KDEConnect support";
|
||||
};
|
||||
xwayland = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "enable xwayland support";
|
||||
};
|
||||
mail = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "enable mail support (thunderbird)";
|
||||
};
|
||||
nextcloud = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "enable nextcloud support";
|
||||
};
|
||||
XMPP = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "enable XMPP support ()";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.KDEConnect {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
})
|
||||
{
|
||||
home.sessionVariables = {
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
};
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# sway
|
||||
# alacritty
|
||||
# swayidle
|
||||
# swaylock-effects
|
||||
# mako
|
||||
# wl-clipboard
|
||||
#- xdg-desktop-portal-wlr
|
||||
# bemenu
|
||||
# i3blocks
|
||||
# acpi
|
||||
# lm_sensors
|
||||
# ponymix
|
||||
# brightnessctl
|
||||
# gammastep
|
||||
# grim
|
||||
# slurp
|
||||
# kdeconnect
|
||||
# wdisplays
|
||||
];
|
||||
|
||||
services.poweralertd.enable = true;
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
way.outputs = [{
|
||||
criteria = "Japan Display Inc. 0x364C Unknown";
|
||||
status = "enable";
|
||||
scale = 1.25;
|
||||
}];
|
||||
homeleft.outputs = [{
|
||||
criteria = "Japan Display Inc. 0x364C Unknown";
|
||||
status = "enable";
|
||||
scale = 1.25;
|
||||
position = "0,0";
|
||||
} {
|
||||
criteria = "LG Electronics LG HDR 4K 0x0000655D";
|
||||
status = "enable";
|
||||
scale = 1.0;
|
||||
position = "2400,0";
|
||||
mode = "3840x2160";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
ws1 = "1💬";
|
||||
#ws2 = "2📝";
|
||||
ws2 = "2🌟";
|
||||
ws3 = "3🍁";
|
||||
ws4 = "4🍀";
|
||||
ws5 = "5🌈";
|
||||
ws6 = "6💎";
|
||||
ws7 = "7🎥";
|
||||
ws8 = "8🌍";
|
||||
ws9 = "9🔒";
|
||||
ws10 = "10🌀";
|
||||
|
||||
white = "#ffffff";
|
||||
cyan = "#00afd7";
|
||||
transcyan = "#00afd762";
|
||||
aqua = "#00d787";
|
||||
violet = "#800080";
|
||||
wine = "#72003e";
|
||||
magenta = "#af005f";
|
||||
orange = "#ff8700";
|
||||
silver = "#e4e4e4";
|
||||
gray = "#353535";
|
||||
elegant = "#1b1d1e";
|
||||
black = "#000000";
|
||||
transparent = "#000000b2";
|
||||
|
||||
modifier = "Mod4";
|
||||
menu = "bemenu-run -i -p 'Run:' --fn 'pango:monospace 7'";
|
||||
# config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
enable = true;
|
||||
xwayland = cfg.xwayland;
|
||||
config = {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_model = "chromebook";
|
||||
# no click needed
|
||||
tap = "enabled";
|
||||
};
|
||||
"1452:544:Apple,_Inc_Apple_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
"*".bg = "~/.config/wallpaper.png fill";
|
||||
## fireThink
|
||||
#"Unknown 0x226D 0x00000000" = {
|
||||
# enable = "";
|
||||
#};
|
||||
## fireG0
|
||||
#"Unknown 0x405C 0x00000000" = {
|
||||
# position = "0 0";
|
||||
# # scale = "0.7";
|
||||
# # resolution = "1920x1080";
|
||||
# resolution = "1366x768@60Hz";
|
||||
#};
|
||||
## fireEmerald
|
||||
#"Unknown 0x364C 0x00000000" = {
|
||||
# position = "0 0";
|
||||
# scale = "1.25";
|
||||
# # does it work?
|
||||
# enable = "";
|
||||
#};
|
||||
# "Japan Display Inc. 0x364C Unknown" = {
|
||||
# position = "0 0";
|
||||
# scale = "1.25";
|
||||
# enable = "";
|
||||
# };
|
||||
# "LG Electronics LG HDR 4K 0x0000655D" = {
|
||||
# position = "2400 0";
|
||||
# enable = "";
|
||||
# scale = "1.0";
|
||||
# # disable = true;
|
||||
# # resolution = "3840x2160@30Hz";
|
||||
# resolution = "3840x2160";
|
||||
# };
|
||||
# "Goldstar Company Ltd LG HDR 4K 0x0000655D" = {
|
||||
# position = "2400 0";
|
||||
# enable = "";
|
||||
# scale = "1.0";
|
||||
# # disable = true;
|
||||
# # resolution = "3840x2160@30Hz";
|
||||
# resolution = "3840x2160";
|
||||
# };
|
||||
#"HEADLESS-1" = {
|
||||
# resolution = "2560x1440";
|
||||
#};
|
||||
#"DP-1" = {
|
||||
# position = "3000 0";
|
||||
# # resolution = "2560x1440";
|
||||
#};
|
||||
# "DP-2" = {
|
||||
# position = "1920 0";
|
||||
# # position = "4480 0";
|
||||
# # resolution = "1280x1024";
|
||||
# };
|
||||
};
|
||||
modifier = "${modifier}";
|
||||
menu = "${menu}";
|
||||
terminal = "alacritty";
|
||||
fonts = { names = ["monospace"]; style = "monospace"; size = 7.0;};
|
||||
colors = {
|
||||
focused = { background = "${transcyan}"; border = "${transcyan}"; childBorder = "${transcyan}"; indicator = "${white}"; text = "${elegant}"; };
|
||||
focusedInactive = { background = "${transparent}"; border = "${transparent}"; childBorder = "${transparent}"; indicator = "${magenta}"; text = "${cyan}"; };
|
||||
unfocused = { background = "${transparent}"; border = "${transparent}"; childBorder = "${transparent}"; indicator = "${white}"; text = "${orange}"; };
|
||||
urgent = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${magenta}"; text = "${silver}"; };
|
||||
placeholder = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${white}"; text = "${silver}"; };
|
||||
background = "${transparent}";
|
||||
};
|
||||
bars = [{
|
||||
position = "top";
|
||||
statusCommand = "i3blocks";
|
||||
trayOutput = "*";
|
||||
colors = {
|
||||
statusline = "${white}";
|
||||
# focusedStatusline = "${white}";
|
||||
background = "${transparent}";
|
||||
# focusedBackground = "${transparent}";
|
||||
activeWorkspace = { background = "${gray}"; border = "${gray}"; text = "${white}"; };
|
||||
focusedWorkspace = { background = "${cyan}"; border = "${gray}"; text = "${white}"; };
|
||||
inactiveWorkspace = { background = "${black}"; border = "${black}"; text = "${orange}"; };
|
||||
urgentWorkspace = { background = "${magenta}"; border = "${magenta}"; text = "${white}"; };
|
||||
bindingMode = { background = "${orange}"; border = "${orange}"; text = "${white}"; };
|
||||
};
|
||||
}];
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
# hideEdgeBorders = "smart_no_gaps";
|
||||
hideEdgeBorders = "smart";
|
||||
commands = [
|
||||
{ command = "move to scratchpad"; criteria = { title = "Firefox.* Sharing Indicator"; }; }
|
||||
{ command = "sticky enable"; criteria = { title = "Picture-in-Picture"; }; }
|
||||
{ command = "floating enable"; criteria = { title = "Picture-in-Picture"; }; }
|
||||
{ command = "floating enable"; criteria = { title = "Extension: \(Tree Style Tab\) - .*"; }; }
|
||||
];
|
||||
};
|
||||
gaps = {
|
||||
inner = 2;
|
||||
outer = 0;
|
||||
smartGaps = true;
|
||||
smartBorders = "no_gaps";
|
||||
};
|
||||
modes.resize = {
|
||||
Left = "resize shrink width 10 px or 10 ppt";
|
||||
Down = "resize grow height 10 px or 10 ppt";
|
||||
Up = "resize shrink height 10 px or 10 ppt";
|
||||
Right = "resize grow width 10 px or 10 ppt";
|
||||
|
||||
j = "resize grow height 10 px or 10 ppt";
|
||||
k = "resize shrink height 10 px or 10 ppt";
|
||||
l = "resize grow width 10 px or 10 ppt";
|
||||
h = "resize shrink width 10 px or 10 ppt";
|
||||
|
||||
Return = "mode default";
|
||||
Escape = "mode default";
|
||||
"${modifier}+r" = "mode default";
|
||||
};
|
||||
workspaceAutoBackAndForth = true;
|
||||
keybindings = {
|
||||
"${modifier}+Return" = "exec alacritty";
|
||||
# "${modifier}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
|
||||
"${modifier}+Shift+c" = "reload";
|
||||
"${modifier}+Shift+r" = "restart";
|
||||
"${modifier}+c" = "kill";
|
||||
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||
|
||||
"${modifier}+Shift+h" = "split h";
|
||||
"${modifier}+Shift+v" = "split v";
|
||||
|
||||
"${modifier}+z" = "fullscreen toggle";
|
||||
|
||||
"${modifier}+s" = "layout stacking";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+e" = "layout toggle split";
|
||||
|
||||
"${modifier}+Shift+space" = "floating toggle";
|
||||
"${modifier}+space" = "focus mode_toggle";
|
||||
"${modifier}+a" = "focus parent";
|
||||
"${modifier}+d" = "focus child";
|
||||
"${modifier}+v" = "exec ${menu}";
|
||||
|
||||
"${modifier}+x" = "sticky toggle";
|
||||
"${modifier}+Shift+x" = "move workspace to output left";
|
||||
|
||||
"${modifier}+r" = "mode resize";
|
||||
|
||||
# window
|
||||
"${modifier}+Left" = "focus left";
|
||||
"${modifier}+Down" = "focus down";
|
||||
"${modifier}+Up" = "focus up";
|
||||
"${modifier}+Right" = "focus right";
|
||||
"${modifier}+j" = "focus left";
|
||||
"${modifier}+k" = "focus down";
|
||||
"${modifier}+l" = "focus up";
|
||||
"${modifier}+odiaeresis" = "focus right";
|
||||
|
||||
"${modifier}+Shift+Left" = "move left";
|
||||
"${modifier}+Shift+Down" = "move down";
|
||||
"${modifier}+Shift+Up" = "move up";
|
||||
"${modifier}+Shift+Right" = "move right";
|
||||
"${modifier}+Shift+j" = "move left";
|
||||
"${modifier}+Shift+k" = "move down";
|
||||
"${modifier}+Shift+l" = "move up";
|
||||
"${modifier}+Shift+odiaeresis" = "move right";
|
||||
|
||||
# workspace
|
||||
"${modifier}+1" = "workspace number ${ws1}";
|
||||
"${modifier}+2" = "workspace number ${ws2}";
|
||||
"${modifier}+3" = "workspace number ${ws3}";
|
||||
"${modifier}+4" = "workspace number ${ws4}";
|
||||
"${modifier}+5" = "workspace number ${ws5}";
|
||||
"${modifier}+6" = "workspace number ${ws6}";
|
||||
"${modifier}+7" = "workspace number ${ws7}";
|
||||
"${modifier}+8" = "workspace number ${ws8}";
|
||||
"${modifier}+9" = "workspace number ${ws9}";
|
||||
"${modifier}+0" = "workspace number ${ws10}";
|
||||
|
||||
"${modifier}+Shift+1" = "move container to workspace number ${ws1}";
|
||||
"${modifier}+Shift+2" = "move container to workspace number ${ws2}";
|
||||
"${modifier}+Shift+3" = "move container to workspace number ${ws3}";
|
||||
"${modifier}+Shift+4" = "move container to workspace number ${ws4}";
|
||||
"${modifier}+Shift+5" = "move container to workspace number ${ws5}";
|
||||
"${modifier}+Shift+6" = "move container to workspace number ${ws6}";
|
||||
"${modifier}+Shift+7" = "move container to workspace number ${ws7}";
|
||||
"${modifier}+Shift+8" = "move container to workspace number ${ws8}";
|
||||
"${modifier}+Shift+9" = "move container to workspace number ${ws9}";
|
||||
"${modifier}+Shift+0" = "move container to workspace number ${ws10}";
|
||||
|
||||
"XF86AudioLowerVolume" = "exec ponymix -N decrease 5";
|
||||
"${modifier}+XF86AudioLowerVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') decrease 5"'';
|
||||
"XF86AudioRaiseVolume" = "exec ponymix -N increase 5";
|
||||
"${modifier}+XF86AudioRaiseVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') increase 5"'';
|
||||
|
||||
"XF86AudioMute" = "exec ponymix -N toggle";
|
||||
|
||||
"${modifier}+XF86AudioMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
||||
"XF86AudioMicMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
||||
|
||||
"XF86MonBrightnessUp" = ''exec brightnessctl set +10% && \
|
||||
notify-send -h "int:value:$(brightnessctl -m info | cut -d',' -f4)" -i display-brightness-symbolic -a Display Light -t 1000'';
|
||||
"XF86MonBrightnessDown" = ''exec brightnessctl set 10%- && \
|
||||
notify-send -h "int:value:$(brightnessctl -m info | cut -d',' -f4)" -i display-brightness-symbolic -a Display Light -t 1000'';
|
||||
"XF86Display" = ''exec "swaymsg output eDP-1 toggle"'';
|
||||
|
||||
"${modifier}+p" = "exec passmenu";
|
||||
|
||||
"${modifier}+F11" = ''exec "${lock}"'';
|
||||
"Print" = ''exec "grim -g \"$(slurp)\""'';
|
||||
};
|
||||
assigns = {
|
||||
"${ws1}" = [
|
||||
{ app_id = "(?i)empathy"; }
|
||||
{ app_id = "(?i)gajim"; }
|
||||
{ app_id = "(?i)dino"; }
|
||||
{ app_id = "(?i)pidgin"; }
|
||||
];
|
||||
"${ws2}" = [
|
||||
{ app_id = "(?i)thunderbird"; }
|
||||
{ app_id = "(?i)evolution"; }
|
||||
];
|
||||
"${ws4}" = [
|
||||
{ app_id = "(?i)atril"; }
|
||||
{ app_id = "(?i)evince"; }
|
||||
];
|
||||
"${ws7}" = [
|
||||
{ app_id = "(?i)mpv"; }
|
||||
];
|
||||
"${ws8}" = [
|
||||
{ app_id = "(?i)firefox"; }
|
||||
{ app_id = "(?i)firefoxdeveloperedition"; }
|
||||
];
|
||||
};
|
||||
floating = {
|
||||
modifier = modifier;
|
||||
};
|
||||
startup = [
|
||||
# { command = "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
|
||||
# { command = "hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK" ; }
|
||||
# { command = "swayidle -w \\
|
||||
# timeout 300 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch' \\
|
||||
# timeout 600 'swaymsg output * dpms off' \\
|
||||
# resume 'swaymsg output * dpms on' \\
|
||||
# before-sleep 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch'"; }
|
||||
#{ command = "mako"; }
|
||||
#{ command = "kanshi"; }
|
||||
# indicator
|
||||
{ command = "networkd-notify"; }
|
||||
# needs x11
|
||||
#{ command = "udiskie -t"; }
|
||||
#{ command = "modem-manager-gui -i"; }
|
||||
#{ command = "nm-applet"; }
|
||||
# apps
|
||||
{ command = "firefox"; }
|
||||
#{ command = "firefoxdeveloperedition"; }
|
||||
] ++ lib.optionals (cfg.mail) [
|
||||
{ command = "thunderbird"; }
|
||||
] ++ lib.optionals (cfg.nextcloud) [
|
||||
{ command = "nextcloud"; }
|
||||
] ++ lib.optionals (cfg.XMPP) [
|
||||
{ command = "dino"; }
|
||||
#{ command = "gajim"; }
|
||||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
set $laptop eDP-1
|
||||
bindswitch --reload --locked lid:on output $laptop disable
|
||||
bindswitch --reload --locked lid:off output $laptop enable
|
||||
exec_always "cat /proc/acpi/button/lid/*/state | grep -q open && swaymsg output $laptop enable || swaymsg output $laptop disable"
|
||||
'';
|
||||
};
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{ timeout = 300; command = "${lock}"; }
|
||||
{ timeout = 600; command = "${pkgs.sway}/bin/swaymsg output * dpms off"; }
|
||||
];
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${lock}"; }
|
||||
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg output * dpms on"; }
|
||||
];
|
||||
};
|
||||
|
||||
# use nixos's ....
|
||||
# from programs.sway:
|
||||
# xdg.portal.enable = true;
|
||||
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
font = "monospace 7";
|
||||
iconPath = "/home/genofire/.nix-profile/share/icons/Adwaita/:/home/genofire/.nix-profile/share/icons/hicolor/";
|
||||
maxIconSize = 32;
|
||||
margin = "2";
|
||||
padding = "3";
|
||||
width = 380;
|
||||
|
||||
format = "<b>[%a] %s %h</b>\\n%b";
|
||||
|
||||
maxVisible = 14;
|
||||
# layer = "overlay";
|
||||
groupBy = "app-name,summary";
|
||||
sort = "+time";
|
||||
|
||||
backgroundColor = "#000000bf";
|
||||
borderColor = "#000000bf";
|
||||
#borderColor = "#00afd7";
|
||||
borderRadius = 4;
|
||||
extraConfig = ''
|
||||
[app-name=""]
|
||||
width=380
|
||||
|
||||
[app-name=""]
|
||||
format=<b>%s %h</b>\n%b
|
||||
|
||||
[app-name="notify-send"]
|
||||
format=<b>%s %h</b>\n%b
|
||||
|
||||
[grouped]
|
||||
format=(%g) <b>[%a] %s %h</b>\n%b
|
||||
|
||||
[actionable]
|
||||
border-radius=4
|
||||
|
||||
[urgency=low]
|
||||
border-color=#00d787a0
|
||||
progress-color=over #00d78760
|
||||
|
||||
[urgency=normal]
|
||||
progress-color=over #1c1c1ca0
|
||||
#progress-color=over #00afd7a0
|
||||
|
||||
[urgency=high]
|
||||
border-color=#af005fa0
|
||||
progress-color=over #af005f60
|
||||
|
||||
[app-icon="kdeconnect"]
|
||||
format=<b>%s %h</b>\n%b
|
||||
border-color=#353535
|
||||
background-color=#1b1d1e
|
||||
border-size=1
|
||||
anchor=top-left
|
||||
'';
|
||||
};
|
||||
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
# duskTime = "22:00-23:00";
|
||||
# dawnTime = "6:00-10:00";
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window.opacity = 0.95;
|
||||
font.size = 8;
|
||||
colors.primary = {
|
||||
background = "0x000000";
|
||||
foreground = "0xffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."i3blocks/bin/wifi".source = ./sway-i3block/wifi;
|
||||
xdg.configFile."i3blocks/bin/battery".source = ./sway-i3block/battery;
|
||||
xdg.configFile."i3blocks/config".text = ''
|
||||
align=center
|
||||
separator=true
|
||||
separator_block_width=15
|
||||
markup=pango
|
||||
# color=#f8f8f2
|
||||
color=#e4e4e4
|
||||
# background=#00afd7
|
||||
|
||||
[root]
|
||||
label= 💽
|
||||
command=df -h / | awk 'FNR==2 { gsub(/[A-Za-z]/, ""); printf " %i<span color=\"#589df6\">G</span>\n", $4 }'
|
||||
interval=3
|
||||
|
||||
[memory]
|
||||
label= 💾
|
||||
command=free --giga | awk 'FNR==2{ printf " %i<span color=\"#589df6\">G</span>\n", $7 }'
|
||||
interval=2
|
||||
|
||||
[wifi]
|
||||
label=
|
||||
command=~/.config/i3blocks/bin/wifi
|
||||
interval=5
|
||||
color=#589df6
|
||||
|
||||
[volume]
|
||||
command=if ponymix -t sink is-muted; then echo '🔇'; else if test $(ponymix -t sink get-volume) -gt 50; then echo -n "🔊"; else echo -n "🔉"; fi; echo "$(ponymix -t sink get-volume)<span color=\"#589df6\">%</span>"; fi
|
||||
interval=1
|
||||
|
||||
[mic]
|
||||
command=if ponymix -t source is-muted; then echo '<span color="#ffffff"></span>'; else echo "<span color=\"#ff5555\"> $(ponymix -t source get-volume)%</span>"; fi
|
||||
interval=1
|
||||
|
||||
[battery]
|
||||
command=~/.config/i3blocks/bin/battery
|
||||
interval=2
|
||||
color=#ff5555
|
||||
|
||||
[time]
|
||||
label=⏰
|
||||
command=date '+%T'
|
||||
interval=1
|
||||
'';
|
||||
}];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
./repo/default.nix
|
||||
./repo/desktop.nix
|
||||
./repo/sway.nix
|
||||
];
|
||||
}
|
313
home/sway.nix
313
home/sway.nix
|
@ -1,313 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
sway
|
||||
alacritty
|
||||
swayidle
|
||||
swaylock-effects
|
||||
mako
|
||||
wl-clipboard
|
||||
xdg-desktop-portal-wlr
|
||||
bemenu
|
||||
i3blocks
|
||||
acpi
|
||||
lm_sensors
|
||||
ponymix
|
||||
brightnessctl
|
||||
#gammastep
|
||||
grim
|
||||
slurp
|
||||
];
|
||||
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
ws1 = "1💬";
|
||||
#ws2 = "2📝";
|
||||
ws2 = "2🌟";
|
||||
ws3 = "3🍁";
|
||||
ws4 = "4🍀";
|
||||
ws5 = "5🌈";
|
||||
ws6 = "6💎";
|
||||
ws7 = "7🎥";
|
||||
ws8 = "8🌍";
|
||||
ws9 = "9🔒";
|
||||
ws10 = "10🌀";
|
||||
|
||||
white = "#ffffff";
|
||||
cyan = "#00afd7";
|
||||
acqua = "#00d787";
|
||||
violet = "#800080";
|
||||
wine = "#72003e";
|
||||
magenta = "#af005f";
|
||||
orange = "#ff8700";
|
||||
silver = "#e4e4e4";
|
||||
gray = "#353535";
|
||||
elegant = "#1b1d1e";
|
||||
# transparent = "#000000";
|
||||
transparent = "#000000b2";
|
||||
|
||||
modifier = "Mod4";
|
||||
menu = "bemenu-run -i -p 'Run:' --fn 'pango:monospace 7'";
|
||||
# config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
enable = true;
|
||||
xwayland = false;
|
||||
config = {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_model = "chromebook";
|
||||
# no click needed
|
||||
tap = "enabled";
|
||||
};
|
||||
"1452:544:Apple,_Inc_Apple_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
"*".bg = "~/.config/wallpaper.png fill";
|
||||
# fireThink
|
||||
"Unknown 0x226D 0x00000000" = {
|
||||
enable = "";
|
||||
};
|
||||
# fireG0
|
||||
"Unknown 0x405C 0x00000000" = {
|
||||
position = "0 0";
|
||||
# scale = "0.7";
|
||||
# resolution = "1920x1080";
|
||||
resolution = "1366x768@60Hz";
|
||||
};
|
||||
# fireEmerald
|
||||
"Unknown 0x364C 0x00000000" = {
|
||||
position = "0 0";
|
||||
scale = "1.25";
|
||||
};
|
||||
"Goldstar Company Ltd LG HDR 4K 0x0000655D" = {
|
||||
position = "3000 0";
|
||||
enable = "";
|
||||
# disable = true;
|
||||
# resolution = "3840x2160@30Hz";
|
||||
resolution = "3840x2160";
|
||||
};
|
||||
"HEADLESS-1" = {
|
||||
resolution = "2560x1440";
|
||||
};
|
||||
"DP-1" = {
|
||||
position = "3000 0";
|
||||
# resolution = "2560x1440";
|
||||
};
|
||||
# "DP-2" = {
|
||||
# position = "1920 0";
|
||||
# # position = "4480 0";
|
||||
# # resolution = "1280x1024";
|
||||
# };
|
||||
};
|
||||
modifier = "${modifier}";
|
||||
menu = "${menu}";
|
||||
terminal = "alacritty";
|
||||
# fonts = { names = ["monospace"]; style = "monospace"; size = 7;};
|
||||
fonts = [ "pango:monospace 7" ];
|
||||
colors = {
|
||||
focused = { background = "${cyan}"; border = "${cyan}"; childBorder = "${cyan}"; indicator = "${white}"; text = "${elegant}"; };
|
||||
focusedInactive = { background = "${gray}"; border = "${gray}"; childBorder = "${gray}"; indicator = "${magenta}"; text = "${cyan}"; };
|
||||
unfocused = { background = "${elegant}"; border = "${elegant}"; childBorder = "${elegant}"; indicator = "${white}"; text = "${orange}"; };
|
||||
urgent = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${magenta}"; text = "${silver}"; };
|
||||
placeholder = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${white}"; text = "${silver}"; };
|
||||
background = "${transparent}";
|
||||
};
|
||||
bars = [{
|
||||
position = "top";
|
||||
statusCommand = "i3blocks";
|
||||
colors = {
|
||||
statusline = "${white}";
|
||||
# focusedStatusline = "${white}";
|
||||
background = "${elegant}";
|
||||
# focusedBackground = "${transparent}";
|
||||
activeWorkspace = { background = "${cyan}"; border = "${gray}"; text = "${white}"; };
|
||||
focusedWorkspace = { background = "${cyan}"; border = "${cyan}"; text = "${white}"; };
|
||||
inactiveWorkspace = { background = "${transparent}"; border = "${elegant}"; text = "${orange}"; };
|
||||
urgentWorkspace = { background = "${magenta}"; border = "${magenta}"; text = "${white}"; };
|
||||
bindingMode = { background = "${orange}"; border = "${orange}"; text = "${white}"; };
|
||||
};
|
||||
}];
|
||||
gaps = {
|
||||
inner = 2;
|
||||
outer = 0;
|
||||
smartGaps = true;
|
||||
smartBorders = "no_gaps";
|
||||
};
|
||||
modes.resize = {
|
||||
Left = "resize shrink width 10 px or 10 ppt";
|
||||
Down = "resize grow height 10 px or 10 ppt";
|
||||
Up = "resize shrink height 10 px or 10 ppt";
|
||||
Right = "resize grow width 10 px or 10 ppt";
|
||||
|
||||
j = "resize grow height 10 px or 10 ppt";
|
||||
k = "resize shrink height 10 px or 10 ppt";
|
||||
l = "resize grow width 10 px or 10 ppt";
|
||||
h = "resize shrink width 10 px or 10 ppt";
|
||||
|
||||
Return = "mode default";
|
||||
Escape = "mode default";
|
||||
"${modifier}+r" = "mode default";
|
||||
};
|
||||
workspaceAutoBackAndForth = true;
|
||||
keybindings = {
|
||||
"${modifier}+Return" = "exec alacritty";
|
||||
# "${modifier}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
|
||||
"${modifier}+Shift+c" = "reload";
|
||||
"${modifier}+Shift+r" = "restart";
|
||||
"${modifier}+c" = "kill";
|
||||
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||
|
||||
"${modifier}+Shift+h" = "split h";
|
||||
"${modifier}+Shift+v" = "split v";
|
||||
|
||||
"${modifier}+z" = "fullscreen toggle";
|
||||
|
||||
"${modifier}+s" = "layout stacking";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+e" = "layout toggle split";
|
||||
|
||||
"${modifier}+Shift+space" = "floating toggle";
|
||||
"${modifier}+space" = "focus mode_toggle";
|
||||
"${modifier}+a" = "focus parent";
|
||||
"${modifier}+d" = "focus child";
|
||||
"${modifier}+v" = "exec ${menu}";
|
||||
|
||||
"${modifier}+x" = "sticky toggle";
|
||||
"${modifier}+Shift+x" = "move workspace to output left";
|
||||
|
||||
"${modifier}+r" = "mode resize";
|
||||
|
||||
# workspace
|
||||
"${modifier}+1" = "workspace number ${ws1}";
|
||||
"${modifier}+2" = "workspace number ${ws2}";
|
||||
"${modifier}+3" = "workspace number ${ws3}";
|
||||
"${modifier}+4" = "workspace number ${ws4}";
|
||||
"${modifier}+5" = "workspace number ${ws5}";
|
||||
"${modifier}+6" = "workspace number ${ws6}";
|
||||
"${modifier}+7" = "workspace number ${ws7}";
|
||||
"${modifier}+8" = "workspace number ${ws8}";
|
||||
"${modifier}+9" = "workspace number ${ws9}";
|
||||
"${modifier}+0" = "workspace number ${ws10}";
|
||||
|
||||
"${modifier}+Shift+1" = "move container to workspace number ${ws1}";
|
||||
"${modifier}+Shift+2" = "move container to workspace number ${ws2}";
|
||||
"${modifier}+Shift+3" = "move container to workspace number ${ws3}";
|
||||
"${modifier}+Shift+4" = "move container to workspace number ${ws4}";
|
||||
"${modifier}+Shift+5" = "move container to workspace number ${ws5}";
|
||||
"${modifier}+Shift+6" = "move container to workspace number ${ws6}";
|
||||
"${modifier}+Shift+7" = "move container to workspace number ${ws7}";
|
||||
"${modifier}+Shift+8" = "move container to workspace number ${ws8}";
|
||||
"${modifier}+Shift+9" = "move container to workspace number ${ws9}";
|
||||
"${modifier}+Shift+0" = "move container to workspace number ${ws10}";
|
||||
|
||||
"XF86AudioLowerVolume" = "exec ponymix -N decrease 5";
|
||||
"${modifier}+XF86AudioLowerVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') decrease 5"'';
|
||||
"XF86AudioRaiseVolume" = "exec ponymix -N increase 5";
|
||||
"${modifier}+XF86AudioRaiseVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') increase 5"'';
|
||||
|
||||
"XF86AudioMute" = "exec ponymix -N toggle";
|
||||
|
||||
"${modifier}+XF86AudioMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
||||
"XF86AudioMicMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
||||
|
||||
"XF86MonBrightnessUp" = ''exec "sh ~/.local/bin/key_light.sh up"'';
|
||||
"XF86MonBrightnessDown" = ''exec "sh ~/.local/bin/key_light.sh down"'';
|
||||
"XF86Display" = ''exec "swaymsg output eDP-1 toggle"'';
|
||||
|
||||
"${modifier}+p" = "exec passmenu";
|
||||
|
||||
"${modifier}+F11" = ''exec "swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch"'';
|
||||
"Print" = ''exec "grim -g \"$(slurp)\""'';
|
||||
};
|
||||
assigns = {
|
||||
"${ws1}" = [
|
||||
{ app_id = "(?i)empathy"; }
|
||||
{ app_id = "(?i)gajim"; }
|
||||
{ app_id = "(?i)dino"; }
|
||||
{ app_id = "(?i)pidgin"; }
|
||||
];
|
||||
"${ws2}" = [
|
||||
{ app_id = "(?i)thunderbird"; }
|
||||
{ app_id = "(?i)evolution"; }
|
||||
];
|
||||
"${ws4}" = [
|
||||
{ app_id = "(?i)atril"; }
|
||||
{ app_id = "(?i)evince"; }
|
||||
];
|
||||
"${ws7}" = [
|
||||
{ app_id = "(?i)mpv"; }
|
||||
];
|
||||
"${ws8}" = [
|
||||
{ app_id = "(?i)firefox"; }
|
||||
{ app_id = "(?i)firefoxdeveloperedition"; }
|
||||
];
|
||||
};
|
||||
floating = {
|
||||
modifier = modifier;
|
||||
};
|
||||
window = {
|
||||
border = 1;
|
||||
# hideEdgeBorders = "smart_no_gaps";
|
||||
hideEdgeBorders = "smart";
|
||||
commands = [
|
||||
{ command = "move to scratchpad"; criteria = { title = "Firefox.* Sharing Indicator"; }; }
|
||||
{ command = "sticky enable"; criteria = { title = "Picture-in-Picture"; }; }
|
||||
{ command = "floating enable"; criteria = { title = "Picture-in-Picture"; }; }
|
||||
{ command = "floating enable"; criteria = { title = "Extension: \(Tree Style Tab\) - .*"; }; }
|
||||
];
|
||||
};
|
||||
startup = [
|
||||
{ command = "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
|
||||
{ command = "hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK" ; }
|
||||
{ command = "swayidle -w \\
|
||||
timeout 300 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch' \\
|
||||
timeout 600 'swaymsg output * dpms off' \\
|
||||
resume 'swaymsg output * dpms on' \\
|
||||
before-sleep 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch'"; }
|
||||
{ command = "mako"; }
|
||||
#{ command = "kanshi"; }
|
||||
# indicator
|
||||
{ command = "/usr/lib/kdeconnectd"; }
|
||||
{ command = "kdeconnect-indicator"; }
|
||||
{ command = "networkd-notify"; }
|
||||
# needs x11
|
||||
#{ command = "udiskie -t"; }
|
||||
#{ command = "modem-manager-gui -i"; }
|
||||
#{ command = "nm-applet"; }
|
||||
# apps
|
||||
{ command = "thunderbird"; }
|
||||
{ command = "firefox"; }
|
||||
#{ command = "firefoxdeveloperedition"; }
|
||||
{ command = "nextcloud"; }
|
||||
{ command = "dino"; }
|
||||
#{ command = "gajim"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
# duskTime = "22:00-23:00";
|
||||
# dawnTime = "6:00-10:00";
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = false;
|
||||
settings = {
|
||||
background_opacity = 0.95;
|
||||
font.size = 8;
|
||||
schemes.base16.primary.background = "0x0a0a0a";
|
||||
colors = "*base16";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
{config, pkgs, lib, ...}:
|
||||
let
|
||||
createChromiumExtensionFor = browserVersion: { id, sha256, version }:
|
||||
{
|
||||
inherit id;
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
name = "${id}.crx";
|
||||
inherit sha256;
|
||||
};
|
||||
inherit version;
|
||||
};
|
||||
createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in
|
||||
{
|
||||
|
||||
programs.browserpass.browsers = [ "chromium" ];
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = (pkgs.ungoogled-chromium.override {
|
||||
commandLineArgs = [
|
||||
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
|
||||
"--ozone-platform=wayland"
|
||||
];
|
||||
});
|
||||
extensions = [
|
||||
## browserpass
|
||||
{
|
||||
# id = "naepdomgkenhinolocfifgehidddafch";
|
||||
id = "pjmbgaakjkbhpopmakjoedenlfdmcdgm";
|
||||
# id = "klfoddkbhleoaabpmiigbmpbjfljimgb";
|
||||
# crxPath = "/tmp/a.crx";
|
||||
crxPath = (builtins.fetchurl {
|
||||
url = "https://github.com/browserpass/browserpass-extension/releases/download/3.7.2/browserpass-github-3.7.2.crx";
|
||||
name = "naepdomgkenhinolocfifgehidddafch.crx";
|
||||
});
|
||||
updateUrl = "https://github.com/browserpass/browserpass-extension/releases/download/3.7.2/browserpass-github-3.7.2.crx";
|
||||
version = "3.7.2";
|
||||
}
|
||||
#(createChromiumExtension {
|
||||
# id = "naepdomgkenhinolocfifgehidddafch";
|
||||
## "naepdomgkenhinolocfifgehidddafch"
|
||||
# sha256 = "1gwy7fa1076ynaspz8rsfrp29cizgp7dk2wbznaxhbmim9ys6hkq";
|
||||
# version = "3.7.2";
|
||||
#})
|
||||
## ublock origin
|
||||
(createChromiumExtension {
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
# "cjpalhdlnbpafiamejdnhcphjbkeiagm"
|
||||
sha256 = "1i14y4sq9vl01wqhlgxmdv6knhjm622llc8ycbq3l2k389shj7ng";
|
||||
version = "1.46.0";
|
||||
})
|
||||
## uMatrix
|
||||
(createChromiumExtension {
|
||||
id = "ogfcmafjalglgifnmanfmnieipoejdcf";
|
||||
# "ogfcmafjalglgifnmanfmnieipoejdcf"
|
||||
sha256 = "0l1i79naglp2xbqvkvrw7340749wncdql8dklrklz3b406c01cmf";
|
||||
version = "1.4.4";
|
||||
})
|
||||
## ipvFoo
|
||||
(createChromiumExtension {
|
||||
id = "ecanpcehffngcegjmadlcijfolapggal";
|
||||
# "ecanpcehffngcegjmadlcijfolapggal"
|
||||
sha256 = "1b8ail2sj14xaisw25c29c0hvwn8qv612rg50x8lwajwxh143caf";
|
||||
version = "2.3";
|
||||
})
|
||||
## Vertical Tabs by Michael
|
||||
#(createChromiumExtension {
|
||||
# id = "pddljdmihkpdfpkgmbhdomeeifpklgnm";
|
||||
## "pddljdmihkpdfpkgmbhdomeeifpklgnm"
|
||||
# sha256 = "19hb2gmkr4fb4mnsyvak0k1w33m3v9yjsad5lzcm8yamna18829y";
|
||||
# version = "2.0.4";
|
||||
#})
|
||||
# Tabs in Sidebar
|
||||
(createChromiumExtension {
|
||||
id = "akahnknmcbmgodngfjcflnaljdbhnlfo";
|
||||
sha256 = "0ydbfmhpkwrsf4zyhl4v5abjq7wm46j41r6scq5kbn536lih298q";
|
||||
version = "0.0.5";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = (pkgs.vscodium.override {
|
||||
# commandLineArgs = [
|
||||
# "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
|
||||
# "--ozone-platform=wayland"
|
||||
# ];
|
||||
});
|
||||
};
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
||||
inherit pkgs;
|
||||
};
|
||||
};
|
||||
programs.firefox = {
|
||||
# package = pkgs.librewolf;
|
||||
# package = pkgs.firefox-wayland;
|
||||
profiles."main" = {
|
||||
id = 0;
|
||||
bookmarks = {
|
||||
"github".url = "https://github.com";
|
||||
};
|
||||
search.default = "DuckDuckGo";
|
||||
settings = {
|
||||
"extensions.pocket.enabled" = false;
|
||||
#----
|
||||
"browser.tabs.unloadOnLowMemory" = false;
|
||||
# to enable userChrome
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
#----
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
#----
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
# all cockies from cross-site blocked
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
# tracking in all tabs
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.trackingprotection.cryptomining.enabled" = true;
|
||||
"privacy.trackingprotection.fingerprinting.enabled" = true;
|
||||
# new
|
||||
# https everywhere
|
||||
"dom.security.https_only_mode" = true;
|
||||
"dom.security.https_only_mode_ever_enabled" = true;
|
||||
# DNS over HTTPS disabled
|
||||
"doh-rollout.disable-heuristics" = true;
|
||||
"network.trr.mode" = 5;
|
||||
# autofill (TODO)
|
||||
"dom.forms.autocomplete.formautofill" = false;
|
||||
"extensions.formautofill.creditCards.enabled" = false;
|
||||
};
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
umatrix
|
||||
browserpass
|
||||
tree-style-tab
|
||||
];
|
||||
userChrome = ''
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
// about:config - toolkit.legacyUserProfileCustomizations.stylesheets
|
||||
|
||||
// tab-toolbar - all versions
|
||||
#titlebar {
|
||||
display: none;
|
||||
}
|
||||
#tabbrowser-tabs,
|
||||
#TabsToolbar,
|
||||
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
// hide sidebar-headers (Tree Style Tab)
|
||||
#sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
buildah
|
||||
podman
|
||||
podman-tui
|
||||
podman-compose
|
||||
];
|
||||
|
||||
xdg.configFile."containers/registries.conf".text = ''
|
||||
[registries.search]
|
||||
registries = ['docker.io']
|
||||
|
||||
[registries.block]
|
||||
registries = []
|
||||
'';
|
||||
xdg.configFile."containers/policy.json".text = ''
|
||||
{
|
||||
"default": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
],
|
||||
"transports":
|
||||
{
|
||||
"docker-daemon":
|
||||
{
|
||||
"": [{"type":"insecureAcceptAnything"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -35,3 +35,12 @@ Create `/etc/nixos/configuration.nix` with:
|
|||
```
|
||||
|
||||
and run `nixos-rebuild switch --upgrade`
|
||||
|
||||
## my current package channels
|
||||
|
||||
```
|
||||
nix-channel --list
|
||||
home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
|
||||
nixos https://nixos.org/channels/nixos-unstable
|
||||
nixpkgs https://nixos.org/channels/nixpkgs-unstable
|
||||
```
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./repo/default.nix
|
||||
./repo/desktop.nix
|
||||
./repo/genofire.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
# boot
|
||||
boot.zfs.requestEncryptionCredentials = []; # list -> default: true - always request for password
|
||||
|
||||
# --------
|
||||
# specifical this maschine:
|
||||
# --------
|
||||
|
||||
networking.hostId = "6a465f93"; # zfs needed
|
||||
networking.hostName = "fireEmerald"; # Define your hostname.
|
||||
# cryptsetup
|
||||
# boot.initrd.luks.enable = true;
|
||||
boot.initrd.luks.devices = {
|
||||
"croot" = {
|
||||
device = "/dev/disk/by-uuid/e75385e9-b733-49d4-91fd-6ac2fa821195" ;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,25 +3,42 @@
|
|||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
pkgsHomeManager = import <home-manager> {};
|
||||
in
|
||||
{
|
||||
system.autoUpgrade.enable = true;
|
||||
nix.optimise.automatic = true;
|
||||
nix.gc.automatic = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# zfs
|
||||
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
#boot.kernelParams = [ "nohibernate" ];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
|
||||
networking.useNetworkd = true;
|
||||
networking.useDHCP = false;
|
||||
services.openssh.enable = true;
|
||||
# for k3s
|
||||
#networking.firewall.enable = true; # is already enabled ...
|
||||
networking.firewall.allowedUDPPorts = [ 5355 ]; # LLMNR
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
ports = [ 1512 ];
|
||||
startWhenNeeded = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "without-password";
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"command=\"zrepl stdinserver fireStore\",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1U9DTKueKuTuu/F9wxGr3we7y00V8HMyUjVBMwFQwo root-zrepl@fireStore"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIOr9wE3i1+Cl/06WOf0/6OjxsOnN7veV3LZcWgtHkcS genofire@fireYoga"
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n.defaultLocale = "en_IE.UTF-8";
|
||||
i18n.supportedLocales = [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"en_IE.UTF-8/UTF-8"
|
||||
];
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "de";
|
||||
|
@ -31,28 +48,89 @@
|
|||
python3
|
||||
killall
|
||||
htop
|
||||
mosh
|
||||
bat
|
||||
git
|
||||
git-lfs
|
||||
tig
|
||||
helix
|
||||
tcpdump
|
||||
iperf3
|
||||
bmon
|
||||
figlet
|
||||
grml-zsh-config
|
||||
tmux
|
||||
neovim
|
||||
xh
|
||||
liboping
|
||||
mtr
|
||||
home-manager
|
||||
jq
|
||||
unzip
|
||||
unrar
|
||||
## nice prompt together with grml
|
||||
# pure-prompt
|
||||
nushell
|
||||
] ++ [
|
||||
pkgsHomeManager.home-manager
|
||||
];
|
||||
environment.shellAliases = {
|
||||
ip = "ip --color";
|
||||
watch = "watch -c";
|
||||
grep = "grep --color=always --exclude-dir=.git";
|
||||
vim = "hx";
|
||||
k9s = "k9s --headless";
|
||||
};
|
||||
environment.variables.EDITOR = "hx";
|
||||
|
||||
programs.mosh.enable = true; # open firewall
|
||||
|
||||
programs.neovim = {
|
||||
enable = false;
|
||||
defaultEditor = false;
|
||||
configure.customRC = ''
|
||||
syntax on
|
||||
set number relativenumber
|
||||
'';
|
||||
};
|
||||
|
||||
# zsh
|
||||
# users.defaultUserShell = pkgs.nushell;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
programs.zsh.autosuggestions.enable = true;
|
||||
programs.zsh.syntaxHighlighting.enable = true;
|
||||
programs.zsh.interactiveShellInit = ''
|
||||
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
'';
|
||||
programs.zsh.promptInit = "";
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
# interactiveShellInit = ''
|
||||
# promptInit = ''
|
||||
# source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
# prompt pure;
|
||||
# '';
|
||||
# promptInit = "";
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory ={
|
||||
truncation_length = 0;
|
||||
};
|
||||
helm = {
|
||||
disabled = true;
|
||||
};
|
||||
kubernetes = {
|
||||
disabled = false;
|
||||
format = "[$symbol$cluster( \($namespace\))]($style) in ";
|
||||
detect_extensions = [
|
||||
"package" # helm
|
||||
];
|
||||
detect_folders = [
|
||||
"flux-system"
|
||||
"helm"
|
||||
"templates"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
# tmux
|
||||
./files/tmux.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.wireless.iwd.enable = true;
|
||||
systemd.network.networks.wifi.matchConfig = { Name = "wlan0";};
|
||||
systemd.network.networks.wifi.DHCP = "ipv4";
|
||||
|
||||
sound.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
#alsa.support32bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
#services.acpid.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
iw
|
||||
];
|
||||
|
||||
# allow wayland / sway
|
||||
hardware.opengl.enable = true;
|
||||
# gtk config
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# smartcard
|
||||
services.pcscd.enable = true;
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
../hardware/network.nix
|
||||
];
|
||||
|
||||
services.cage = {
|
||||
enable = true;
|
||||
extraArguments = [
|
||||
"-d"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
AddressRandomization = "network";
|
||||
# EnableNetworkConfiguration = false;
|
||||
|
||||
# RoamThreshold = -70;
|
||||
# RoamThreshold5G = -90;
|
||||
RoamRetryInterval = 10;
|
||||
};
|
||||
# Network.EnableIPv6 = true;
|
||||
|
||||
Rank.BandModifier5Ghz = 5.0;
|
||||
# Scan.DisablePeriodicScan = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false; #use pipewire
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
# alsa.support32bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
iw
|
||||
# pulseaudio-modules-bt
|
||||
## android-tools
|
||||
];
|
||||
|
||||
# syncthing
|
||||
networking.firewall.allowedTCPPorts = [ 22000 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
||||
|
||||
programs.browserpass.enable = true;
|
||||
|
||||
# smartcard
|
||||
services.pcscd.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
|
||||
services.udev.extraRules = lib.mkMerge [
|
||||
# meine maus geht immer aus
|
||||
# # autosuspend USB devices
|
||||
# ''ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"''
|
||||
# # autosuspend PCI devices
|
||||
# ''ACTION=="add", SUBSYSTEM=="pci", TEST=="power/control", ATTR{power/control}="auto"''
|
||||
# disable Ethernet Wake-on-LAN
|
||||
''ACTION=="add", SUBSYSTEM=="net", NAME=="enp*", RUN+="${pkgs.ethtool}/sbin/ethtool -s $name wol d"''
|
||||
];
|
||||
services.upower.enable = true;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [./default.nix];
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.wifi.backend = "iwd";
|
||||
# systemd.network.networks.loop = {
|
||||
# matchConfig.Name = "lo";
|
||||
# linkConfig.RequiredForOnline = false;
|
||||
# networkConfig.KeepConfiguration = true;
|
||||
# };
|
||||
systemd.network.networks.wifi = {
|
||||
matchConfig.Name = "wlan0";
|
||||
linkConfig.RequiredForOnline = false;
|
||||
networkConfig.KeepConfiguration = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.networkmanager-openvpn
|
||||
gnome.gnome-power-manager
|
||||
gnomeExtensions.pop-shell
|
||||
];
|
||||
programs.kdeconnect.package = pkgs.gnomeExtensions.gsconnect;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
../hardware/network.nix
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
# command = "${pkgs.greetd.greetd}/bin/agreety --cmd sway";
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -r --remember-user-session --asterisks --cmd sway";
|
||||
# missing compositor
|
||||
# command = "${pkgs.greetd.wlgreet}/bin/wlgreet --command sway";
|
||||
};
|
||||
};
|
||||
# package = pkgs.greetd.tuigreet;
|
||||
# package = pkgs.greetd.wlgreet;
|
||||
# package = pkgs.greetd.gtkgreet;
|
||||
# package = pkgs.greetd.regreet;
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures = { gtk = true; };
|
||||
extraPackages = with pkgs; [
|
||||
alacritty
|
||||
swayidle
|
||||
swaylock-effects
|
||||
mako
|
||||
bemenu
|
||||
# - bar
|
||||
i3blocks
|
||||
acpi
|
||||
lm_sensors
|
||||
# - tools
|
||||
wl-clipboard
|
||||
wdisplays
|
||||
ponymix
|
||||
brightnessctl
|
||||
gammastep
|
||||
grim
|
||||
slurp
|
||||
];
|
||||
};
|
||||
location.provider = "geoclue2";
|
||||
|
||||
xdg.portal.wlr = {
|
||||
enable = true;
|
||||
settings.screencast = {
|
||||
chooser_type = "simple";
|
||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||
};
|
||||
};
|
||||
|
||||
# done my sway:
|
||||
# security.pam.services.swaylock = {};
|
||||
# hardware.opengl.enable = true;
|
||||
# fonts.enableDefaultFonts = true;
|
||||
# programs.dconf.enable = true; # gtk theme
|
||||
|
||||
# services.acpid.enable = true;
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
environment.etc."tmux.conf".text = ''
|
||||
# make tmux display things in 256 colors
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# set scrollback history to 10000 (10k)
|
||||
set -g history-limit 10000
|
||||
|
||||
# use send-prefix to pass C-a through to application
|
||||
bind C-a send-prefix
|
||||
|
||||
# shorten command delay
|
||||
set -sg escape-time 1
|
||||
|
||||
# set window and pane index to 1 (0 by default)
|
||||
set-option -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# reload ~/.tmux.conf using PREFIX r
|
||||
bind r source-file /etc/tmux.conf \; display "Reloaded!"
|
||||
|
||||
# use PREFIX | to split window horizontally and PREFIX - to split vertically
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
|
||||
# Make the current window the first window
|
||||
bind T swap-window -t 1
|
||||
|
||||
# map Vi movement keys as pane movement keys
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# and use C-h and C-l to cycle thru panes
|
||||
bind -r C-h select-window -t :-
|
||||
bind -r C-l select-window -t :+
|
||||
|
||||
# resize panes using PREFIX H, J, K, L
|
||||
bind H resize-pane -L 5
|
||||
bind J resize-pane -D 5
|
||||
bind K resize-pane -U 5
|
||||
bind L resize-pane -R 5
|
||||
|
||||
set -g mouse on
|
||||
|
||||
######################
|
||||
### DESIGN CHANGES ###
|
||||
######################
|
||||
|
||||
# panes
|
||||
set -g pane-border-style fg=black
|
||||
set -g pane-active-border-style fg=brightred
|
||||
|
||||
## Status bar design
|
||||
# status line
|
||||
##set -g status-utf8 on
|
||||
set -g status-justify left
|
||||
set -g status-style bg=default,fg=colour12
|
||||
set -g status-interval 2
|
||||
|
||||
# messaging
|
||||
set -g message-style fg=black,bg=yellow
|
||||
set -g message-command-style fg=blue,bg=black
|
||||
|
||||
#window mode
|
||||
setw -g mode-style bg=colour6,fg=colour0
|
||||
|
||||
# window status
|
||||
setw -g window-status-separator ""
|
||||
setw -g window-status-style bg=colour234,fg=colour7
|
||||
setw -g window-status-format "#[fg=colour234]#[fg=white,bold]#I#[nobold] #W #[reverse,fg=colour234]"
|
||||
setw -g window-status-current-style bg=colour240
|
||||
setw -g window-status-current-format "#[fg=colour234]#[fg=white,bold]#I#[nobold] #W #[reverse,fg=colour234]"
|
||||
|
||||
setw -g window-status-bell-style fg=black,bg=colour1,bold
|
||||
|
||||
|
||||
# loud or quiet?
|
||||
set-option -g visual-activity off
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-window-option -g monitor-activity off
|
||||
set-option -g bell-action none
|
||||
|
||||
# The modes {
|
||||
setw -g clock-mode-colour colour135
|
||||
setw -g mode-style fg=colour196,bg=colour238,bold
|
||||
|
||||
# }
|
||||
# The panes {
|
||||
|
||||
set -g pane-border-style bg=colour235,fg=colour238
|
||||
set -g pane-active-border-style bg=colour236,fg=colour51
|
||||
|
||||
# }
|
||||
# The statusbar {
|
||||
|
||||
set -g status-position top
|
||||
set -g status-style bg=colour16,fg=colour137
|
||||
set -g status-left "#[bg=colour202,fg=colour15,bold]#h #[reverse,fg=colour12,nobold]#[reverse,bg=colour15] #S(#{session_attached}) #I-#P #[bg=colour232,noreverse,nobold]"
|
||||
set -g status-right "#[fg=colour14,nobold]#[reverse,bg=colour15] #{client_prefix} #[reverse,bg=colour13]#[noreverse,fg=colour15] %H:%M:%S"
|
||||
set -g status-right-length 30
|
||||
set -g status-left-length 26
|
||||
|
||||
# }
|
||||
# The messages {
|
||||
|
||||
set -g message-style fg=colour16,bg=colour202,bold
|
||||
|
||||
# }
|
||||
'';
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{pkgs, config, ... }:
|
||||
{
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_14;
|
||||
dataDir = "/var/lib/postgres/${config.services.postgresql.package.psqlSchema}";
|
||||
# dataDir = /var/lib/postgres/data;
|
||||
};
|
||||
|
||||
users.users.genofire = {
|
||||
uid = 1021;
|
||||
home = "/home/genofire";
|
||||
extraGroups = ["wheel"];
|
||||
isNormalUser = true;
|
||||
useDefaultShell = true;
|
||||
};
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [../default.nix];
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# zfs
|
||||
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
#boot.kernelParams = [ "nohibernate" ];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||
services.zrepl = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global.monitoring = [{
|
||||
type = "prometheus";
|
||||
listen = ":9091";
|
||||
}];
|
||||
jobs = [{
|
||||
name = "fireStore";
|
||||
type = "source";
|
||||
serve = {
|
||||
type = "stdinserver";
|
||||
client_identities = [ "fireStore" ];
|
||||
};
|
||||
snapshotting = {
|
||||
type = "periodic";
|
||||
interval = "24h";
|
||||
prefix = "zrepl_fireStore_";
|
||||
};
|
||||
send.encrypted = false;
|
||||
filesystems = {
|
||||
"zroot/ROOT<" = true;
|
||||
"zroot/ROOT" = false;
|
||||
"zroot/local<" = false;
|
||||
"zroot/local/nix" = false;
|
||||
"zroot/data<" = true;
|
||||
"zroot/data" = false;
|
||||
"zroot/home<" = true;
|
||||
"zroot/home" = false;
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
networking.useNetworkd = true;
|
||||
networking.useDHCP = false;
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
android-udev-rules
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
wireguard-tools
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
# vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
];
|
||||
|
||||
systemd.network.networks.wifi = {
|
||||
matchConfig = {
|
||||
Name = "wlan0";
|
||||
SSID = [
|
||||
"!HotoHo-v6"
|
||||
];
|
||||
};
|
||||
DHCP = "ipv4";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = true;
|
||||
IPv6PrivacyExtensions = true;
|
||||
};
|
||||
};
|
||||
systemd.network.networks.wifi-v6 = {
|
||||
matchConfig = {
|
||||
Name = "wlan0";
|
||||
SSID = [
|
||||
"urbanForest-v6"
|
||||
];
|
||||
};
|
||||
networkConfig = {
|
||||
DNSSEC = false;
|
||||
IPv6AcceptRA = true;
|
||||
IPv6PrivacyExtensions = true;
|
||||
};
|
||||
};
|
||||
systemd.network.networks.wifi-unsec = {
|
||||
matchConfig = {
|
||||
Name = "wlan0";
|
||||
SSID = [
|
||||
"wanderverein" # fake to keep
|
||||
# "urbanForest"
|
||||
];
|
||||
};
|
||||
DHCP = "ipv4";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = true;
|
||||
IPv6PrivacyExtensions = true;
|
||||
DNSSEC = false;
|
||||
DNS = [
|
||||
"2001:4860:4860::8888"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
dhcpV4Config = {
|
||||
UseDomains = false;
|
||||
UseDNS = false;
|
||||
};
|
||||
dhcpV6Config = {
|
||||
UseDNS = false;
|
||||
};
|
||||
ipv6AcceptRAConfig = {
|
||||
UseDNS = false;
|
||||
};
|
||||
};
|
||||
systemd.network.networks.eth = {
|
||||
matchConfig.Name = "en*";
|
||||
DHCP = "ipv4";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = true;
|
||||
IPv6PrivacyExtensions = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
# k8s api
|
||||
6443
|
||||
# metrics-server
|
||||
10250
|
||||
];
|
||||
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
extraFlags = toString [
|
||||
"--disable traefik,metrics-server" # manuelle ... with ipv6 enable
|
||||
];
|
||||
};
|
||||
systemd.services.k3s = {
|
||||
wants = [ "containerd.service" ];
|
||||
after = [ "containerd.service" ];
|
||||
serviceConfig.MemoryMax = "2G";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
k3s
|
||||
k9s
|
||||
kubectl
|
||||
];
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
imports = [
|
||||
./default.nix
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
443
|
||||
];
|
||||
|
||||
# for quic3 - max size to 2.5MB
|
||||
boot.kernelParams = [
|
||||
"net.core.rmem_max=2500000"
|
||||
"net.core.wmem_max=2500000"
|
||||
];
|
||||
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
staticConfigOptions = {
|
||||
experimental.http3 = true;
|
||||
entryPoints = {
|
||||
web = {
|
||||
address = ":80";
|
||||
};
|
||||
websecure = {
|
||||
address = ":443";
|
||||
http3 = {};
|
||||
};
|
||||
};
|
||||
providers = {
|
||||
kubernetesIngress = {
|
||||
allowEmptyServices = true;
|
||||
allowExternalNameServices = true;
|
||||
};
|
||||
kubernetesCRD = {
|
||||
allowCrossNamespace = true;
|
||||
allowEmptyServices = true;
|
||||
allowExternalNameServices = true;
|
||||
};
|
||||
};
|
||||
api.dashboard = true;
|
||||
metrics.prometheus.entryPoint = "websecure";
|
||||
certificatesResolvers.letsencrypt.acme = {
|
||||
storage = "/var/lib/traefik/acme/acme.json";
|
||||
caServer = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
tlsChallenge = {};
|
||||
};
|
||||
};
|
||||
dynamicConfigOptions = {
|
||||
http.middlewares = {
|
||||
"redirect-https".redirectScheme = {
|
||||
scheme = "https";
|
||||
permanent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.traefik.environment = {
|
||||
KUBECONFIG = "/var/lib/traefik/k3s-kubeconfig.yaml";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue