blabla
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,4 +2,4 @@
|
|||||||
!*.secret
|
!*.secret
|
||||||
configs/secrets.nix
|
configs/secrets.nix
|
||||||
configs/secrets-desktop.nix
|
configs/secrets-desktop.nix
|
||||||
configs/secrets-wireguard-publickeys.nix
|
configs/secrets-thinkpad.nix
|
||||||
|
217
configs/bspwm.nix
Normal file
217
configs/bspwm.nix
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager = {
|
||||||
|
lightdm = {
|
||||||
|
enable = true;
|
||||||
|
background = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.gnomeFilePath;
|
||||||
|
greeters.gtk.theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
defaultSession = "xsession";
|
||||||
|
session = [{
|
||||||
|
manage = "desktop";
|
||||||
|
name = "xsession";
|
||||||
|
start = ''exec $HOME/.xsession'';
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopManager = {
|
||||||
|
gnome.enable = true;
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
noDesktop = true;
|
||||||
|
enableXfwm = true;
|
||||||
|
thunarPlugins = [ pkgs.xfce.thunar-archive-plugin ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
layout = "us";
|
||||||
|
# Enable touchpad support.
|
||||||
|
libinput.enable = true;
|
||||||
|
updateDbusEnvironment = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.alex = { pkgs, ... }: {
|
||||||
|
services = {
|
||||||
|
# picom = {
|
||||||
|
# enable = true;
|
||||||
|
# blur = true;
|
||||||
|
# shadow = true;
|
||||||
|
# vSync = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
dunst = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
font = "SF Pro Display Regular 12";
|
||||||
|
markup = "yes";
|
||||||
|
format = "%s %p\n%b";
|
||||||
|
sort = "yes";
|
||||||
|
indicate_hidden = "no";
|
||||||
|
alignment = "center";
|
||||||
|
bounce_freq = 0;
|
||||||
|
show_age_threshold = 60;
|
||||||
|
word_wrap = "yes";
|
||||||
|
ignore_newline = "no";
|
||||||
|
geometry = "300x0-5-5";
|
||||||
|
shrink = "yes";
|
||||||
|
transparency = 0;
|
||||||
|
idle_threshold = 120;
|
||||||
|
monitor = 0;
|
||||||
|
follow = "mouse";
|
||||||
|
sticky_history = "yes";
|
||||||
|
history_length = 20;
|
||||||
|
show_indicators = "no";
|
||||||
|
line_height = 0;
|
||||||
|
separator_height = 1;
|
||||||
|
stack_duplicates = "no";
|
||||||
|
padding = 8;
|
||||||
|
horizontal_padding = 8;
|
||||||
|
separator_color = "frame";
|
||||||
|
startup_notification = true;
|
||||||
|
# dmenu = /usr/bin/dmenu -p dunst;
|
||||||
|
# browser = /usr/bin/firefox -new-tab;
|
||||||
|
icon_position = "left";
|
||||||
|
icon_path = "/usr/share/icons/Arc";
|
||||||
|
max_icon_size = 64;
|
||||||
|
};
|
||||||
|
|
||||||
|
frame = {
|
||||||
|
width = 1;
|
||||||
|
color = "#A6A6A6";
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_low = {
|
||||||
|
background = "#000000";
|
||||||
|
foreground = "#A6A6A6";
|
||||||
|
timeout = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_normal = {
|
||||||
|
background = "#000000";
|
||||||
|
foreground = "#A6A6A6";
|
||||||
|
timeout = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_critical = {
|
||||||
|
background = "#900000";
|
||||||
|
foreground = "#ffffff";
|
||||||
|
timeout = 16;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sxhkd = {
|
||||||
|
enable = true;
|
||||||
|
keybindings = {
|
||||||
|
"super + x" = "notify-send Time $(date '+%H:%M')";
|
||||||
|
"super + z" = "notify-send Battery $(cat /sys/class/power_supply/BAT0/capacity)%";
|
||||||
|
"alt + Tab" = "rofi -show window";
|
||||||
|
"super + Return" = "kitty";
|
||||||
|
"super + shift + Return" = "rofi -show drun";
|
||||||
|
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||||
|
"super {_,shift + }Tab" = "bspc node -f {next,prev}";
|
||||||
|
"super + shift + c" = "bspc node -c";
|
||||||
|
"super + a" = "bspc node @/ --flip vertical";
|
||||||
|
"super + d" = ''layer=normal; \
|
||||||
|
bspc query -N -n "focused.$\{layer\}" && layer=below; \
|
||||||
|
bspc node -l "$layer"'';
|
||||||
|
"super + {s,f,k}" =
|
||||||
|
''state={floating,fullscreen,pseudo_tiled}; \
|
||||||
|
bspc query -N -n "focused.$\{state\}" && state=tiled; \
|
||||||
|
bspc node -t "$state" '';
|
||||||
|
"super + alt + {Left,Down,Up,Right}" = "bspc node -p {west,south,north,east}";
|
||||||
|
"super + ctrl + {Left,Right,Up,Down}" = "xdo move {-x -50,-x +50,-y -50,-y +50}";
|
||||||
|
"super + ctrl + alt + {Left,Right,Up,Down}" = "xdo resize {-w -50,-w +50,-h -50,-h +50}";
|
||||||
|
"super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
|
||||||
|
"super + m" = "bspc node -s biggest";
|
||||||
|
"super + l" = "~/.bin/lock";
|
||||||
|
"super + ctrl + space" = "bspc node -p cancel";
|
||||||
|
"super + apostrophe" = "bspc node -s last";
|
||||||
|
"super + ctrl + comma" = "bspc node @/ --rotate 90";
|
||||||
|
"super + shift + comma" = "bspc node @/ --circulate forward";
|
||||||
|
"super + {1-9,0}" = "bspc desktop -f '{I,II,III,IV,V,VI,VII,VIII,IX,X}' && notify-send `bspc query -D -d --names`";
|
||||||
|
"super + shift + {1-9,0}" = "bspc node -d '{I,II,III,IV,V,VI,VII,VIII,IX,X}'";
|
||||||
|
# "XF86AudioMute" = "pulseaudio-ctl mute";
|
||||||
|
# "XF86AudioLowerVolume" = "pulseaudio-ctl down";
|
||||||
|
# "XF86AudioRaiseVolume" = "pulseaudio-ctl up";
|
||||||
|
"Print" = "flameshot gui";
|
||||||
|
"super + v" = "bspc node -g hidden";
|
||||||
|
"super + shift + v" = "bspc node {,$(bspc query -N -n .hidden |tail -n 1)} -g hidden=off -d $(bspc query -D -d focused --names) -t floating -f";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nextcloud-client = {
|
||||||
|
enable = true;
|
||||||
|
startInBackground = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
redshift = {
|
||||||
|
enable = true;
|
||||||
|
duskTime = "21:00-22:00";
|
||||||
|
dawnTime = "06:30-07:00";
|
||||||
|
package = pkgs.redshift;
|
||||||
|
};
|
||||||
|
|
||||||
|
flameshot.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
pointerCursor = {
|
||||||
|
defaultCursor = "left_ptr";
|
||||||
|
name = "elementary";
|
||||||
|
package = pkgs.pantheon.elementary-icon-theme;
|
||||||
|
};
|
||||||
|
windowManager = {
|
||||||
|
command = pkgs.lib.mkForce ''
|
||||||
|
${pkgs.bspwm}/bin/bspwm -c ~/.config/bspwm/bspwmrc &
|
||||||
|
${pkgs.xfce.xfce4-session}/bin/xfce4-session
|
||||||
|
'';
|
||||||
|
bspwm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
bspc wm --adopt-orphans
|
||||||
|
|
||||||
|
node /home/alex/Sync/windows.js
|
||||||
|
bspc subscribe monitor_add monitor_remove| while read -r a event; do
|
||||||
|
node /home/alex/Sync/windows.js
|
||||||
|
done &
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
border_width = 4;
|
||||||
|
window_gap = 5;
|
||||||
|
top_padding = 0;
|
||||||
|
left_padding = 0;
|
||||||
|
right_padding = 0;
|
||||||
|
bottom_padding = 0;
|
||||||
|
split_ratio = 0.50;
|
||||||
|
borderless_monocle = true;
|
||||||
|
single_monocle = true;
|
||||||
|
gapless_monocle = true;
|
||||||
|
focus_follows_pointer = true;
|
||||||
|
pointer_follows_monitor = true;
|
||||||
|
pointer_follows_focus = false;
|
||||||
|
center_pseudo_tiled = true;
|
||||||
|
automatic_scheme = "alternate";
|
||||||
|
remove_unplugged_monitors = true;
|
||||||
|
remove_disabled_monitors = true;
|
||||||
|
normal_border_color = "#333333";
|
||||||
|
focused_border_color = "#666666";
|
||||||
|
presel_feedback_color = "#000000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -71,7 +71,7 @@ in
|
|||||||
nix-du
|
nix-du
|
||||||
nix-tree
|
nix-tree
|
||||||
nmap
|
nmap
|
||||||
nodejs
|
nodejs-16_x
|
||||||
parallel
|
parallel
|
||||||
pciutils
|
pciutils
|
||||||
ruby
|
ruby
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowBroken = true;
|
allowBroken = true;
|
||||||
@ -15,7 +16,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with unstable.pkgs; [
|
||||||
chromium
|
chromium
|
||||||
fswebcam
|
fswebcam
|
||||||
glxinfo
|
glxinfo
|
||||||
@ -24,13 +25,9 @@
|
|||||||
lightlocker
|
lightlocker
|
||||||
networkmanager-openconnect
|
networkmanager-openconnect
|
||||||
openconnect
|
openconnect
|
||||||
pantheon.elementary-gtk-theme
|
|
||||||
pantheon.elementary-icon-theme
|
|
||||||
ponymix
|
ponymix
|
||||||
pulseaudio-ctl
|
pulseaudio-ctl
|
||||||
python39Packages.pyyaml
|
python39Packages.pyyaml
|
||||||
|
|
||||||
i3pystatus (python38.withPackages(ps: with ps; [ i3pystatus keyring ]))
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@ -84,30 +81,6 @@
|
|||||||
"CloudPrintSubmitEnabled" = false;
|
"CloudPrintSubmitEnabled" = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# sway = {
|
|
||||||
# enable = true;
|
|
||||||
# extraPackages = with pkgs; [
|
|
||||||
# dmenu
|
|
||||||
# swaylock
|
|
||||||
# swayidle
|
|
||||||
# xwayland
|
|
||||||
# mako
|
|
||||||
# kanshi
|
|
||||||
# grim
|
|
||||||
# slurp
|
|
||||||
# wl-clipboard
|
|
||||||
# wf-recorder
|
|
||||||
# (python38.withPackages(ps: with ps; [ i3pystatus keyring ]))
|
|
||||||
# ];
|
|
||||||
# extraSessionCommands = ''
|
|
||||||
# export SDL_VIDEODRIVER=wayland
|
|
||||||
# export QT_QPA_PLATFORM=wayland
|
|
||||||
# export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
||||||
# export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
# export MOZ_ENABLE_WAYLAND=1
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@ -143,30 +116,6 @@
|
|||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
# systemd.user.targets.sway-session = {
|
|
||||||
# description = "Sway compositor session";
|
|
||||||
# documentation = [ "man:systemd.special(7)" ];
|
|
||||||
# bindsTo = [ "graphical-session.target" ];
|
|
||||||
# wants = [ "graphical-session-pre.target" ];
|
|
||||||
# after = [ "graphical-session-pre.target" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# systemd.user.services.kanshi = {
|
|
||||||
# description = "Kanshi output autoconfig ";
|
|
||||||
# wantedBy = [ "graphical-session.target" ];
|
|
||||||
# partOf = [ "graphical-session.target" ];
|
|
||||||
# environment = { XDG_CONFIG_HOME="/home/alex/.config"; };
|
|
||||||
# serviceConfig = {
|
|
||||||
# # kanshi doesn't have an option to specifiy config file yet, so it looks
|
|
||||||
# # at .config/kanshi/config
|
|
||||||
# ExecStart = ''
|
|
||||||
# ${pkgs.kanshi}/bin/kanshi
|
|
||||||
# '';
|
|
||||||
# RestartSec = 5;
|
|
||||||
# Restart = "always";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||||
@ -174,45 +123,5 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
drivers = [ pkgs.brlaser ];
|
drivers = [ pkgs.brlaser ];
|
||||||
};
|
};
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# displayManager.defaultSession = "sway";
|
|
||||||
# displayManager.sddm.enable = true;
|
|
||||||
|
|
||||||
# displayManager = {
|
|
||||||
# lightdm = {
|
|
||||||
# enable = true;
|
|
||||||
# background = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.gnomeFilePath;
|
|
||||||
# # greeters.gtk.theme = {
|
|
||||||
# # package = pkgs.pantheon.elementary-gtk-theme;
|
|
||||||
# # name = "elementary";
|
|
||||||
# # };
|
|
||||||
# greeters.pantheon.enable = true;
|
|
||||||
# };
|
|
||||||
# defaultSession = "xsession";
|
|
||||||
# session = [{
|
|
||||||
# manage = "desktop";
|
|
||||||
# name = "xsession";
|
|
||||||
# start = ''exec $HOME/.xsession'';
|
|
||||||
# }];
|
|
||||||
# };
|
|
||||||
|
|
||||||
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
# desktopManager = {
|
|
||||||
# xfce = {
|
|
||||||
# enable = true;
|
|
||||||
# noDesktop = true;
|
|
||||||
# enableXfwm = true;
|
|
||||||
# thunarPlugins = [ pkgs.xfce.thunar-archive-plugin ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
layout = "us";
|
|
||||||
# Enable touchpad support.
|
|
||||||
libinput.enable = true;
|
|
||||||
updateDbusEnvironment = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
54
configs/sway.nix
Normal file
54
configs/sway.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
sway = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
wofi
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
xwayland
|
||||||
|
kanshi
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
(python38.withPackages(ps: with ps; [ i3pystatus keyring ]))
|
||||||
|
];
|
||||||
|
extraSessionCommands = ''
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.targets.sway-session = {
|
||||||
|
description = "Sway compositor session";
|
||||||
|
documentation = [ "man:systemd.special(7)" ];
|
||||||
|
bindsTo = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session-pre.target" ];
|
||||||
|
after = [ "graphical-session-pre.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.kanshi = {
|
||||||
|
description = "Kanshi output autoconfig ";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
environment = { XDG_CONFIG_HOME="/home/alex/.config"; };
|
||||||
|
serviceConfig = {
|
||||||
|
# kanshi doesn't have an option to specifiy config file yet, so it looks
|
||||||
|
# at .config/kanshi/config
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.kanshi}/bin/kanshi
|
||||||
|
'';
|
||||||
|
RestartSec = 5;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -6,16 +6,6 @@ in
|
|||||||
{
|
{
|
||||||
imports = [ <home-manager/nixos> ];
|
imports = [ <home-manager/nixos> ];
|
||||||
|
|
||||||
# systemd.user.services.barrierc = {
|
|
||||||
# Unit = {
|
|
||||||
# Description = "Barrier Server daemon";
|
|
||||||
# After = [ "graphical-session-pre.target" ];
|
|
||||||
# PartOf = [ "graphical-session.target" ];
|
|
||||||
# };
|
|
||||||
# Install.WantedBy = [ "graphical-session.target" ];
|
|
||||||
# Service.ExecStart = "${unstable.pkgs.barrier}/bin/barrierc -c ~/.barrier";
|
|
||||||
# };
|
|
||||||
|
|
||||||
home-manager.users.alex = { pkgs, ... }: {
|
home-manager.users.alex = { pkgs, ... }: {
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
@ -34,13 +24,6 @@ in
|
|||||||
gnome.gnome-calculator
|
gnome.gnome-calculator
|
||||||
keepassxc
|
keepassxc
|
||||||
libnotify
|
libnotify
|
||||||
|
|
||||||
swaylock
|
|
||||||
swayidle
|
|
||||||
wl-clipboard
|
|
||||||
mako # notification daemon
|
|
||||||
alacritty # Alacritty is the default terminal in the config
|
|
||||||
dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -96,8 +79,7 @@ in
|
|||||||
name = "elementary";
|
name = "elementary";
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
package = pkgs.pantheon.elementary-gtk-theme;
|
name = "Adwaita-dark";
|
||||||
name = "elementary";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,6 +97,8 @@ in
|
|||||||
mskelton.one-dark-theme
|
mskelton.one-dark-theme
|
||||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
ms-kubernetes-tools.vscode-kubernetes-tools
|
||||||
ryu1kn.partial-diff
|
ryu1kn.partial-diff
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
brettm12345.nixfmt-vscode
|
||||||
];
|
];
|
||||||
# userSettings = {
|
# userSettings = {
|
||||||
# #"terminal.integrated.fontFamily" = "Hack";
|
# #"terminal.integrated.fontFamily" = "Hack";
|
||||||
@ -164,6 +148,14 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
git = {
|
||||||
|
extraConfig = {
|
||||||
|
credential.helper = "${
|
||||||
|
pkgs.git.override { withLibsecret = true; }
|
||||||
|
}/bin/git-credential-libsecret";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
kitty = {
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -194,179 +186,5 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
|
||||||
# picom = {
|
|
||||||
# enable = true;
|
|
||||||
# blur = true;
|
|
||||||
# shadow = true;
|
|
||||||
# vSync = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# dunst = {
|
|
||||||
# enable = true;
|
|
||||||
# settings = {
|
|
||||||
# global = {
|
|
||||||
# font = "SF Pro Display Regular 12";
|
|
||||||
# markup = "yes";
|
|
||||||
# format = "%s %p\n%b";
|
|
||||||
# sort = "yes";
|
|
||||||
# indicate_hidden = "no";
|
|
||||||
# alignment = "center";
|
|
||||||
# bounce_freq = 0;
|
|
||||||
# show_age_threshold = 60;
|
|
||||||
# word_wrap = "yes";
|
|
||||||
# ignore_newline = "no";
|
|
||||||
# geometry = "300x0-5-5";
|
|
||||||
# shrink = "yes";
|
|
||||||
# transparency = 0;
|
|
||||||
# idle_threshold = 120;
|
|
||||||
# monitor = 0;
|
|
||||||
# follow = "mouse";
|
|
||||||
# sticky_history = "yes";
|
|
||||||
# history_length = 20;
|
|
||||||
# show_indicators = "no";
|
|
||||||
# line_height = 0;
|
|
||||||
# separator_height = 1;
|
|
||||||
# stack_duplicates = "no";
|
|
||||||
# padding = 8;
|
|
||||||
# horizontal_padding = 8;
|
|
||||||
# separator_color = "frame";
|
|
||||||
# startup_notification = true;
|
|
||||||
# # dmenu = /usr/bin/dmenu -p dunst;
|
|
||||||
# # browser = /usr/bin/firefox -new-tab;
|
|
||||||
# icon_position = "left";
|
|
||||||
# icon_path = "/usr/share/icons/Arc";
|
|
||||||
# max_icon_size = 64;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# frame = {
|
|
||||||
# width = 1;
|
|
||||||
# color = "#A6A6A6";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# urgency_low = {
|
|
||||||
# background = "#000000";
|
|
||||||
# foreground = "#A6A6A6";
|
|
||||||
# timeout = 4;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# urgency_normal = {
|
|
||||||
# background = "#000000";
|
|
||||||
# foreground = "#A6A6A6";
|
|
||||||
# timeout = 4;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# urgency_critical = {
|
|
||||||
# background = "#900000";
|
|
||||||
# foreground = "#ffffff";
|
|
||||||
# timeout = 16;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# sxhkd = {
|
|
||||||
# enable = true;
|
|
||||||
# keybindings = {
|
|
||||||
# "super + x" = "notify-send Time $(date '+%H:%M')";
|
|
||||||
# "super + z" = "notify-send Battery $(cat /sys/class/power_supply/BAT0/capacity)%";
|
|
||||||
# "alt + Tab" = "rofi -show window";
|
|
||||||
# "super + Return" = "kitty";
|
|
||||||
# "super + shift + Return" = "rofi -show drun";
|
|
||||||
# "super + Escape" = "pkill -USR1 -x sxhkd";
|
|
||||||
# "super {_,shift + }Tab" = "bspc node -f {next,prev}";
|
|
||||||
# "super + shift + c" = "bspc node -c";
|
|
||||||
# "super + a" = "bspc node @/ --flip vertical";
|
|
||||||
# "super + d" = ''layer=normal; \
|
|
||||||
# bspc query -N -n "focused.$\{layer\}" && layer=below; \
|
|
||||||
# bspc node -l "$layer"'';
|
|
||||||
# "super + {s,f,k}" =
|
|
||||||
# ''state={floating,fullscreen,pseudo_tiled}; \
|
|
||||||
# bspc query -N -n "focused.$\{state\}" && state=tiled; \
|
|
||||||
# bspc node -t "$state" '';
|
|
||||||
# "super + alt + {Left,Down,Up,Right}" = "bspc node -p {west,south,north,east}";
|
|
||||||
# "super + ctrl + {Left,Right,Up,Down}" = "xdo move {-x -50,-x +50,-y -50,-y +50}";
|
|
||||||
# "super + ctrl + alt + {Left,Right,Up,Down}" = "xdo resize {-w -50,-w +50,-h -50,-h +50}";
|
|
||||||
# "super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}";
|
|
||||||
# "super + m" = "bspc node -s biggest";
|
|
||||||
# "super + l" = "~/.bin/lock";
|
|
||||||
# "super + ctrl + space" = "bspc node -p cancel";
|
|
||||||
# "super + apostrophe" = "bspc node -s last";
|
|
||||||
# "super + ctrl + comma" = "bspc node @/ --rotate 90";
|
|
||||||
# "super + shift + comma" = "bspc node @/ --circulate forward";
|
|
||||||
# "super + {1-9,0}" = "bspc desktop -f '{I,II,III,IV,V,VI,VII,VIII,IX,X}' && notify-send `bspc query -D -d --names`";
|
|
||||||
# "super + shift + {1-9,0}" = "bspc node -d '{I,II,III,IV,V,VI,VII,VIII,IX,X}'";
|
|
||||||
# # "XF86AudioMute" = "pulseaudio-ctl mute";
|
|
||||||
# # "XF86AudioLowerVolume" = "pulseaudio-ctl down";
|
|
||||||
# # "XF86AudioRaiseVolume" = "pulseaudio-ctl up";
|
|
||||||
# "Print" = "flameshot gui";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
nextcloud-client = {
|
|
||||||
enable = true;
|
|
||||||
startInBackground = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
redshift = {
|
|
||||||
enable = true;
|
|
||||||
duskTime = "21:00-22:00";
|
|
||||||
dawnTime = "06:30-07:00";
|
|
||||||
};
|
|
||||||
|
|
||||||
flameshot.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# xsession = {
|
|
||||||
# enable = true;
|
|
||||||
# pointerCursor = {
|
|
||||||
# defaultCursor = "left_ptr";
|
|
||||||
# name = "elementary";
|
|
||||||
# package = pkgs.pantheon.elementary-icon-theme;
|
|
||||||
# };
|
|
||||||
# windowManager = {
|
|
||||||
# command = pkgs.lib.mkForce ''
|
|
||||||
# ${pkgs.bspwm}/bin/bspwm -c ~/.config/bspwm/bspwmrc &
|
|
||||||
# ${pkgs.xfce.xfce4-session}/bin/xfce4-session
|
|
||||||
# '';
|
|
||||||
# bspwm = {
|
|
||||||
# enable = true;
|
|
||||||
# extraConfig = ''
|
|
||||||
# bspc wm --adopt-orphans
|
|
||||||
#
|
|
||||||
# bspc subscribe monitor_add monitor_remove| while read -r a event; do
|
|
||||||
# node /home/alex/Sync/windows.js
|
|
||||||
# done &
|
|
||||||
# '';
|
|
||||||
# settings = {
|
|
||||||
# border_width = 4;
|
|
||||||
# window_gap = 5;
|
|
||||||
# top_padding = 0;
|
|
||||||
# left_padding = 0;
|
|
||||||
# right_padding = 0;
|
|
||||||
# bottom_padding = 0;
|
|
||||||
# split_ratio = 0.50;
|
|
||||||
# borderless_monocle = true;
|
|
||||||
# single_monocle = true;
|
|
||||||
# gapless_monocle = true;
|
|
||||||
# focus_follows_pointer = true;
|
|
||||||
# pointer_follows_monitor = true;
|
|
||||||
# pointer_follows_focus = false;
|
|
||||||
# center_pseudo_tiled = true;
|
|
||||||
# automatic_scheme = "alternate";
|
|
||||||
# remove_unplugged_monitors = true;
|
|
||||||
# remove_disabled_monitors = true;
|
|
||||||
# normal_border_color = "#333333";
|
|
||||||
# focused_border_color = "#666666";
|
|
||||||
# presel_feedback_color = "#000000";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
|
||||||
enable = true;
|
|
||||||
wrapperFeatures.gtk = true ;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ <home-manager/nixos> ];
|
imports = [ <home-manager/nixos> ];
|
||||||
|
|
||||||
@ -24,7 +27,7 @@
|
|||||||
home-manager.users.alex = { pkgs, ... }: {
|
home-manager.users.alex = { pkgs, ... }: {
|
||||||
home = {
|
home = {
|
||||||
enableNixpkgsReleaseCheck = false;
|
enableNixpkgsReleaseCheck = false;
|
||||||
packages = with pkgs; [
|
packages = with unstable.pkgs; [
|
||||||
atop
|
atop
|
||||||
bpytop
|
bpytop
|
||||||
dfc
|
dfc
|
||||||
@ -71,6 +74,21 @@
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
matchBlocks."new-vps" = {
|
||||||
|
hostname = "207.180.220.97";
|
||||||
|
localForwards = [ {
|
||||||
|
bind.address = "127.0.0.1";
|
||||||
|
bind.port = 8387;
|
||||||
|
host.address = "127.0.0.1";
|
||||||
|
host.port = 8384;
|
||||||
|
} {
|
||||||
|
bind.address = "127.0.0.1";
|
||||||
|
bind.port = 9092;
|
||||||
|
host.address = "127.0.0.1";
|
||||||
|
host.port = 9091;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
matchBlocks."nixos-vm" = {
|
matchBlocks."nixos-vm" = {
|
||||||
hostname = "192.168.122.222";
|
hostname = "192.168.122.222";
|
||||||
remoteForwards = [{
|
remoteForwards = [{
|
||||||
@ -118,9 +136,6 @@
|
|||||||
color = { ui = "auto"; };
|
color = { ui = "auto"; };
|
||||||
push = { default = "current"; };
|
push = { default = "current"; };
|
||||||
pull = { rebase = true; };
|
pull = { rebase = true; };
|
||||||
credential.helper = "${
|
|
||||||
pkgs.git.override { withLibsecret = true; }
|
|
||||||
}/bin/git-credential-libsecret";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -144,7 +159,7 @@
|
|||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "powerlevel10k";
|
name = "powerlevel10k";
|
||||||
src = pkgs.zsh-powerlevel10k;
|
src = unstable.pkgs.zsh-powerlevel10k;
|
||||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
secrets = import ../configs/secrets.nix;
|
secrets = import ../configs/secrets.nix;
|
||||||
secrets-wireguard = import ../configs/secrets-wireguard-publickeys.nix;
|
|
||||||
secrets-desktop = import ../configs/secrets-desktop.nix;
|
secrets-desktop = import ../configs/secrets-desktop.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -16,6 +15,7 @@ in
|
|||||||
../configs/user-gui-applications.nix
|
../configs/user-gui-applications.nix
|
||||||
../configs/user-gui.nix
|
../configs/user-gui.nix
|
||||||
../configs/user.nix
|
../configs/user.nix
|
||||||
|
../configs/bspwm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@ -42,8 +42,9 @@ in
|
|||||||
|
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
plymouth.enable = true;
|
plymouth.enable = true;
|
||||||
extraModulePackages = with pkgs.linuxPackages; [ it87 ];
|
extraModulePackages = with pkgs.linuxPackages_5_14; [ it87 ];
|
||||||
kernelModules = [ "it87" "v4l2loopback" ];
|
kernelModules = [ "it87" "v4l2loopback" ];
|
||||||
|
kernelPackages = pkgs.linuxPackages_5_14;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
@ -52,12 +53,12 @@ in
|
|||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [ "10.100.0.2/24" ];
|
ips = [ "10.100.0.2/24" ];
|
||||||
privateKey = secrets-desktop.wireguard-desktop-private;
|
privateKey = secrets-desktop.wireguard-private;
|
||||||
|
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = secrets-wireguard.wireguard-vps-public;
|
publicKey = secrets.wireguard-vps-public;
|
||||||
presharedKey = secrets-wireguard.wireguard-preshared;
|
presharedKey = secrets.wireguard-preshared;
|
||||||
allowedIPs = [ "10.100.0.0/24" ];
|
allowedIPs = [ "10.100.0.0/24" ];
|
||||||
endpoint = "szczepan.ski:51820";
|
endpoint = "szczepan.ski:51820";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
@ -118,17 +119,20 @@ in
|
|||||||
services = {
|
services = {
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
xserver.videoDrivers = [ "amdgpu" ];
|
xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
xserver.deviceSection = ''
|
||||||
|
Option "TearFree" "true"
|
||||||
|
'';
|
||||||
hardware.xow.enable = true;
|
hardware.xow.enable = true;
|
||||||
borgbackup.jobs.home = rec {
|
borgbackup.jobs.home = rec {
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
encryption = {
|
encryption = {
|
||||||
mode = "repokey-blake2" ;
|
mode = "repokey-blake2" ;
|
||||||
passphrase = secrets-desktop.borg-desktop-key;
|
passphrase = secrets-desktop.borg-key;
|
||||||
};
|
};
|
||||||
extraCreateArgs = "--checkpoint-interval 600 --exclude-caches";
|
extraCreateArgs = "--checkpoint-interval 600 --exclude-caches";
|
||||||
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
||||||
paths = "/home/alex";
|
paths = "/home/alex";
|
||||||
repo = "ssh://u278697-sub2@u278697.your-storagebox.de:23/./borg";
|
repo = secrets-desktop.borg-repo;
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
user = "alex";
|
user = "alex";
|
||||||
prune.keep = {
|
prune.keep = {
|
||||||
|
@ -44,6 +44,10 @@ in
|
|||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.desktopManager.pantheon.enable = true;
|
||||||
|
services.xserver.displayManager.lightdm.greeters.pantheon.enable = true;
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ let
|
|||||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||||
exec -a "$0" "$@"
|
exec -a "$0" "$@"
|
||||||
'';
|
'';
|
||||||
secrets = import ../configs/secrets.nix;
|
|
||||||
secrets-thinkpad = import ../configs/secrets-thinkpad.nix;
|
secrets-thinkpad = import ../configs/secrets-thinkpad.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -39,20 +38,20 @@ in
|
|||||||
|
|
||||||
fileSystems."/".options = [ "noatime" "discard" ];
|
fileSystems."/".options = [ "noatime" "discard" ];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot = {
|
||||||
boot.loader.grub.version = 2;
|
loader = {
|
||||||
boot.loader.grub.device = "nodev";
|
grub.enable = true;
|
||||||
boot.loader.grub.efiSupport = true;
|
grub.version = 2;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
grub.device = "nodev";
|
||||||
boot.loader.grub.gfxmodeEfi = "1024x768";
|
grub.efiSupport = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
# boot.plymouth.enable = true;
|
grub.gfxmodeEfi = "1024x768";
|
||||||
|
};
|
||||||
# environment.etc."issue.d/ip.issue".text = "\\4\n";
|
kernelPackages = pkgs.linuxPackages_5_14;
|
||||||
|
boot.plymouth.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
networking.hostName = "thinkpad"; # Define your hostname.
|
networking.hostName = "thinkpad"; # Define your hostname.
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||||
@ -131,8 +130,8 @@ in
|
|||||||
};
|
};
|
||||||
hardware.sane.enable = true;
|
hardware.sane.enable = true;
|
||||||
|
|
||||||
#thinkfan
|
services = {
|
||||||
services.thinkfan = {
|
thinkfan = {
|
||||||
enable = true;
|
enable = true;
|
||||||
levels = [
|
levels = [
|
||||||
[0 0 67]
|
[0 0 67]
|
||||||
@ -144,10 +143,12 @@ in
|
|||||||
[7 93 32767]
|
[7 93 32767]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
services = {
|
|
||||||
xserver = {
|
xserver = {
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = [ "nvidia" ];
|
||||||
# deviceSection = ''BusID "PCI:0:2:0"'';
|
# deviceSection = ''BusID "PCI:0:2:0"'';
|
||||||
|
# deviceSection = ''
|
||||||
|
# Option "TearFree" "true"
|
||||||
|
# '';
|
||||||
};
|
};
|
||||||
power-profiles-daemon.enable = false;
|
power-profiles-daemon.enable = false;
|
||||||
tlp = {
|
tlp = {
|
||||||
@ -161,12 +162,12 @@ in
|
|||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
encryption = {
|
encryption = {
|
||||||
mode = "repokey-blake2" ;
|
mode = "repokey-blake2" ;
|
||||||
passphrase = secrets-thinkpad.borg-thinkpad-key;
|
passphrase = secrets-thinkpad.borg-key;
|
||||||
};
|
};
|
||||||
extraCreateArgs = "--list --stats --verbose --checkpoint-interval 600 --exclude-caches";
|
extraCreateArgs = "--list --stats --verbose --checkpoint-interval 600 --exclude-caches";
|
||||||
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
environment.BORG_RSH = "ssh -i ~/.ssh/id_borg_rsa";
|
||||||
paths = "/home/alex";
|
paths = "/home/alex";
|
||||||
repo = "ssh://u278697-sub1@u278697.your-storagebox.de:23/./borg";
|
repo = secrets-thinkpad.borg-thinkpad-key;
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
user = "alex";
|
user = "alex";
|
||||||
prune.keep = {
|
prune.keep = {
|
||||||
@ -202,7 +203,7 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nvidia-offload
|
nvidia-offload
|
||||||
xorg.xf86videointel
|
# xorg.xf86videointel
|
||||||
intel-gpu-tools
|
intel-gpu-tools
|
||||||
gnome.simple-scan
|
gnome.simple-scan
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user