refactored some stuff
This commit is contained in:
@ -6,8 +6,6 @@
|
|||||||
(fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master")
|
(fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master")
|
||||||
];
|
];
|
||||||
|
|
||||||
services.vscode-server.enable = true;
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -37,18 +35,26 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#nextdns
|
services = {
|
||||||
services.nextdns = {
|
vscode-server.enable = true;
|
||||||
enable = true;
|
openssh = {
|
||||||
arguments = [
|
enable = true;
|
||||||
"-config"
|
permitRootLogin = "no";
|
||||||
"aaa56c"
|
passwordAuthentication = false;
|
||||||
"-cache-size"
|
openFirewall = true;
|
||||||
"10MB"
|
};
|
||||||
"-listen"
|
nextdns = {
|
||||||
"127.0.0.1:53"
|
enable = true;
|
||||||
"-report-client-info"
|
arguments = [
|
||||||
];
|
"-config"
|
||||||
|
"aaa56c"
|
||||||
|
"-cache-size"
|
||||||
|
"10MB"
|
||||||
|
"-listen"
|
||||||
|
"127.0.0.1:53"
|
||||||
|
"-report-client-info"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
@ -94,10 +100,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
documentation.nixos.enable = false;
|
|
||||||
#documentation.man.enable = false;
|
|
||||||
documentation.info.enable = false;
|
|
||||||
documentation.doc.enable = false;
|
|
||||||
|
|
||||||
nix.autoOptimiseStore = true;
|
nix.autoOptimiseStore = true;
|
||||||
|
|
||||||
|
194
configs/desktop.nix
Normal file
194
configs/desktop.nix
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
elementary-xfce-icon-theme
|
||||||
|
gnomeExtensions.appindicator
|
||||||
|
sxhkd
|
||||||
|
bspwm
|
||||||
|
polybar
|
||||||
|
lightlocker
|
||||||
|
dunst
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.etc.bspwmrc = {
|
||||||
|
mode = "0645";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# spread desktops
|
||||||
|
# desktops=5
|
||||||
|
# count=$(xrandr -q | grep -c ' connected')
|
||||||
|
# i=1
|
||||||
|
# for m in $(xrandr -q | grep ' connected' | awk '{print $1}'); do
|
||||||
|
# sequence=$(seq -s ' ' $(((1+(i-1)*desktops/count))) $((i*desktops/count)))
|
||||||
|
# bspc monitor "$m" -d $(echo ''${sequence//10/0})
|
||||||
|
# i=$((i+1))
|
||||||
|
# done
|
||||||
|
# if [ -e "/etc/X11/Xresources" ]; then
|
||||||
|
# xrdb /etc/X11/Xresources
|
||||||
|
# fi
|
||||||
|
# if [ -e "$HOME/.Xresources" ]; then
|
||||||
|
# xrdb -merge "$HOME/.Xresources"
|
||||||
|
# fi
|
||||||
|
# # polybar
|
||||||
|
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||||
|
# MONITOR=$m ${pkgs.polybar}/bin/polybar --reload default -c /etc/polybar.conf &
|
||||||
|
# done
|
||||||
|
|
||||||
|
# pointer
|
||||||
|
xsetroot -cursor_name left_ptr
|
||||||
|
# turn off blanking
|
||||||
|
# xset -dpms
|
||||||
|
# xset s off
|
||||||
|
# xset s noblank
|
||||||
|
# sxhkd &
|
||||||
|
# node ~/.config/bspwm/window.js &
|
||||||
|
|
||||||
|
bspc config border_width 4
|
||||||
|
bspc config window_gap 5
|
||||||
|
bspc config top_padding 0
|
||||||
|
bspc config left_padding 0
|
||||||
|
bspc config right_padding 0
|
||||||
|
bspc config bottom_padding 0
|
||||||
|
bspc config split_ratio 0.50
|
||||||
|
bspc config borderless_monocle true
|
||||||
|
bspc config single_monocle true
|
||||||
|
bspc config gapless_monocle true
|
||||||
|
bspc config focus_follows_pointer true
|
||||||
|
bspc config pointer_follows_monitor true
|
||||||
|
bspc config pointer_follows_focus false
|
||||||
|
bspc config center_pseudo_tiled true
|
||||||
|
bspc config automatic_scheme alternate
|
||||||
|
bspc config remove_unplugged_monitors true
|
||||||
|
bspc config remove_disabled_monitors true
|
||||||
|
|
||||||
|
bspc rule -a Gnome-calculator state=floating
|
||||||
|
|
||||||
|
bspc config normal_border_color "#333333"
|
||||||
|
bspc config focused_border_color "#666666"
|
||||||
|
bspc config presel_feedback_color "#000000"
|
||||||
|
|
||||||
|
bspc wm --adopt-orphans
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc.sxhkdrc = {
|
||||||
|
text = ''
|
||||||
|
#show time
|
||||||
|
super + z
|
||||||
|
notify-send Time $(date '+%H:%M')
|
||||||
|
#show Battery
|
||||||
|
super + x
|
||||||
|
notify-send Battery $(cat /sys/class/power_supply/BAT0/capacity)%
|
||||||
|
alt + Tab
|
||||||
|
rofi -show window
|
||||||
|
#Mute
|
||||||
|
XF86AudioMute
|
||||||
|
pulseaudio-ctl mute
|
||||||
|
XF86AudioLowerVolume
|
||||||
|
pulseaudio-ctl down
|
||||||
|
XF86AudioRaiseVolume
|
||||||
|
pulseaudio-ctl up
|
||||||
|
#XF86MonBrightnessUp
|
||||||
|
# lux -a 20%
|
||||||
|
#XF86MonBrightnessDown
|
||||||
|
# lux -s 20%
|
||||||
|
super + Return
|
||||||
|
kitty
|
||||||
|
super + shift + Return
|
||||||
|
rofi -show drun
|
||||||
|
super + Escape
|
||||||
|
pkill -USR1 -x sxhkd
|
||||||
|
#cycle windows
|
||||||
|
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 + y
|
||||||
|
# bspc node -n last.!automatic
|
||||||
|
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 + shift + x
|
||||||
|
# bspc wm -d > "$BSPWM_STATE" && bspc quit
|
||||||
|
super + {q,w,e,r,t,y,u,i,o,p}
|
||||||
|
bspc desktop -f '{I,II,III,IV,V,VI,VII,VIII,IX,X}' && notify-send `bspc query -D -d --names`
|
||||||
|
super + shift + {q,w,e,r,t,y,u,i,o,p}
|
||||||
|
bspc node -d '{I,II,III,IV,V,VI,VII,VIII,IX,X}'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
services = {
|
||||||
|
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||||
|
gnome.gnome-keyring.enable = true;
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager = {
|
||||||
|
# autoLogin = {
|
||||||
|
# enable = true;
|
||||||
|
# user = "starlight";
|
||||||
|
# };
|
||||||
|
lightdm = {
|
||||||
|
enable = true;
|
||||||
|
# autoLogin = {
|
||||||
|
# relogin = false;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
# setupCommands = ''
|
||||||
|
# xset -dpms
|
||||||
|
# xset s off
|
||||||
|
# '';
|
||||||
|
defaultSession = "bspwm";
|
||||||
|
session = [{
|
||||||
|
manage = "desktop";
|
||||||
|
name = "bspwm";
|
||||||
|
start = ''
|
||||||
|
${pkgs.sxhkd}/bin/sxhkd -c /etc/sxhkdrc &
|
||||||
|
${pkgs.bspwm}/bin/bspwm -c /etc/bspwmrc &
|
||||||
|
${pkgs.xfce.xfce4-session}/bin/xfce4-session
|
||||||
|
'';
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopManager = {
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
noDesktop = true;
|
||||||
|
enableXfwm = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
layout = "us";
|
||||||
|
# Enable touchpad support.
|
||||||
|
libinput.enable = true;
|
||||||
|
updateDbusEnvironment = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -20,34 +20,6 @@
|
|||||||
pkgs.cryfs
|
pkgs.cryfs
|
||||||
];
|
];
|
||||||
|
|
||||||
# dconf.enable = true;
|
|
||||||
# dconf.settings = {
|
|
||||||
# "org/gnome/desktop/wm/preferences".titlebar-font = "Liberation Sans Bold 9";
|
|
||||||
# "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
|
||||||
# binding = "<Super>Return";
|
|
||||||
# command = "kitty";
|
|
||||||
# name = "kitty";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
|
||||||
# binding = "<Shift><Super>Return";
|
|
||||||
# command = "rofi -show drun";
|
|
||||||
# name = "rofi -show drun";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
|
||||||
# binding = "<Super>Tab";
|
|
||||||
# command = "rofi -show window";
|
|
||||||
# name = "rofi -show window";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# "org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
|
|
||||||
# "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
|
||||||
# "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
|
||||||
# "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# container virtualization
|
virtualisation = {
|
||||||
virtualisation.docker.enable = true;
|
docker.enable = true;
|
||||||
|
libvirtd = {
|
||||||
# hypervisor virtualization
|
enable = true;
|
||||||
virtualisation.libvirtd = {
|
qemuPackage = pkgs.qemu_kvm;
|
||||||
enable = true;
|
};
|
||||||
qemuPackage = pkgs.qemu_kvm;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -126,11 +126,6 @@ in
|
|||||||
# enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
@ -117,8 +117,6 @@
|
|||||||
# enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
services.netdata.enable = true;
|
services.netdata.enable = true;
|
||||||
|
|
||||||
|
@ -8,22 +8,17 @@ in
|
|||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
/etc/nixos/hardware-configuration.nix
|
/etc/nixos/hardware-configuration.nix
|
||||||
../configs/gui.nix
|
../configs/gui.nix
|
||||||
# ../configs/virtualisation.nix
|
|
||||||
../configs/common.nix
|
../configs/common.nix
|
||||||
../configs/user.nix
|
../configs/user.nix
|
||||||
|
../configs/desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
# boot.loader.grub.efiSupport = true;
|
|
||||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
||||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
# Define on which hard drive you want to install Grub.
|
# Define on which hard drive you want to install Grub.
|
||||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||||
|
|
||||||
networking.hostName = "nixos-vm"; # Define your hostname.
|
networking.hostName = "nixos-vm"; # Define your hostname.
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
@ -33,10 +28,6 @@ in
|
|||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.enp1s0.useDHCP = true;
|
networking.interfaces.enp1s0.useDHCP = true;
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
# i18n.defaultLocale = "en_US.UTF-8";
|
# i18n.defaultLocale = "en_US.UTF-8";
|
||||||
# console = {
|
# console = {
|
||||||
@ -44,52 +35,10 @@ in
|
|||||||
# keyMap = "us";
|
# keyMap = "us";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# environment.variables = {
|
||||||
# services.xserver.enable = true;
|
# XDG_CURRENT_DESKTOP = "MATE";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.layout = "us";
|
|
||||||
# services.xserver.xkbOptions = "eurosign:e";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# sound.enable = true;
|
|
||||||
# hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.alex = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
# environment.systemPackages = with pkgs; [
|
|
||||||
# # wget
|
|
||||||
# git
|
|
||||||
# ];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
@ -170,11 +170,6 @@ in
|
|||||||
# enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
#networking.firewall.allowedTCPPorts = [ 52698 ];
|
#networking.firewall.allowedTCPPorts = [ 52698 ];
|
||||||
#networking.firewall.allowedUDPPorts = [ 52698 ];
|
#networking.firewall.allowedUDPPorts = [ 52698 ];
|
||||||
|
@ -47,16 +47,6 @@
|
|||||||
# enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
permitRootLogin = "no";
|
|
||||||
passwordAuthentication = false;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security.acme.email = "webmaster@szczepan.ski";
|
security.acme.email = "webmaster@szczepan.ski";
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
Reference in New Issue
Block a user