Compare commits

...

120 Commits

Author SHA1 Message Date
genofire 76ae1ed41b fix(home)!: reogranize 2023-08-20 12:10:14 +02:00
genofire 48927ca38a dump
feat(hardware): add android to udev
fix(home/desktop): use new gtk-theme Colloid
fix(home/default): update golang to latest
2023-08-20 11:25:57 +02:00
genofire ff4a62fb51 folder restructur 2023-07-18 20:31:23 +02:00
genofire 330aded669 dump 2023-07-09 23:25:45 +02:00
genofire 6b6dc1eb2a improve sway 2023-07-07 23:22:02 +02:00
genofire 7afbd98bd0 fix: i18n in US 2023-06-15 02:23:09 +02:00
genofire 7cec90c2f2 update 2023-06-14 18:41:21 +02:00
genofire b30cff45db fix: dump current state 2023-03-20 22:59:54 +01:00
genofire dc756f87b8 feat(nixos): add default for nix container 2023-01-13 22:33:15 +01:00
genofire 0e2e500739 fix!(backup): try nushell, btop, rustup replace cargo and much more tools (like for k8s) 2023-01-13 22:27:03 +01:00
genofire abcabee811 fix(editor): replace neovim with helix 2023-01-13 22:27:03 +01:00
genofire 36e47947bd fix(prompt): switch from pure-prompt to starship 2023-01-13 22:27:03 +01:00
genofire 2dc698c8ab fix(nixos): networkd vs. NetworkManager during nixos-rebuild 2023-01-13 22:27:03 +01:00
genofire 0e18524a24 fix(home/chromium): fix and update extensions 2023-01-13 22:26:34 +01:00
genofire a80f9cb2e8 feat(home): add chromium 2023-01-13 22:23:42 +01:00
genofire 2da7cd2ea7 home/nixos: fix kdeconnect under sway 2022-07-23 15:00:17 +02:00
genofire 58b2e5cce0 home: default disable dino 2022-07-23 11:54:07 +02:00
genofire fd01cf370c nixos/home: improve vim 2022-07-23 11:53:42 +02:00
genofire 3e44bcc52f home: password manager with otp 2022-07-23 08:50:22 +02:00
genofire 050d3d57e7 nixos: new yubikey with curved key 2022-07-23 08:49:55 +02:00
genofire e7d4e90e4a zsh: switch from starship+atuin to grml+pure - cleanup 2022-07-08 09:57:22 +02:00
genofire f2cd5f96f2 chore(nixos): gnome keybind 2022-07-08 09:49:16 +02:00
genofire 5ea77333b4 switch from starship+atuin to grml+pure 2022-07-08 09:48:56 +02:00
genofire 85cc291fd4 chore(nixos): wifi and power 2022-07-05 22:39:45 +02:00
genofire 8efe99074d nixos: move from grml to starship 2022-07-05 22:38:53 +02:00
genofire f7bc43fce0 home: improve firefox 2022-07-05 22:37:58 +02:00
genofire c54639a536 home: fix golang + add rust / cargo 2022-07-05 22:37:17 +02:00
genofire 18f0160c49 home: add speedtest 2022-07-05 22:36:51 +02:00
genofire f41f6591b3 home: move from grml to starship+atuin 2022-07-05 22:36:31 +02:00
genofire a854d5a602 home: add gnome keybindings / shortcuts 2022-07-05 22:34:58 +02:00
genofire 8f2104599f home: more tools 2022-06-06 23:12:18 +02:00
genofire 288e3c4cff home: browser 2022-06-06 23:08:01 +02:00
genofire 920f107388 nixos/default: add bmon 2022-04-08 20:30:07 +02:00
genofire c25f7997ab home/default: add tree for listing files over folders 2022-04-08 20:24:26 +02:00
genofire 90c8802883 home/default: add k8s tool - kubectl 2022-04-08 20:11:24 +02:00
genofire 7b3e923bb6 home/default: add wget 2022-04-08 20:11:10 +02:00
genofire 8889d6ac24 home/desktop: add graphical tools 2022-04-08 20:10:51 +02:00
genofire 15b7f85589 nixos/desktop-sway: add location provider 2022-04-08 20:05:41 +02:00
genofire 18e717b3b2 home/default: improve git tools 2022-04-08 20:01:35 +02:00
genofire 1f51dd2424 home: add k8s tools 2022-04-08 20:01:06 +02:00
genofire bd92691a60 home/desktop: add onlyoffice and libreoffice 2022-04-08 19:57:38 +02:00
genofire aa04e9cdf0 home: desktop add evince for pdf 2022-04-08 19:54:04 +02:00
genofire 2c93bde9cb home: sway - black bar 2022-02-25 21:31:06 +01:00
genofire 9f53453e3a home: add ghorg 2022-02-23 22:22:18 +01:00
genofire 0e4b1207a0 home/chrome: add wayland/pipeware support 2022-02-23 22:22:18 +01:00
genofire 8083563206 home: fix sway opacity 2022-02-23 22:14:04 +01:00
genofire e4cefd323c home: add gthumb and fluffychat 2022-02-23 22:13:52 +01:00
genofire 21eda88027 home/sway: fix font after update 2022-01-24 20:02:24 +01:00
genofire 72128d7f41 home: rename of dconf 2022-01-23 22:45:17 +01:00
genofire f76b3e4c3b home/chrome: add vertical tabs 2022-01-23 22:43:31 +01:00
genofire d90f0abf5c nixos/default: rename openssh.kbdInteractiveAuthentication 2022-01-23 22:43:00 +01:00
genofire 847d4500ba home: update chrome ublock 2022-01-14 16:41:04 +01:00
genofire 677821fee4 home: improve theme docu + use Yaru/Ubuntu icons 2022-01-14 16:39:38 +01:00
genofire 67874d12b3 nixos: add bat as cat with syntax 2022-01-06 09:06:54 +01:00
genofire 1d5c402503 home: add chrome-support 2021-12-31 14:14:19 +01:00
genofire c23a57a21a home: add sway i3blocks 2021-12-17 22:44:19 +01:00
genofire 9287ae33bb home: xwayland now upstream 2021-12-17 22:43:46 +01:00
genofire 8ea023fce8 home/desktop-sway: workround for xwayland disable 2021-12-15 23:35:11 +01:00
genofire a8c930f589 home: fix import 2021-12-14 10:12:47 +01:00
genofire fa4b52168f home: easier import 2021-12-13 22:49:23 +01:00
genofire 20158d71a4 home: move desktop naming 2021-12-13 22:46:26 +01:00
genofire 1c4cfbe63e home/desktop: add gotify-desktop 2021-12-13 22:42:43 +01:00
genofire 4a2b226739 home: ansible/python with passlib / bcrypt 2021-12-02 23:32:00 +01:00
genofire 582c7e969d home: gnome tools 2021-12-02 23:31:38 +01:00
genofire 4cc1a69110 home: gnome with scale 2021-12-02 23:31:26 +01:00
genofire 63c0fa7a1f nixos: fix network only on sway with systemd-networkd 2021-12-02 23:30:42 +01:00
genofire 641a558528 nixos: fix kdeconnect (and add gnomeExtensions) 2021-12-02 23:29:56 +01:00
genofire 6debd358e6 fix(nixos): gdm and add iwd 2021-11-26 21:14:59 +01:00
genofire 877fc0f997 home: add gnome 2021-11-26 21:13:18 +01:00
genofire 2db41e0489 nixos: add gnome 2021-11-26 20:03:09 +01:00
genofire 01b7e061fc home,nixos: add hw to firefox 2021-11-26 18:31:47 +01:00
genofire a126559750 home/default: add minio-client and terraform 2021-11-19 20:48:32 +01:00
genofire 9952b76d7d home: python lib for ansible 2021-11-19 20:41:07 +01:00
genofire 5b3dede64b home/sway: add mako 2021-11-14 21:01:57 +01:00
genofire 101fa886c8 fix(home/sway): add brightness support 2021-11-14 20:15:51 +01:00
genofire d26623cc9a home/sway: make startup (and xwayland) optional - intent 2021-11-13 23:15:39 +01:00
genofire 61f614fb9c home/sway: make startup (and xwayland) optional 2021-11-13 23:14:42 +01:00
genofire 1caa0314e1 nixos: fix sway on xdg.portal.wlr screensharing 2021-11-13 22:07:35 +01:00
genofire 5786aded9d home: direnv, imagemagick, pre-commit 2021-11-13 22:06:43 +01:00
genofire 1a8f5640d6 nixos: add unrar/unzip 2021-11-06 13:14:33 +01:00
genofire 77d1fe8bd0 nixos: add bluetooth support 2021-11-06 13:13:46 +01:00
genofire 1deb6b8b96 nixos/sway: fix swaylock (just swaylock-effects install) 2021-11-06 13:12:48 +01:00
genofire 037cbab877 sway: add wdisplays 2021-11-06 13:12:01 +01:00
genofire af8dc3153d home: desktop themen not hardcoded 2021-11-06 13:10:53 +01:00
genofire 45b7d81eb2 home: make git configurable 2021-11-06 13:05:59 +01:00
genofire b9c340a8ee home: add youtube-dl 2021-10-28 21:05:21 +02:00
genofire 40c40945dc home/sway: monitor scale - just be save 2021-10-27 16:35:36 +02:00
genofire f1d24d39ee home: add comment for alternative gtk theme 2021-10-27 16:35:11 +02:00
genofire 683e786a60 nixos: add network tools 2021-10-27 16:19:38 +02:00
genofire 1272765bb3 nixos: fix dnssec for ipv6only networks 2021-10-27 11:54:17 +02:00
genofire 0724d0d2f9 nixos: improve wifi iwd random and thresholds 2021-10-27 01:35:00 +02:00
genofire ec816b0ebe home: add for console 2021-10-25 14:44:07 +02:00
genofire 511072b0c2 home: move gotify to default 2021-10-23 20:36:04 +02:00
genofire bb80de1cbf home: add gotify-cli on desktop 2021-10-23 20:24:05 +02:00
genofire 0e1c7aeb49 nixos/desktop: add ethernet RA 2021-10-23 19:39:06 +02:00
genofire bdd2d675bb home: deinstall tootle -> workaround, does not build 2021-10-23 17:52:44 +02:00
genofire d0d20657f3 fix(home): ansible with dnspython 2021-10-23 17:50:36 +02:00
genofire 9e01a1f6fa home: add ffmpeg to default 2021-10-23 17:50:04 +02:00
genofire 44aef90e3f nixos/default: add my tmux config ;) 2021-10-15 19:50:54 +02:00
genofire 6a27d9b52c nixos/default: zsh aliases for color 2021-10-15 19:41:03 +02:00
genofire 0b56fd5af6 nixos/default: open mosh firewall 2021-10-15 19:33:20 +02:00
genofire f17138bcbc nixos: network accept ra on wifi 2021-10-15 19:32:20 +02:00
genofire d2bec4151a home: add cheese to desktop 2021-10-15 11:56:03 +02:00
genofire 3b4c9ea8bb nixos: add server.nix for monitoring 2021-10-15 02:14:09 +02:00
genofire e4b13361f3 nixos: open hardware for zrepl and prometheus 2021-10-15 01:52:30 +02:00
genofire 02d9d7d911 home: add yarn to default :( 2021-10-15 01:44:37 +02:00
genofire f3444de1dc nixos: add jq to default 2021-10-15 01:11:05 +02:00
genofire c564857aa4 nixos: adjust ssh 2021-10-14 23:02:41 +02:00
genofire 691893cde9 nixos: add some default-hardware tools 2021-10-14 16:32:06 +02:00
genofire 2b96ebb4d6 home: add pwgen to default 2021-10-14 16:30:31 +02:00
genofire 278aeba9e4 home: add virt-manager 2021-10-13 17:33:03 +02:00
genofire d0a3f80139 nixos: firewall allow llmnr 2021-10-13 17:32:49 +02:00
genofire 9d0fd9fe5a nixos: add zrepl 2021-10-13 17:32:28 +02:00
genofire def929e652 nixos: optimize nix-store 2021-10-13 01:13:27 +02:00
genofire 86e6bd6184 home->nixos: restructure sway 2021-10-13 00:48:07 +02:00
genofire ab01192de5 home: sway fix keybindings for window 2021-10-11 12:12:41 +02:00
genofire 2a1af4a61c home: kdeconnect 2021-10-11 11:37:10 +02:00
genofire 96071612a7 home: devops (ansible) + cozy (audiobook) 2021-10-10 21:23:53 +02:00
genofire 7ba5c282e0 home: reuse from programs.sway - WIP 2021-10-10 14:08:20 +02:00
genofire e62982f5cc nixos: reuse from programs.sway 2021-10-10 14:06:53 +02:00
30 changed files with 1994 additions and 545 deletions

View File

@ -1,14 +1,27 @@
# Home-Manager # 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: Create `~/.config/nixpkgs/home.nix` with:
```nix ```nix
{pkgs, ...}: {pkgs, ...}:
{ {
imports = [ imports = [
./repo/default.nix ./repo/desktop-gnome.nix
./repo/desktop.nix
./repo/sway.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";
} }
``` ```

9
home/console.nix Normal file
View File

@ -0,0 +1,9 @@
{pkgs, ...}:
{
imports = [./default.nix];
home.packages = with pkgs; [
poezio
iamb
];
}

View File

@ -1,60 +1,181 @@
{pkgs, ...}: {pkgs, lib, ...}:
{ {
home.sessionVariables = { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
EDITOR = "nvim"; "ookla-speedtest"
}; ];
home.packages = with pkgs; [ 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 killall
exa
# tree # use exa
htop htop
mosh mosh
git dasel
pre-commit
git-lfs git-lfs
git-crypt
git-annex
ghorg
tig tig
cocogitto
tea tea
glab glab
figlet figlet
grml-zsh-config
tmux tmux
#neovim w3m
wget
xh xh
minio-client
liboping # fix it liboping # fix it
mtr mtr
ookla-speedtest
hey
colordiff colordiff
git-annex
direnv direnv
pure-prompt ## nice prompt together with grml
#vimPlugins.nvim-lspconfig # pure-prompt
#vimPlugins.nerdtree # vimPlugins.nvim-lspconfig
# vimPlugins.nerdtree
#go_1_18
go gcc libcap go gcc libcap
go-langserver gopls
pass-wayland # cargo
rustup
yarn
cmake
pwgen
hugo
asciidoctor-with-extensions
# gotify-cli # use ntfy.sh
glow 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 = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
# broken: enableSyntaxHighlighting = true; syntaxHighlighting.enable = true;
# grml and pure enabled .... # 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 = { programs.git = {
enable = true; enable = true;
userName= "genofire";
userEmail = "geno+dev@fireorbit.de";
signing = {
signByDefault = false;
key = "386ED1BF848ABB4A6B4A3C45FC83907C125BC2BC";
};
extraConfig = { extraConfig = {
init.defaultBranch = "main"; 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 = { programs.neovim = {
enable = true; enable = false;
extraConfig = '' extraConfig = ''
syntax on syntax on
set number relativenumber 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;
#};
};
} }

View File

@ -1,67 +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;
};
}

138
home/desktop/default.nix Normal file
View File

@ -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;
};
};
}

94
home/desktop/gnome.nix Normal file
View File

@ -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
];
}

107
home/desktop/sway-i3block/battery Executable file
View File

@ -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'>&#128268;</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)

38
home/desktop/sway-i3block/wifi Executable file
View File

@ -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 ""

556
home/desktop/sway.nix Normal file
View File

@ -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
'';
}];
}

View File

@ -1,8 +0,0 @@
{pkgs, ...}:
{
imports = [
./repo/default.nix
./repo/desktop.nix
./repo/sway.nix
];
}

View File

@ -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";
};
};
}

82
home/tools/chrome.nix Normal file
View File

@ -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";
})
];
};
}

12
home/tools/codium.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
programs.vscode = {
enable = true;
package = (pkgs.vscodium.override {
# commandLineArgs = [
# "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
# "--ozone-platform=wayland"
# ];
});
};
}

81
home/tools/firefox.nix Normal file
View File

@ -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;
}
'';
};
};
}

33
home/tools/podman.nix Normal file
View File

@ -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"}]
}
}
}
'';
}

View File

@ -35,3 +35,12 @@ Create `/etc/nixos/configuration.nix` with:
``` ```
and run `nixos-rebuild switch --upgrade` 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
```

View File

@ -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" ;
};
};
}

View File

@ -3,56 +3,134 @@
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, pkgs, ... }:
let
pkgsHomeManager = import <home-manager> {};
in
{ {
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
nix.optimise.automatic = true;
nix.gc.automatic = true;
nixpkgs.config.allowUnfree = true;
# boot networking.useDHCP = false;
boot.loader.systemd-boot.enable = true; # for k3s
boot.loader.efi.canTouchEfiVariables = true; #networking.firewall.enable = true; # is already enabled ...
# zfs networking.firewall.allowedUDPPorts = [ 5355 ]; # LLMNR
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
boot.supportedFilesystems = [ "zfs" ];
#boot.kernelParams = [ "nohibernate" ];
services.zfs.autoScrub.enable = true;
networking.useNetworkd = true; services.openssh = {
networking.useDHCP = false; enable = true;
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"; time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_IE.UTF-8"; i18n.defaultLocale = "en_IE.UTF-8";
console = { i18n.supportedLocales = [
font = "Lat2-Terminus16"; "en_US.UTF-8/UTF-8"
keyMap = "de"; "en_IE.UTF-8/UTF-8"
}; ];
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
python3 python3
killall killall
htop htop
mosh bat
git git
git-lfs git-lfs
tig tig
figlet helix
grml-zsh-config tcpdump
tmux iperf3
neovim bmon
xh figlet
liboping tmux
mtr xh
home-manager liboping
]; mtr
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";
# zsh programs.mosh.enable = true; # open firewall
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true; programs.neovim = {
programs.zsh.autosuggestions.enable = true; enable = false;
programs.zsh.syntaxHighlighting.enable = true; defaultEditor = false;
programs.zsh.interactiveShellInit = '' configure.customRC = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc syntax on
''; set number relativenumber
programs.zsh.promptInit = ""; '';
};
# zsh
# users.defaultUserShell = pkgs.nushell;
users.defaultUserShell = pkgs.zsh;
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
];
} }

View File

@ -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;
}

14
nixos/desktop/cage.nix Normal file
View File

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
imports = [
./default.nix
../hardware/network.nix
];
services.cage = {
enable = true;
extraArguments = [
"-d"
];
};
}

66
nixos/desktop/default.nix Normal file
View File

@ -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;
}

29
nixos/desktop/gnome.nix Normal file
View File

@ -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;
}

64
nixos/desktop/sway.nix Normal file
View File

@ -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;
}

113
nixos/files/tmux.nix Normal file
View File

@ -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
# }
'';
}

View File

@ -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 = {};
}

View File

@ -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
];
}

16
nixos/hardware/intel.nix Normal file
View File

@ -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
];
};
}

View File

@ -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;
};
};
}

28
nixos/k3s/default.nix Normal file
View File

@ -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
];
}

View File

@ -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";
};
}