fix: dump current state

This commit is contained in:
genofire 2023-03-20 22:59:54 +01:00
parent dc756f87b8
commit b30cff45db
7 changed files with 186 additions and 82 deletions

View File

@ -19,11 +19,11 @@
])) ]))
ansible ansible
killall killall
tree exa
# tree # use exa
htop htop
mosh mosh
dasel dasel
git
pre-commit pre-commit
git-lfs git-lfs
git-crypt git-crypt
@ -81,9 +81,10 @@
k9sctx = "k9s --kubeconfig=$(switch)"; k9sctx = "k9s --kubeconfig=$(switch)";
k9s = "k9s --headless"; k9s = "k9s --headless";
kubectx = "export KUBECONFIG=$(switch)"; kubectx = "export KUBECONFIG=$(switch)";
ls = "exa";
}; };
programs.home-manager.enable = true; programs.home-manager.enable = false; # use OS
programs.password-store = { programs.password-store = {
enable = true; enable = true;
@ -124,7 +125,6 @@
}; };
programs.starship = { programs.starship = {
enable = true; enable = true;
# enableNushellIntegration = true;
settings = { settings = {
directory ={ directory ={
truncation_length = 0; truncation_length = 0;
@ -141,11 +141,25 @@
}; };
}; };
}; };
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.direnv.enable = true;
programs.btop.enable = true; programs.btop.enable = true;
programs.tealdeer.enable = true; # man / tldr ... programs.tealdeer.enable = true; # man / tldr ...
programs.gitui.enable = true; programs.gitui.enable = true;
programs.git = {
enable = true;
extraConfig.init.defaultBranch = "main";
};
programs.neovim = { programs.neovim = {
enable = false; enable = false;
extraConfig = '' extraConfig = ''
@ -174,6 +188,11 @@
}; };
}; };
services.syncthing = {
enable = true;
tray.enable = true;
};
programs.k9s = { programs.k9s = {
enable = true; enable = true;
# does not open ERROR with clusters settings # does not open ERROR with clusters settings

View File

@ -2,11 +2,6 @@
{ {
imports = [./desktop.nix]; imports = [./desktop.nix];
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
MOZ_WEBRENDER = 1;
};
dconf.settings = { dconf.settings = {
"org/gnome/mutter" = { "org/gnome/mutter" = {
# display: partly scale (like 150% or 125%) # display: partly scale (like 150% or 125%)
@ -58,6 +53,9 @@
}; };
}; };
# programs.firefox.nativeMessagingHosts.gsconnect = true;
programs.firefox.enableGnomeExtensions = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
tilix tilix
gnome.gnome-tweaks gnome.gnome-tweaks

View File

@ -1,6 +1,10 @@
{ config, pkgs, lib, ...}: { config, pkgs, lib, ...}:
with lib;
let let
cfg = config.my.sway; 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 in
{ {
imports = [./desktop.nix]; imports = [./desktop.nix];
@ -33,13 +37,23 @@ in
}; };
}; };
config = { config = mkMerge [
(mkIf cfg.KDEConnect {
services.kdeconnect = {
enable = true;
indicator = true;
};
})
{
home.sessionVariables = { home.sessionVariables = {
_JAVA_AWT_WM_NONREPARENTING = "1";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
XDG_CURRENT_DESKTOP = "sway"; XDG_CURRENT_DESKTOP = "sway";
MOZ_ENABLE_WAYLAND = 1;
MOZ_WEBRENDER = 1;
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# sway # sway
# alacritty # alacritty
@ -61,6 +75,29 @@ in
# wdisplays # wdisplays
]; ];
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 = wayland.windowManager.sway =
let let
ws1 = "1💬"; ws1 = "1💬";
@ -77,7 +114,7 @@ in
white = "#ffffff"; white = "#ffffff";
cyan = "#00afd7"; cyan = "#00afd7";
acqua = "#00d787"; aqua = "#00d787";
violet = "#800080"; violet = "#800080";
wine = "#72003e"; wine = "#72003e";
magenta = "#af005f"; magenta = "#af005f";
@ -108,49 +145,52 @@ in
}; };
output = { output = {
"*".bg = "~/.config/wallpaper.png fill"; "*".bg = "~/.config/wallpaper.png fill";
# fireThink ## fireThink
"Unknown 0x226D 0x00000000" = { #"Unknown 0x226D 0x00000000" = {
enable = ""; # enable = "";
}; #};
# fireG0 ## fireG0
"Unknown 0x405C 0x00000000" = { #"Unknown 0x405C 0x00000000" = {
position = "0 0"; # position = "0 0";
# scale = "0.7"; # # scale = "0.7";
# resolution = "1920x1080"; # # resolution = "1920x1080";
resolution = "1366x768@60Hz"; # resolution = "1366x768@60Hz";
}; #};
# fireEmerald ## fireEmerald
"Unknown 0x364C 0x00000000" = { #"Unknown 0x364C 0x00000000" = {
position = "0 0"; # position = "0 0";
scale = "1.25"; # scale = "1.25";
}; # # does it work?
"Japan Display Inc. 0x364C Unknown" = { # enable = "";
position = "0 0"; #};
scale = "1.25"; #"Japan Display Inc. 0x364C Unknown" = {
}; # position = "0 0";
"LG Electronics LG HDR 4K 0x0000655D" = { # scale = "1.25";
position = "2400 0"; # enable = "";
enable = ""; #};
scale = "1.0"; #"LG Electronics LG HDR 4K 0x0000655D" = {
# disable = true; # position = "2400 0";
# resolution = "3840x2160@30Hz"; # enable = "";
resolution = "3840x2160"; # scale = "1.0";
}; # # disable = true;
"Goldstar Company Ltd LG HDR 4K 0x0000655D" = { # # resolution = "3840x2160@30Hz";
position = "2400 0"; # resolution = "3840x2160";
enable = ""; #};
scale = "1.0"; #"Goldstar Company Ltd LG HDR 4K 0x0000655D" = {
# disable = true; # position = "2400 0";
# resolution = "3840x2160@30Hz"; # enable = "";
resolution = "3840x2160"; # scale = "1.0";
}; # # disable = true;
"HEADLESS-1" = { # # resolution = "3840x2160@30Hz";
resolution = "2560x1440"; # resolution = "3840x2160";
}; #};
"DP-1" = { #"HEADLESS-1" = {
position = "3000 0"; # resolution = "2560x1440";
# resolution = "2560x1440"; #};
}; #"DP-1" = {
# position = "3000 0";
# # resolution = "2560x1440";
#};
# "DP-2" = { # "DP-2" = {
# position = "1920 0"; # position = "1920 0";
# # position = "4480 0"; # # position = "4480 0";
@ -178,8 +218,8 @@ in
# focusedStatusline = "${white}"; # focusedStatusline = "${white}";
background = "${black}"; background = "${black}";
# focusedBackground = "${transparent}"; # focusedBackground = "${transparent}";
activeWorkspace = { background = "${cyan}"; border = "${gray}"; text = "${white}"; }; activeWorkspace = { background = "${gray}"; border = "${gray}"; text = "${white}"; };
focusedWorkspace = { background = "${cyan}"; border = "${cyan}"; text = "${white}"; }; focusedWorkspace = { background = "${cyan}"; border = "${gray}"; text = "${white}"; };
inactiveWorkspace = { background = "${black}"; border = "${black}"; text = "${orange}"; }; inactiveWorkspace = { background = "${black}"; border = "${black}"; text = "${orange}"; };
urgentWorkspace = { background = "${magenta}"; border = "${magenta}"; text = "${white}"; }; urgentWorkspace = { background = "${magenta}"; border = "${magenta}"; text = "${white}"; };
bindingMode = { background = "${orange}"; border = "${orange}"; text = "${white}"; }; bindingMode = { background = "${orange}"; border = "${orange}"; text = "${white}"; };
@ -295,7 +335,7 @@ in
"${modifier}+p" = "exec passmenu"; "${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"''; "${modifier}+F11" = ''exec "${lock}"'';
"Print" = ''exec "grim -g \"$(slurp)\""''; "Print" = ''exec "grim -g \"$(slurp)\""'';
}; };
assigns = { assigns = {
@ -336,14 +376,14 @@ in
]; ];
}; };
startup = [ startup = [
{ command = "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK"; } # { 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 = "hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK" ; }
{ command = "swayidle -w \\ # { 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 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' \\ # timeout 600 'swaymsg output * dpms off' \\
resume 'swaymsg output * dpms on' \\ # 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'"; } # 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 = "mako"; }
#{ command = "kanshi"; } #{ command = "kanshi"; }
# indicator # indicator
{ command = "networkd-notify"; } { command = "networkd-notify"; }
@ -354,10 +394,6 @@ in
# apps # apps
{ command = "firefox"; } { command = "firefox"; }
#{ command = "firefoxdeveloperedition"; } #{ command = "firefoxdeveloperedition"; }
] ++ lib.optionals (cfg.KDEConnect) [
{ command = "/usr/lib/kdeconnectd"; }
{ command = "${pkgs.libsForQt5.kdeconnect-kde}/libexec/kdeconnectd"; }
{ command = "kdeconnect-indicator"; }
] ++ lib.optionals (cfg.mail) [ ] ++ lib.optionals (cfg.mail) [
{ command = "thunderbird"; } { command = "thunderbird"; }
] ++ lib.optionals (cfg.nextcloud) [ ] ++ lib.optionals (cfg.nextcloud) [
@ -367,6 +403,23 @@ in
#{ command = "gajim"; } #{ 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 .... # use nixos's ....
@ -515,5 +568,5 @@ label=⏰
command=date '+%T' command=date '+%T'
interval=1 interval=1
''; '';
}; }];
} }

View File

@ -3,8 +3,11 @@
imports = [./default.nix]; imports = [./default.nix];
home.sessionVariables = { home.sessionVariables = {
BROWSER = "firefox";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
BROWSER = "firefox";
GDK_BACKEND = "wayland";
MOZ_ENABLE_WAYLAND = "1";
MOZ_WEBRENDER = "1";
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
@ -52,7 +55,7 @@
graphviz-nox graphviz-nox
# - tootle # mastodon # - tootle # mastodon
# fractal # matrix # fractal # matrix
fractal-next # TODO fractal-next
# fluffychat # fluffychat
cozy # audiobooks cozy # audiobooks
]; ];
@ -63,6 +66,7 @@
# name = "Yaru-dark"; # name = "Yaru-dark";
package = pkgs.flat-remix-gtk; package = pkgs.flat-remix-gtk;
name = "Flat-Remix-GTK-Blue-Darkest";
# name = "Flat-Remix-GTK-Blue-Darkest-NoBorder"; # name = "Flat-Remix-GTK-Blue-Darkest-NoBorder";
# name = "Flat-Remix-GTK-Blue-Darker"; # name = "Flat-Remix-GTK-Blue-Darker";
}; };
@ -95,9 +99,22 @@
enable = true; enable = true;
browsers = ["firefox"]; browsers = ["firefox"];
}; };
programs.librewolf = {
enable = false;
settings = {
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.downloads" = false;
"browser.sessionstore.privacy_level" = 0;
};
};
programs.firefox = { programs.firefox = {
enable = true; enable = true;
# nixos not home-manager
# nativeMessagingHosts = {
# fxCast = true;
#};
# package = pkgs.firefox-beta-bin;
# # package = pkgs.firefox-devedition-bin;
# package = pkgs.librewolf; # package = pkgs.librewolf;
# package = pkgs.firefox-devedition-bin-unwrapped;
}; };
} }

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

@ -3,7 +3,9 @@
# 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.optimise.automatic = true;
@ -17,12 +19,14 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
passwordAuthentication = false;
kbdInteractiveAuthentication = false;
permitRootLogin = "without-password";
openFirewall = true; openFirewall = true;
ports = [ 1512 ]; ports = [ 1512 ];
startWhenNeeded = true; startWhenNeeded = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "without-password";
};
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"command=\"zrepl stdinserver fireStore\",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1U9DTKueKuTuu/F9wxGr3we7y00V8HMyUjVBMwFQwo root-zrepl@fireStore" "command=\"zrepl stdinserver fireStore\",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1U9DTKueKuTuu/F9wxGr3we7y00V8HMyUjVBMwFQwo root-zrepl@fireStore"
@ -56,10 +60,11 @@
jq jq
unzip unzip
unrar unrar
home-manager
## nice prompt together with grml ## nice prompt together with grml
# pure-prompt # pure-prompt
nushell nushell
] ++ [
pkgsHomeManager.home-manager
]; ];
environment.shellAliases = { environment.shellAliases = {
ip = "ip --color"; ip = "ip --color";
@ -119,7 +124,9 @@
}; };
}; };
# tmux imports = [
imports = [ ./files/tmux.nix ]; # tmux
./files/tmux.nix
];
} }

View File

@ -10,6 +10,7 @@
extraGroups = ["wheel"]; extraGroups = ["wheel"];
isNormalUser = true; isNormalUser = true;
useDefaultShell = true; useDefaultShell = true;
# shell = pkgs.nushell;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIOr9wE3i1+Cl/06WOf0/6OjxsOnN7veV3LZcWgtHkcS genofire@fireYubi" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIOr9wE3i1+Cl/06WOf0/6OjxsOnN7veV3LZcWgtHkcS genofire@fireYubi"
]; ];