Auto-indent every file
This commit is contained in:
parent
d705ce20c3
commit
4787fea598
14 changed files with 977 additions and 997 deletions
204
base.nix
204
base.nix
|
@ -2,132 +2,132 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
#################### Packages ####################
|
||||
environment.systemPackages = with pkgs; [
|
||||
rxvt-unicode-emoji
|
||||
tmux
|
||||
git
|
||||
unison
|
||||
nano
|
||||
p7zip
|
||||
tree
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
rxvt-unicode-emoji
|
||||
tmux
|
||||
git
|
||||
unison
|
||||
nano
|
||||
p7zip
|
||||
tree
|
||||
];
|
||||
|
||||
#################### ZSH configuration ####################
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [ "history-substring-search" "tmux" ];
|
||||
theme = "af-magic";
|
||||
};
|
||||
interactiveShellInit =
|
||||
''
|
||||
ZSH_TMUX_AUTOSTART=false
|
||||
ZSH_TMUX_AUTOQUIT=false
|
||||
ZSH_TMUX_CONFIG=/etc/tmux.conf
|
||||
'';
|
||||
promptInit =
|
||||
''
|
||||
if [ -n "$IN_NIX_SHELL" ]; then
|
||||
setopt PROMPT_SUBST
|
||||
RPROMPT+='[nix]'
|
||||
fi
|
||||
'';
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [ "history-substring-search" "tmux" ];
|
||||
theme = "af-magic";
|
||||
};
|
||||
interactiveShellInit =
|
||||
''
|
||||
ZSH_TMUX_AUTOSTART=false
|
||||
ZSH_TMUX_AUTOQUIT=false
|
||||
ZSH_TMUX_CONFIG=/etc/tmux.conf
|
||||
'';
|
||||
promptInit =
|
||||
''
|
||||
if [ -n "$IN_NIX_SHELL" ]; then
|
||||
setopt PROMPT_SUBST
|
||||
RPROMPT+='[nix]'
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
#################### tmux configuration ####################
|
||||
programs.tmux.enable = true;
|
||||
programs.tmux.extraConfig =
|
||||
''
|
||||
unbind C-b
|
||||
set -g prefix M-w
|
||||
bind M-w send-prefix
|
||||
programs.tmux.enable = true;
|
||||
programs.tmux.extraConfig =
|
||||
''
|
||||
unbind C-b
|
||||
set -g prefix M-w
|
||||
bind M-w send-prefix
|
||||
|
||||
bind s split-window -v
|
||||
bind v split-window -h
|
||||
bind s split-window -v
|
||||
bind v split-window -h
|
||||
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# bind -n C-i run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-i) || tmux select-pane -L"
|
||||
# bind -n C-n run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-n) || tmux select-pane -D"
|
||||
# bind -n C-e run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-e) || tmux select-pane -U"
|
||||
# bind -n C-o run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-o) || tmux select-pane -R"
|
||||
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
|
||||
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
|
||||
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
|
||||
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# bind -n C-i run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-i) || tmux select-pane -L"
|
||||
# bind -n C-n run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-n) || tmux select-pane -D"
|
||||
# bind -n C-e run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-e) || tmux select-pane -U"
|
||||
# bind -n C-o run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-o) || tmux select-pane -R"
|
||||
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
|
||||
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
|
||||
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
|
||||
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
|
||||
|
||||
bind -n C-Left select-pane -L
|
||||
bind -n C-Right select-pane -R
|
||||
bind -n C-Up select-pane -U
|
||||
bind -n C-Down select-pane -D
|
||||
bind -n C-Left select-pane -L
|
||||
bind -n C-Right select-pane -R
|
||||
bind -n C-Up select-pane -U
|
||||
bind -n C-Down select-pane -D
|
||||
|
||||
# resize panes more easily
|
||||
# bind -r i resize-pane -L 10
|
||||
# bind -r n resize-pane -D 10
|
||||
# bind -r e resize-pane -U 10
|
||||
# bind -r o resize-pane -R 10
|
||||
bind -r h resize-pane -L 10
|
||||
bind -r j resize-pane -D 10
|
||||
bind -r k resize-pane -U 10
|
||||
bind -r l resize-pane -R 10
|
||||
# resize panes more easily
|
||||
# bind -r i resize-pane -L 10
|
||||
# bind -r n resize-pane -D 10
|
||||
# bind -r e resize-pane -U 10
|
||||
# bind -r o resize-pane -R 10
|
||||
bind -r h resize-pane -L 10
|
||||
bind -r j resize-pane -D 10
|
||||
bind -r k resize-pane -U 10
|
||||
bind -r l resize-pane -R 10
|
||||
|
||||
bind M-c attach -c "#{pane_current_path}"
|
||||
bind M-c attach -c "#{pane_current_path}"
|
||||
|
||||
set -s escape-time 0
|
||||
# unbind -n tab
|
||||
'';
|
||||
set -s escape-time 0
|
||||
# unbind -n tab
|
||||
'';
|
||||
|
||||
#################### SSH configuration ####################
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbGREoK1uVny1s8FK3KZ74Wmaf0VtifhqPyK69C/Gez vili@helium" ];
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbGREoK1uVny1s8FK3KZ74Wmaf0VtifhqPyK69C/Gez vili@helium" ];
|
||||
|
||||
#################### BASE ####################
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
users.mutableUsers = false; # Force all user management to happen throught nix-files
|
||||
users.mutableUsers = false; # Force all user management to happen throught nix-files
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
services.xserver.xkb = {
|
||||
layout = "us,";
|
||||
variant = "de_se_fi,";
|
||||
};
|
||||
console = pkgs.lib.mkForce {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
time.timeZone = "Europe/Helsinki";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
services.xserver.xkb = {
|
||||
layout = "us,";
|
||||
variant = "de_se_fi,";
|
||||
};
|
||||
console = pkgs.lib.mkForce {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
time.timeZone = "Europe/Helsinki";
|
||||
|
||||
|
||||
#################### Housekeeping ####################
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
randomizedDelaySec = "30min";
|
||||
};
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
randomizedDelaySec = "30min";
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
tarball-ttl = 0;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 7d";
|
||||
dates = "05:00";
|
||||
randomizedDelaySec = "30min";
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
tarball-ttl = 0;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 7d";
|
||||
dates = "05:00";
|
||||
randomizedDelaySec = "30min";
|
||||
};
|
||||
};
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
system.copySystemConfiguration = true;
|
||||
system.copySystemConfiguration = true;
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
host = "???";
|
||||
stateVersion = "???";
|
||||
host = "???";
|
||||
stateVersion = "???";
|
||||
|
||||
repo = builtins.fetchGit {
|
||||
url = "https://github.com/VSinerva/nixos-conf.git";
|
||||
name = "nixos-conf-github";
|
||||
ref = "main";
|
||||
};
|
||||
repo = builtins.fetchGit {
|
||||
url = "https://github.com/VSinerva/nixos-conf.git";
|
||||
name = "nixos-conf-github";
|
||||
ref = "main";
|
||||
};
|
||||
in
|
||||
{
|
||||
{
|
||||
# Verification will be available soon, so keeping this here as a reminder
|
||||
# publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbGREoK1uVny1s8FK3KZ74Wmaf0VtifhqPyK69C/Gez vili@helium";
|
||||
# nix.settings.experimental-features = "verified-fetches";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
"${repo}/machine-confs/${host}.nix"
|
||||
];
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
"${repo}/machine-confs/${host}.nix"
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
@ -25,5 +25,5 @@ in
|
|||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = stateVersion; # Did you read the comment?
|
||||
system.stateVersion = stateVersion; # Did you read the comment?
|
||||
}
|
||||
|
|
778
desktop.nix
778
desktop.nix
|
@ -1,7 +1,7 @@
|
|||
#Config for graphical desktop
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
i3status-conf = "${pkgs.writeText "i3status-conf"
|
||||
i3status-conf = "${pkgs.writeText "i3status-conf"
|
||||
''
|
||||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
@ -11,281 +11,281 @@ i3status-conf = "${pkgs.writeText "i3status-conf"
|
|||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
output_format = "i3bar"
|
||||
colors = true
|
||||
interval = 5
|
||||
color_good = "#2AA198"
|
||||
color_bad = "#586E75"
|
||||
color_degraded = "#DC322F"
|
||||
}
|
||||
general {
|
||||
output_format = "i3bar"
|
||||
colors = true
|
||||
interval = 5
|
||||
color_good = "#2AA198"
|
||||
color_bad = "#586E75"
|
||||
color_degraded = "#DC322F"
|
||||
}
|
||||
|
||||
order += "battery all"
|
||||
order += "cpu_usage"
|
||||
order += "memory"
|
||||
order += "ethernet _first_"
|
||||
order += "wireless _first_"
|
||||
order += "disk /"
|
||||
order += "tztime local"
|
||||
order += "tztime helsinki"
|
||||
order += "battery all"
|
||||
order += "cpu_usage"
|
||||
order += "memory"
|
||||
order += "ethernet _first_"
|
||||
order += "wireless _first_"
|
||||
order += "disk /"
|
||||
order += "tztime local"
|
||||
order += "tztime helsinki"
|
||||
|
||||
cpu_usage {
|
||||
format = " CPU %usage "
|
||||
}
|
||||
cpu_usage {
|
||||
format = " CPU %usage "
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
disk "/" {
|
||||
# format = " hdd %avail "
|
||||
format = " ⛁ %avail "
|
||||
}
|
||||
format = " ⛁ %avail "
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
format_up = " LAN: %ip "
|
||||
format_down = " No LAN "
|
||||
}
|
||||
ethernet _first_ {
|
||||
format_up = " LAN: %ip "
|
||||
format_down = " No LAN "
|
||||
}
|
||||
|
||||
wireless _first_ {
|
||||
format_up = " %quality%essid: %ip "
|
||||
format_down = ""
|
||||
}
|
||||
wireless _first_ {
|
||||
format_up = " %quality%essid: %ip "
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
battery all {
|
||||
battery all {
|
||||
# format = "%status %percentage %remaining %emptytime"
|
||||
format = " bat %status %percentage (%remaining left) "
|
||||
format_down = ""
|
||||
last_full_capacity = true
|
||||
integer_battery_capacity = true
|
||||
format = " bat %status %percentage (%remaining left) "
|
||||
format_down = ""
|
||||
last_full_capacity = true
|
||||
integer_battery_capacity = true
|
||||
# status_chr = ""
|
||||
status_chr = "⚡"
|
||||
status_chr = "⚡"
|
||||
# status_bat = "bat"
|
||||
# status_bat = "☉"
|
||||
# status_bat = ""
|
||||
status_bat = ""
|
||||
status_bat = ""
|
||||
# status_unk = "?"
|
||||
status_unk = ""
|
||||
status_unk = ""
|
||||
# status_full = ""
|
||||
status_full = "☻"
|
||||
low_threshold = 30
|
||||
threshold_type = time
|
||||
}
|
||||
status_full = "☻"
|
||||
low_threshold = 30
|
||||
threshold_type = time
|
||||
}
|
||||
|
||||
memory {
|
||||
format = " RAM %used / %total "
|
||||
threshold_degraded = "10%"
|
||||
}
|
||||
memory {
|
||||
format = " RAM %used / %total "
|
||||
threshold_degraded = "10%"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = " %d.%m. %H:%M "
|
||||
}
|
||||
tztime local {
|
||||
format = " %d.%m. %H:%M "
|
||||
}
|
||||
|
||||
tztime helsinki {
|
||||
format = " (HEL %H:%M) "
|
||||
timezone = "Europe/Helsinki"
|
||||
hide_if_equals_localtime = true
|
||||
}
|
||||
tztime helsinki {
|
||||
format = " (HEL %H:%M) "
|
||||
timezone = "Europe/Helsinki"
|
||||
hide_if_equals_localtime = true
|
||||
}
|
||||
''}";
|
||||
i3-conf = "${pkgs.writeText "i3config"
|
||||
''
|
||||
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
|
||||
set $mod Mod4
|
||||
set $mod Mod4
|
||||
|
||||
# Workspace names
|
||||
# to display names or symbols instead of plain workspace numbers you can use
|
||||
# something like: set $ws1 1:mail
|
||||
# set $ws2 2:
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
set $ws10 10
|
||||
set $ws11 11
|
||||
set $ws12 12
|
||||
set $ws13 13
|
||||
set $ws14 14
|
||||
set $ws15 15
|
||||
set $ws16 16
|
||||
set $ws17 17
|
||||
set $ws18 18
|
||||
set $ws19 19
|
||||
set $ws20 20
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
set $ws10 10
|
||||
set $ws11 11
|
||||
set $ws12 12
|
||||
set $ws13 13
|
||||
set $ws14 14
|
||||
set $ws15 15
|
||||
set $ws16 16
|
||||
set $ws17 17
|
||||
set $ws18 18
|
||||
set $ws19 19
|
||||
set $ws20 20
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
bindsym $mod+Mod1+1 workspace $ws11
|
||||
bindsym $mod+Mod1+2 workspace $ws12
|
||||
bindsym $mod+Mod1+3 workspace $ws13
|
||||
bindsym $mod+Mod1+4 workspace $ws14
|
||||
bindsym $mod+Mod1+5 workspace $ws15
|
||||
bindsym $mod+Mod1+6 workspace $ws16
|
||||
bindsym $mod+Mod1+7 workspace $ws17
|
||||
bindsym $mod+Mod1+8 workspace $ws18
|
||||
bindsym $mod+Mod1+9 workspace $ws19
|
||||
bindsym $mod+Mod1+0 workspace $ws20
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
bindsym $mod+Mod1+1 workspace $ws11
|
||||
bindsym $mod+Mod1+2 workspace $ws12
|
||||
bindsym $mod+Mod1+3 workspace $ws13
|
||||
bindsym $mod+Mod1+4 workspace $ws14
|
||||
bindsym $mod+Mod1+5 workspace $ws15
|
||||
bindsym $mod+Mod1+6 workspace $ws16
|
||||
bindsym $mod+Mod1+7 workspace $ws17
|
||||
bindsym $mod+Mod1+8 workspace $ws18
|
||||
bindsym $mod+Mod1+9 workspace $ws19
|
||||
bindsym $mod+Mod1+0 workspace $ws20
|
||||
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Ctrl+1 move container to workspace $ws1
|
||||
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
||||
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
||||
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
||||
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
||||
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
||||
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
||||
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
||||
bindsym $mod+Ctrl+9 move container to workspace $ws9
|
||||
bindsym $mod+Ctrl+0 move container to workspace $ws10
|
||||
bindsym $mod+Mod1+Ctrl+1 move container to workspace $ws11
|
||||
bindsym $mod+Mod1+Ctrl+2 move container to workspace $ws12
|
||||
bindsym $mod+Mod1+Ctrl+3 move container to workspace $ws13
|
||||
bindsym $mod+Mod1+Ctrl+4 move container to workspace $ws14
|
||||
bindsym $mod+Mod1+Ctrl+5 move container to workspace $ws15
|
||||
bindsym $mod+Mod1+Ctrl+6 move container to workspace $ws16
|
||||
bindsym $mod+Mod1+Ctrl+7 move container to workspace $ws17
|
||||
bindsym $mod+Mod1+Ctrl+8 move container to workspace $ws18
|
||||
bindsym $mod+Mod1+Ctrl+9 move container to workspace $ws19
|
||||
bindsym $mod+Mod1+Ctrl+0 move container to workspace $ws20
|
||||
bindsym $mod+Ctrl+1 move container to workspace $ws1
|
||||
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
||||
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
||||
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
||||
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
||||
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
||||
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
||||
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
||||
bindsym $mod+Ctrl+9 move container to workspace $ws9
|
||||
bindsym $mod+Ctrl+0 move container to workspace $ws10
|
||||
bindsym $mod+Mod1+Ctrl+1 move container to workspace $ws11
|
||||
bindsym $mod+Mod1+Ctrl+2 move container to workspace $ws12
|
||||
bindsym $mod+Mod1+Ctrl+3 move container to workspace $ws13
|
||||
bindsym $mod+Mod1+Ctrl+4 move container to workspace $ws14
|
||||
bindsym $mod+Mod1+Ctrl+5 move container to workspace $ws15
|
||||
bindsym $mod+Mod1+Ctrl+6 move container to workspace $ws16
|
||||
bindsym $mod+Mod1+Ctrl+7 move container to workspace $ws17
|
||||
bindsym $mod+Mod1+Ctrl+8 move container to workspace $ws18
|
||||
bindsym $mod+Mod1+Ctrl+9 move container to workspace $ws19
|
||||
bindsym $mod+Mod1+Ctrl+0 move container to workspace $ws20
|
||||
|
||||
# Move to workspace with focused container
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||||
bindsym $mod+Mod1+Shift+1 move container to workspace $ws11; workspace $ws11
|
||||
bindsym $mod+Mod1+Shift+2 move container to workspace $ws12; workspace $ws12
|
||||
bindsym $mod+Mod1+Shift+3 move container to workspace $ws13; workspace $ws13
|
||||
bindsym $mod+Mod1+Shift+4 move container to workspace $ws14; workspace $ws14
|
||||
bindsym $mod+Mod1+Shift+5 move container to workspace $ws15; workspace $ws15
|
||||
bindsym $mod+Mod1+Shift+6 move container to workspace $ws16; workspace $ws16
|
||||
bindsym $mod+Mod1+Shift+7 move container to workspace $ws17; workspace $ws17
|
||||
bindsym $mod+Mod1+Shift+8 move container to workspace $ws18; workspace $ws18
|
||||
bindsym $mod+Mod1+Shift+9 move container to workspace $ws19; workspace $ws19
|
||||
bindsym $mod+Mod1+Shift+0 move container to workspace $ws20; workspace $ws20
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||||
bindsym $mod+Mod1+Shift+1 move container to workspace $ws11; workspace $ws11
|
||||
bindsym $mod+Mod1+Shift+2 move container to workspace $ws12; workspace $ws12
|
||||
bindsym $mod+Mod1+Shift+3 move container to workspace $ws13; workspace $ws13
|
||||
bindsym $mod+Mod1+Shift+4 move container to workspace $ws14; workspace $ws14
|
||||
bindsym $mod+Mod1+Shift+5 move container to workspace $ws15; workspace $ws15
|
||||
bindsym $mod+Mod1+Shift+6 move container to workspace $ws16; workspace $ws16
|
||||
bindsym $mod+Mod1+Shift+7 move container to workspace $ws17; workspace $ws17
|
||||
bindsym $mod+Mod1+Shift+8 move container to workspace $ws18; workspace $ws18
|
||||
bindsym $mod+Mod1+Shift+9 move container to workspace $ws19; workspace $ws19
|
||||
bindsym $mod+Mod1+Shift+0 move container to workspace $ws20; workspace $ws20
|
||||
|
||||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||||
default_border pixel 3
|
||||
default_floating_border normal
|
||||
default_border pixel 3
|
||||
default_floating_border normal
|
||||
|
||||
# Hide borders
|
||||
hide_edge_borders none
|
||||
hide_edge_borders none
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font xft:URWGothic-Book 14
|
||||
font xft:URWGothic-Book 14
|
||||
|
||||
# Use Mouse+$mod to drag floating windows
|
||||
floating_modifier $mod
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec urxvt
|
||||
bindsym $mod+Return exec urxvt
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start program launcher
|
||||
bindsym $mod+d exec --no-startup-id "rofi -theme 'Arc-Dark' -show combi -combi-modes 'run,ssh' -modes combi"
|
||||
bindsym $mod+d exec --no-startup-id "rofi -theme 'Arc-Dark' -show combi -combi-modes 'run,ssh' -modes combi"
|
||||
|
||||
# change focus
|
||||
# bindsym $mod+i focus left
|
||||
# bindsym $mod+n focus down
|
||||
# bindsym $mod+e focus up
|
||||
# bindsym $mod+o focus right
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
# MARK!
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
# bindsym $mod+Shift+i move left
|
||||
# bindsym $mod+Shift+n move down
|
||||
# bindsym $mod+Shift+e move up
|
||||
# bindsym $mod+Shift+o move right
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
# MARK!
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split orientation
|
||||
# bindsym $mod+h split h;exec notify-send 'tile horizontally'
|
||||
bindsym $mod+e split h;exec notify-send 'tile horizontally'
|
||||
bindsym $mod+e split h;exec notify-send 'tile horizontally'
|
||||
# MARK!
|
||||
bindsym $mod+v split v;exec notify-send 'tile vertically'
|
||||
bindsym $mod+v split v;exec notify-send 'tile vertically'
|
||||
|
||||
# toggle fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
# bindsym $mod+l layout toggle split
|
||||
# MARK!
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# Resize window (you can also use the mouse for that)
|
||||
bindsym $mod+r mode "resize"
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 5 px or 5 ppt
|
||||
bindsym j resize grow height 5 px or 5 ppt
|
||||
bindsym k resize shrink height 5 px or 5 ppt
|
||||
bindsym l resize grow width 5 px or 5 ppt
|
||||
# bindsym i resize shrink width 5 px or 5 ppt
|
||||
# bindsym n resize grow height 5 px or 5 ppt
|
||||
# bindsym e resize shrink height 5 px or 5 ppt
|
||||
# bindsym o resize grow width 5 px or 5 ppt
|
||||
bindsym $mod+r mode "resize"
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 5 px or 5 ppt
|
||||
bindsym j resize grow height 5 px or 5 ppt
|
||||
bindsym k resize shrink height 5 px or 5 ppt
|
||||
bindsym l resize grow width 5 px or 5 ppt
|
||||
# bindsym i resize shrink width 5 px or 5 ppt
|
||||
# bindsym n resize grow height 5 px or 5 ppt
|
||||
# bindsym e resize shrink height 5 px or 5 ppt
|
||||
# bindsym o resize grow width 5 px or 5 ppt
|
||||
# MARK!
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# exit resize mode: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
# Color palette used for the terminal ( ~/.Xresources file )
|
||||
# Colors are gathered based on the documentation:
|
||||
|
@ -299,259 +299,259 @@ mode "resize" {
|
|||
# to:
|
||||
# background $term_background
|
||||
# Same logic applied to everything else.
|
||||
set_from_resource $term_background background
|
||||
set_from_resource $term_foreground foreground
|
||||
set_from_resource $term_color0 color0
|
||||
set_from_resource $term_color1 color1
|
||||
set_from_resource $term_color2 color2
|
||||
set_from_resource $term_color3 color3
|
||||
set_from_resource $term_color4 color4
|
||||
set_from_resource $term_color5 color5
|
||||
set_from_resource $term_color6 color6
|
||||
set_from_resource $term_color7 color7
|
||||
set_from_resource $term_color8 color8
|
||||
set_from_resource $term_color9 color9
|
||||
set_from_resource $term_color10 color10
|
||||
set_from_resource $term_color11 color11
|
||||
set_from_resource $term_color12 color12
|
||||
set_from_resource $term_color13 color13
|
||||
set_from_resource $term_color14 color14
|
||||
set_from_resource $term_color15 color15
|
||||
set_from_resource $term_background background
|
||||
set_from_resource $term_foreground foreground
|
||||
set_from_resource $term_color0 color0
|
||||
set_from_resource $term_color1 color1
|
||||
set_from_resource $term_color2 color2
|
||||
set_from_resource $term_color3 color3
|
||||
set_from_resource $term_color4 color4
|
||||
set_from_resource $term_color5 color5
|
||||
set_from_resource $term_color6 color6
|
||||
set_from_resource $term_color7 color7
|
||||
set_from_resource $term_color8 color8
|
||||
set_from_resource $term_color9 color9
|
||||
set_from_resource $term_color10 color10
|
||||
set_from_resource $term_color11 color11
|
||||
set_from_resource $term_color12 color12
|
||||
set_from_resource $term_color13 color13
|
||||
set_from_resource $term_color14 color14
|
||||
set_from_resource $term_color15 color15
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status if available)
|
||||
bar {
|
||||
i3bar_command i3bar
|
||||
status_command i3status
|
||||
position bottom
|
||||
bar {
|
||||
i3bar_command i3bar
|
||||
status_command i3status
|
||||
position bottom
|
||||
|
||||
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
|
||||
tray_output primary
|
||||
tray_output primary
|
||||
|
||||
bindsym button4 nop
|
||||
bindsym button5 nop
|
||||
strip_workspace_numbers yes
|
||||
bindsym button4 nop
|
||||
bindsym button5 nop
|
||||
strip_workspace_numbers yes
|
||||
|
||||
colors {
|
||||
background #222D31
|
||||
statusline #F9FAF9
|
||||
separator #454947
|
||||
colors {
|
||||
background #222D31
|
||||
statusline #F9FAF9
|
||||
separator #454947
|
||||
|
||||
# border backgr. text
|
||||
focused_workspace #F9FAF9 #16a085 #292F34
|
||||
active_workspace #595B5B #353836 #FDF6E3
|
||||
inactive_workspace #595B5B #222D31 #EEE8D5
|
||||
binding_mode #16a085 #2C2C2C #F9FAF9
|
||||
urgent_workspace #16a085 #FDF6E3 #E5201D
|
||||
}
|
||||
}
|
||||
focused_workspace #F9FAF9 #16a085 #292F34
|
||||
active_workspace #595B5B #353836 #FDF6E3
|
||||
inactive_workspace #595B5B #222D31 #EEE8D5
|
||||
binding_mode #16a085 #2C2C2C #F9FAF9
|
||||
urgent_workspace #16a085 #FDF6E3 #E5201D
|
||||
}
|
||||
}
|
||||
|
||||
# Theme colors
|
||||
# class border backgr. text indic. child_border
|
||||
client.focused #556064 #556064 #80FFF9 #FDF6E3
|
||||
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
client.focused #556064 #556064 #80FFF9 #FDF6E3
|
||||
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
|
||||
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
|
||||
client.background #2B2C2B
|
||||
client.background #2B2C2B
|
||||
|
||||
#############################
|
||||
### settings for i3-gaps: ###
|
||||
#############################
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 2
|
||||
gaps outer 0
|
||||
gaps inner 2
|
||||
gaps outer 0
|
||||
|
||||
# Smart gaps (gaps used if only more than one container on the workspace)
|
||||
smart_gaps on
|
||||
smart_gaps on
|
||||
|
||||
# Smart borders (draw borders around container only if it is not the only container on this workspace)
|
||||
smart_borders on
|
||||
smart_borders on
|
||||
|
||||
# Screen brightness controls
|
||||
bindcode 232 exec brightnessctl set 5%-
|
||||
bindcode 233 exec --no-startup-id brightnessctl set 5%+
|
||||
bindcode 232 exec brightnessctl set 5%-
|
||||
bindcode 233 exec --no-startup-id brightnessctl set 5%+
|
||||
|
||||
exec --no-startup-id nm-applet --sm-disable
|
||||
exec --no-startup-id nm-applet --sm-disable
|
||||
''}";
|
||||
Xresources = "${pkgs.writeText "Xresources" ''
|
||||
Xft.dpi: 96
|
||||
Xft.antialias: true
|
||||
Xft.hinting: true
|
||||
Xft.rgba: rgb
|
||||
Xft.autohint: false
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.dpi: 96
|
||||
Xft.antialias: true
|
||||
Xft.hinting: true
|
||||
Xft.rgba: rgb
|
||||
Xft.autohint: false
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.lcdfilter: lcddefault
|
||||
|
||||
XTerm*background: #222D31
|
||||
XTerm*foreground: #d8d8d8
|
||||
XTerm*pointerColor: #1ABB9B
|
||||
XTerm*faceName: Fixed
|
||||
XTerm*faceSize: 11
|
||||
XTerm*reverseVideo: on
|
||||
XTerm*selectToClipboard: true
|
||||
XTerm*background: #222D31
|
||||
XTerm*foreground: #d8d8d8
|
||||
XTerm*pointerColor: #1ABB9B
|
||||
XTerm*faceName: Fixed
|
||||
XTerm*faceSize: 11
|
||||
XTerm*reverseVideo: on
|
||||
XTerm*selectToClipboard: true
|
||||
|
||||
*background: #222D31
|
||||
*foreground: #d8d8d8
|
||||
*fading: 8
|
||||
*fadeColor: black
|
||||
*cursorColor: #1ABB9B
|
||||
*pointerColorBackground: #2B2C2B
|
||||
*pointerColorForeground: #16A085
|
||||
*background: #222D31
|
||||
*foreground: #d8d8d8
|
||||
*fading: 8
|
||||
*fadeColor: black
|
||||
*cursorColor: #1ABB9B
|
||||
*pointerColorBackground: #2B2C2B
|
||||
*pointerColorForeground: #16A085
|
||||
|
||||
!! black dark/light
|
||||
*color0: #222D31
|
||||
*color8: #585858
|
||||
!! black dark/light
|
||||
*color0: #222D31
|
||||
*color8: #585858
|
||||
|
||||
!! red dark/light
|
||||
*color1: #ab4642
|
||||
*color9: #ab4642
|
||||
!! red dark/light
|
||||
*color1: #ab4642
|
||||
*color9: #ab4642
|
||||
|
||||
!! green dark/light
|
||||
*color2: #7E807E
|
||||
*color10: #8D8F8D
|
||||
!! green dark/light
|
||||
*color2: #7E807E
|
||||
*color10: #8D8F8D
|
||||
|
||||
!! yellow dark/light
|
||||
*color3: #f7ca88
|
||||
*color11: #f7ca88
|
||||
!! yellow dark/light
|
||||
*color3: #f7ca88
|
||||
*color11: #f7ca88
|
||||
|
||||
!! blue dark/light
|
||||
*color4: #7cafc2
|
||||
*color12: #7cafc2
|
||||
!! blue dark/light
|
||||
*color4: #7cafc2
|
||||
*color12: #7cafc2
|
||||
|
||||
!! magenta dark/light
|
||||
*color5: #ba8baf
|
||||
*color13: #ba8baf
|
||||
!! magenta dark/light
|
||||
*color5: #ba8baf
|
||||
*color13: #ba8baf
|
||||
|
||||
!! cyan dark/light
|
||||
*color6: #1ABB9B
|
||||
*color14: #1ABB9B
|
||||
!! cyan dark/light
|
||||
*color6: #1ABB9B
|
||||
*color14: #1ABB9B
|
||||
|
||||
!! white dark/light
|
||||
*color7: #d8d8d8
|
||||
*color15: #f8f8f8
|
||||
!! white dark/light
|
||||
*color7: #d8d8d8
|
||||
*color15: #f8f8f8
|
||||
|
||||
Xcursor.theme: xcursor-breeze
|
||||
Xcursor.size: 0
|
||||
Xcursor.theme: xcursor-breeze
|
||||
Xcursor.size: 0
|
||||
|
||||
URxvt.font: 9x15,xft:TerminessTTFNerdFontMono
|
||||
URxvt.font: 9x15,xft:TerminessTTFNerdFontMono
|
||||
|
||||
! alternative font settings with 'terminus':
|
||||
! URxvt.font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
|
||||
! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
|
||||
!! terminus names see end of file!
|
||||
! alternative font settings with 'terminus':
|
||||
! URxvt.font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
|
||||
! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
|
||||
!! terminus names see end of file!
|
||||
|
||||
URxvt.depth: 32
|
||||
URxvt.background: [100]#0f0f0f
|
||||
URxvt.foreground: #a0a0a0
|
||||
URxvt*scrollBar: false
|
||||
URxvt*mouseWheelScrollPage: false
|
||||
URxvt*cursorBlink: true
|
||||
URxvt*background: black
|
||||
URxvt*saveLines: 5000
|
||||
URxvt.depth: 32
|
||||
URxvt.background: [100]#0f0f0f
|
||||
URxvt.foreground: #a0a0a0
|
||||
URxvt*scrollBar: false
|
||||
URxvt*mouseWheelScrollPage: false
|
||||
URxvt*cursorBlink: true
|
||||
URxvt*background: black
|
||||
URxvt*saveLines: 5000
|
||||
|
||||
! for 'fake' transparency (without Compton) uncomment the following three lines
|
||||
! URxvt*inheritPixmap: true
|
||||
! URxvt*transparent: true
|
||||
! URxvt*shading: 138
|
||||
! for 'fake' transparency (without Compton) uncomment the following three lines
|
||||
! URxvt*inheritPixmap: true
|
||||
! URxvt*transparent: true
|
||||
! URxvt*shading: 138
|
||||
|
||||
! Normal copy-paste keybindings without perls
|
||||
URxvt.iso14755: false
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
!Xterm escape codes, word by word movement
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Shift-Control-Left: \033[1;6D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
URxvt.keysym.Shift-Control-Right: \033[1;6C
|
||||
URxvt.keysym.Control-Up: \033[1;5A
|
||||
URxvt.keysym.Shift-Control-Up: \033[1;6A
|
||||
URxvt.keysym.Control-Down: \033[1;5B
|
||||
URxvt.keysym.Shift-Control-Down: \033[1;6B
|
||||
! Normal copy-paste keybindings without perls
|
||||
URxvt.iso14755: false
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
!Xterm escape codes, word by word movement
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Shift-Control-Left: \033[1;6D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
URxvt.keysym.Shift-Control-Right: \033[1;6C
|
||||
URxvt.keysym.Control-Up: \033[1;5A
|
||||
URxvt.keysym.Shift-Control-Up: \033[1;6A
|
||||
URxvt.keysym.Control-Down: \033[1;5B
|
||||
URxvt.keysym.Shift-Control-Down: \033[1;6B
|
||||
''}";
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
i3status rofi arandr btop
|
||||
firefox
|
||||
telegram-desktop
|
||||
signal-desktop discord
|
||||
tidal-hifi vlc pavucontrol viewnior
|
||||
xfce.mousepad pcmanfm libreoffice evince
|
||||
brightnessctl networkmanagerapplet
|
||||
zotero
|
||||
flameshot
|
||||
speedcrunch
|
||||
];
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
i3status rofi arandr btop
|
||||
firefox
|
||||
telegram-desktop
|
||||
signal-desktop discord
|
||||
tidal-hifi vlc pavucontrol viewnior
|
||||
xfce.mousepad pcmanfm libreoffice evince
|
||||
brightnessctl networkmanagerapplet
|
||||
zotero
|
||||
flameshot
|
||||
speedcrunch
|
||||
];
|
||||
|
||||
services = {
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "vili";
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
sessionCommands = ''${pkgs.xorg.xrdb}/bin/xrdb -merge < ${Xresources}'';
|
||||
};
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
configFile = i3-conf;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = "vili";
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
sessionCommands = ''${pkgs.xorg.xrdb}/bin/xrdb -merge < ${Xresources}'';
|
||||
};
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
configFile = i3-conf;
|
||||
};
|
||||
};
|
||||
|
||||
printing.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
printing.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.pulseaudio = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
nixpkgs.config.pulseaudio = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
programs.firefox = {
|
||||
preferences = {
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
};
|
||||
enable = true;
|
||||
preferencesStatus = "locked";
|
||||
policies = {
|
||||
ExtensionSettings = {
|
||||
"*".installation_mode = "blocked";
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.firefox = {
|
||||
preferences = {
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
};
|
||||
enable = true;
|
||||
preferencesStatus = "locked";
|
||||
policies = {
|
||||
ExtensionSettings = {
|
||||
"*".installation_mode = "blocked";
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "breeze";
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "breeze";
|
||||
};
|
||||
|
||||
systemd.services.i3statusSymlink = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Symlink for i3status";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "vili";
|
||||
ExecStartPre = ''${pkgs.coreutils-full}/bin/mkdir -p /home/vili/.config/i3status'';
|
||||
ExecStart = ''${pkgs.coreutils-full}/bin/ln -sf ${i3status-conf} /home/vili/.config/i3status/config'';
|
||||
};
|
||||
};
|
||||
systemd.services.i3statusSymlink = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Symlink for i3status";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "vili";
|
||||
ExecStartPre = ''${pkgs.coreutils-full}/bin/mkdir -p /home/vili/.config/i3status'';
|
||||
ExecStart = ''${pkgs.coreutils-full}/bin/ln -sf ${i3status-conf} /home/vili/.config/i3status/config'';
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
"text/plain" = "org.xfce.mousepad.desktop";
|
||||
"inode/directory" = "pcmanfm.description";
|
||||
};
|
||||
xdg.mime.defaultApplications = {
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
"text/plain" = "org.xfce.mousepad.desktop";
|
||||
"inode/directory" = "pcmanfm.description";
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
}
|
||||
security.polkit.enable = true;
|
||||
}
|
||||
|
|
284
development.nix
284
development.nix
|
@ -2,164 +2,164 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
#################### Git configuration ####################
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
config = {
|
||||
user = {
|
||||
email = "vili.m.sinerva@gmail.com";
|
||||
name = "Vili Sinervä";
|
||||
signingkey = "/home/vili/.ssh/id_ed25519.pub";
|
||||
};
|
||||
merge = {
|
||||
ff = "true";
|
||||
};
|
||||
pull = {
|
||||
ff = "only";
|
||||
};
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = "true";
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
config = {
|
||||
user = {
|
||||
email = "vili.m.sinerva@gmail.com";
|
||||
name = "Vili Sinervä";
|
||||
signingkey = "/home/vili/.ssh/id_ed25519.pub";
|
||||
};
|
||||
merge = {
|
||||
ff = "true";
|
||||
};
|
||||
pull = {
|
||||
ff = "only";
|
||||
};
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = "true";
|
||||
};
|
||||
};
|
||||
|
||||
#################### Packages ####################
|
||||
environment.systemPackages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
gcc
|
||||
gdb
|
||||
nodejs-slim
|
||||
clang clang-tools clang-analyzer
|
||||
docker-compose docker
|
||||
python311
|
||||
python311Packages.pip
|
||||
pypy3
|
||||
rustup
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
gcc
|
||||
gdb
|
||||
nodejs-slim
|
||||
clang clang-tools clang-analyzer
|
||||
docker-compose docker
|
||||
python311
|
||||
python311Packages.pip
|
||||
pypy3
|
||||
rustup
|
||||
];
|
||||
|
||||
#################### Neovim configuration ####################
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [ nerdtree nerdtree-git-plugin
|
||||
vim-gitgutter vim-fugitive vim-tmux-navigator
|
||||
coc-nvim coc-pairs
|
||||
coc-clangd coc-cmake
|
||||
coc-docker
|
||||
coc-json
|
||||
coc-ltex
|
||||
coc-markdownlint
|
||||
coc-sh
|
||||
coc-toml
|
||||
coc-yaml
|
||||
coc-pyright
|
||||
coc-tsserver
|
||||
coc-rust-analyzer
|
||||
vim-nix
|
||||
];
|
||||
};
|
||||
customRC =
|
||||
let
|
||||
coc-config = "${pkgs.writeTextDir "coc-settings.json"
|
||||
''
|
||||
{
|
||||
"workspace.ignoredFolders": [
|
||||
"$HOME",
|
||||
"$HOME/.cargo/**",
|
||||
"$HOME/.rustup/**"
|
||||
],
|
||||
rust-analyzer.inlayHints.bindingModeHints.enable: true,
|
||||
rust-analyzer.inlayHints.closureReturnTypeHints.enable: "always",
|
||||
rust-analyzer.inlayHints.discriminantHints.enable: "always",
|
||||
rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "always",
|
||||
rust-analyzer.inlayHints.expressionAdjustmentHints.hideOutsideUnsafe: true,
|
||||
rust-analyzer.inlayHints.lifetimeElisionHints.enable: "always",
|
||||
rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames: true
|
||||
}
|
||||
''}";
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [ nerdtree nerdtree-git-plugin
|
||||
vim-gitgutter vim-fugitive vim-tmux-navigator
|
||||
coc-nvim coc-pairs
|
||||
coc-clangd coc-cmake
|
||||
coc-docker
|
||||
coc-json
|
||||
coc-ltex
|
||||
coc-markdownlint
|
||||
coc-sh
|
||||
coc-toml
|
||||
coc-yaml
|
||||
coc-pyright
|
||||
coc-tsserver
|
||||
coc-rust-analyzer
|
||||
vim-nix
|
||||
];
|
||||
};
|
||||
customRC =
|
||||
let
|
||||
coc-config = "${pkgs.writeTextDir "coc-settings.json"
|
||||
''
|
||||
{
|
||||
"workspace.ignoredFolders": [
|
||||
"$HOME",
|
||||
"$HOME/.cargo/**",
|
||||
"$HOME/.rustup/**"
|
||||
],
|
||||
rust-analyzer.inlayHints.bindingModeHints.enable: true,
|
||||
rust-analyzer.inlayHints.closureReturnTypeHints.enable: "always",
|
||||
rust-analyzer.inlayHints.discriminantHints.enable: "always",
|
||||
rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "always",
|
||||
rust-analyzer.inlayHints.expressionAdjustmentHints.hideOutsideUnsafe: true,
|
||||
rust-analyzer.inlayHints.lifetimeElisionHints.enable: "always",
|
||||
rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames: true
|
||||
}
|
||||
''}";
|
||||
|
||||
in
|
||||
''
|
||||
syntax on
|
||||
set foldmethod=syntax
|
||||
in
|
||||
''
|
||||
syntax on
|
||||
set foldmethod=syntax
|
||||
|
||||
set number
|
||||
" set relativenumber
|
||||
set colorcolumn=100
|
||||
set signcolumn=yes
|
||||
let NERDTreeShowLineNumbers=1
|
||||
set number
|
||||
" set relativenumber
|
||||
set colorcolumn=100
|
||||
set signcolumn=yes
|
||||
let NERDTreeShowLineNumbers=1
|
||||
|
||||
set background=dark
|
||||
set background=dark
|
||||
|
||||
set showcmd
|
||||
set scrolloff=16
|
||||
set showcmd
|
||||
set scrolloff=16
|
||||
|
||||
filetype plugin indent on
|
||||
set autoindent
|
||||
set shiftwidth=3
|
||||
set tabstop=3
|
||||
filetype plugin indent on
|
||||
set autoindent
|
||||
set shiftwidth=3
|
||||
set tabstop=3
|
||||
|
||||
|
||||
" Some servers have issues with backup files, see #649
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
" Having longer updatetime (default is 4000 ms = 4s) leads to noticeable
|
||||
" delays and poor user experience
|
||||
set updatetime=300
|
||||
" Some servers have issues with backup files, see #649
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
" Having longer updatetime (default is 4000 ms = 4s) leads to noticeable
|
||||
" delays and poor user experience
|
||||
set updatetime=300
|
||||
|
||||
|
||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
||||
" <C-g>u breaks current undo, please make your own choice.
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
" Navigate suggestion list with tab and shift-tab
|
||||
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
||||
" <C-g>u breaks current undo, please make your own choice.
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
" Navigate suggestion list with tab and shift-tab
|
||||
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||
|
||||
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
|
||||
autocmd BufEnter * if winnr() == winnr('h') && bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
|
||||
autocmd BufEnter * if winnr() == winnr('h') && bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
|
||||
" Start NERDTree. If a file is specified, move the cursor to its window.
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * NERDTree | if argc() > 0 || exists('s:std_in') | wincmd p | endif
|
||||
" Start NERDTree. If a file is specified, move the cursor to its window.
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * NERDTree | if argc() > 0 || exists('s:std_in') | wincmd p | endif
|
||||
|
||||
let g:coc_filetype_map = {'tex': 'latex'}
|
||||
let g:coc_config_home = "${coc-config}"
|
||||
let g:coc_filetype_map = {'tex': 'latex'}
|
||||
let g:coc_config_home = "${coc-config}"
|
||||
|
||||
let g:tmux_navigator_no_mappings = 1
|
||||
" noremap <silent> <C-i> :<C-U>TmuxNavigateLeft<cr>
|
||||
" noremap <silent> <C-n> :<C-U>TmuxNavigateDown<cr>
|
||||
" noremap <silent> <C-e> :<C-U>TmuxNavigateUp<cr>
|
||||
" noremap <silent> <C-o> :<C-U>TmuxNavigateRight<cr>
|
||||
noremap <silent> <C-h> :<C-U>TmuxNavigateLeft<cr>
|
||||
noremap <silent> <C-j> :<C-U>TmuxNavigateDown<cr>
|
||||
noremap <silent> <C-k> :<C-U>TmuxNavigateUp<cr>
|
||||
noremap <silent> <C-l> :<C-U>TmuxNavigateRight<cr>
|
||||
let g:tmux_navigator_no_mappings = 1
|
||||
" noremap <silent> <C-i> :<C-U>TmuxNavigateLeft<cr>
|
||||
" noremap <silent> <C-n> :<C-U>TmuxNavigateDown<cr>
|
||||
" noremap <silent> <C-e> :<C-U>TmuxNavigateUp<cr>
|
||||
" noremap <silent> <C-o> :<C-U>TmuxNavigateRight<cr>
|
||||
noremap <silent> <C-h> :<C-U>TmuxNavigateLeft<cr>
|
||||
noremap <silent> <C-j> :<C-U>TmuxNavigateDown<cr>
|
||||
noremap <silent> <C-k> :<C-U>TmuxNavigateUp<cr>
|
||||
noremap <silent> <C-l> :<C-U>TmuxNavigateRight<cr>
|
||||
|
||||
|
||||
" Noremap i h
|
||||
" Noremap <S-i> <S-h>
|
||||
" Noremap n j
|
||||
" Noremap <S-n> <S-j>
|
||||
" Noremap e k
|
||||
" Noremap <S-e> <S-k>
|
||||
" Noremap o l
|
||||
" Noremap <S-o> <S-l>
|
||||
" Noremap h i
|
||||
" Noremap <S-h> <S-i>
|
||||
" Noremap l o
|
||||
" Noremap <S-l> <S-o>
|
||||
" Noremap j e
|
||||
" Noremap <S-j> <S-e>
|
||||
" Nnoremap k n
|
||||
" Nnoremap <S-k> <S-n>
|
||||
" Let NERDTreeMapOpenExpl='\e'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
" Noremap i h
|
||||
" Noremap <S-i> <S-h>
|
||||
" Noremap n j
|
||||
" Noremap <S-n> <S-j>
|
||||
" Noremap e k
|
||||
" Noremap <S-e> <S-k>
|
||||
" Noremap o l
|
||||
" Noremap <S-o> <S-l>
|
||||
" Noremap h i
|
||||
" Noremap <S-h> <S-i>
|
||||
" Noremap l o
|
||||
" Noremap <S-l> <S-o>
|
||||
" Noremap j e
|
||||
" Noremap <S-j> <S-e>
|
||||
" Nnoremap k n
|
||||
" Nnoremap <S-k> <S-n>
|
||||
" Let NERDTreeMapOpenExpl='\e'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,143 +1,143 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "helium";
|
||||
firewall.allowedUDPPorts = [ 51820 51821 ];
|
||||
wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
autostart = false;
|
||||
address = [ "172.16.0.2/24" ];
|
||||
dns = [ "192.168.0.1" "vsinerva.fi" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-home";
|
||||
listenPort = 51820;
|
||||
networking = {
|
||||
hostName = "helium";
|
||||
firewall.allowedUDPPorts = [ 51820 51821 ];
|
||||
wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
autostart = false;
|
||||
address = [ "172.16.0.2/24" ];
|
||||
dns = [ "192.168.0.1" "vsinerva.fi" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-home";
|
||||
listenPort = 51820;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "wg.vsinerva.fi:51820";
|
||||
}
|
||||
];
|
||||
};
|
||||
wg1 = {
|
||||
autostart = false;
|
||||
address = [ "10.100.0.7/24" ];
|
||||
dns = [ "1.1.1.1" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-netflix";
|
||||
listenPort = 51821;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "wg.vsinerva.fi:51820";
|
||||
}
|
||||
];
|
||||
};
|
||||
wg1 = {
|
||||
autostart = false;
|
||||
address = [ "10.100.0.7/24" ];
|
||||
dns = [ "1.1.1.1" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-netflix";
|
||||
listenPort = 51821;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "XSYHg0utIR1j7kRsWFwuWNo4RPD47KP53cVa6qDPtRE=";
|
||||
allowedIPs = [ "0.0.0.0/0" "192.168.0.0/24" ];
|
||||
endpoint = "netflix.vsinerva.fi:51821";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
peers = [
|
||||
{
|
||||
publicKey = "XSYHg0utIR1j7kRsWFwuWNo4RPD47KP53cVa6qDPtRE=";
|
||||
allowedIPs = [ "0.0.0.0/0" "192.168.0.0/24" ];
|
||||
endpoint = "netflix.vsinerva.fi:51821";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
cores = 3;
|
||||
max-jobs = 4;
|
||||
};
|
||||
nix.settings = {
|
||||
cores = 3;
|
||||
max-jobs = 4;
|
||||
};
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
../desktop.nix
|
||||
../development.nix
|
||||
../misc/libinput.nix
|
||||
];
|
||||
disabledModules = [ "services/hardware/libinput.nix" ];
|
||||
imports = [
|
||||
../base.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
../desktop.nix
|
||||
../development.nix
|
||||
../misc/libinput.nix
|
||||
];
|
||||
disabledModules = [ "services/hardware/libinput.nix" ];
|
||||
|
||||
nixpkgs.overlays =
|
||||
[
|
||||
(final: prev:
|
||||
{
|
||||
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [ ../misc/mouse-accel.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
nixpkgs.overlays =
|
||||
[
|
||||
(final: prev:
|
||||
{
|
||||
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [ ../misc/mouse-accel.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zenmonitor moonlight-qt parsec-bin via
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
zenmonitor moonlight-qt parsec-bin via
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
hardware = {
|
||||
opengl.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
hardware = {
|
||||
opengl.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
videoDrivers = [ "amdgpu" "modesetting" ];
|
||||
deviceSection = ''
|
||||
Option "DRI" "2"
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
services = {
|
||||
xserver = {
|
||||
videoDrivers = [ "amdgpu" "modesetting" ];
|
||||
deviceSection = ''
|
||||
Option "DRI" "2"
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
|
||||
displayManager.setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360
|
||||
'';
|
||||
};
|
||||
displayManager.setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360
|
||||
'';
|
||||
};
|
||||
|
||||
libinput.mouse = {
|
||||
accelProfile = "custom";
|
||||
accelPointsMotion = [ 0.00000 0.02000 0.04000 0.06000 0.08000 0.10000 0.12000 0.14000 0.16000 0.18000 0.20000 0.25250 0.31000 0.37250 0.44000 0.51250 0.59000 0.67250 0.76000 0.85250 0.95000 1.15500 1.37000 1.59500 1.83000 2.07500 2.33000 2.59500 2.87000 3.15500 3.45000 3.75500 4.07000 4.39500 4.73000 5.07500 5.43000 5.79500 6.17000 6.55500 6.95000 7.35500 7.77000 8.19500 8.63000 9.07500 9.53000 9.99500 10.47000 10.95500 11.45000 11.95000 ];
|
||||
accelStepMotion = 0.05;
|
||||
};
|
||||
libinput.mouse = {
|
||||
accelProfile = "custom";
|
||||
accelPointsMotion = [ 0.00000 0.02000 0.04000 0.06000 0.08000 0.10000 0.12000 0.14000 0.16000 0.18000 0.20000 0.25250 0.31000 0.37250 0.44000 0.51250 0.59000 0.67250 0.76000 0.85250 0.95000 1.15500 1.37000 1.59500 1.83000 2.07500 2.33000 2.59500 2.87000 3.15500 3.45000 3.75500 4.07000 4.39500 4.73000 5.07500 5.43000 5.79500 6.17000 6.55500 6.95000 7.35500 7.77000 8.19500 8.63000 9.07500 9.53000 9.99500 10.47000 10.95500 11.45000 11.95000 ];
|
||||
accelStepMotion = 0.05;
|
||||
};
|
||||
|
||||
redshift = {
|
||||
executable = "/bin/redshift-gtk";
|
||||
enable = true;
|
||||
temperature = {
|
||||
night = 2800;
|
||||
day = 6500;
|
||||
};
|
||||
brightness = {
|
||||
night = "0.5";
|
||||
day = "1";
|
||||
};
|
||||
};
|
||||
redshift = {
|
||||
executable = "/bin/redshift-gtk";
|
||||
enable = true;
|
||||
temperature = {
|
||||
night = 2800;
|
||||
day = 6500;
|
||||
};
|
||||
brightness = {
|
||||
night = "0.5";
|
||||
day = "1";
|
||||
};
|
||||
};
|
||||
|
||||
devmon.enable = true;
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
location = {
|
||||
latitude = 60.17;
|
||||
longitude = 24.94;
|
||||
};
|
||||
devmon.enable = true;
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
location = {
|
||||
latitude = 60.17;
|
||||
longitude = 24.94;
|
||||
};
|
||||
|
||||
# Swap + hibernate
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}
|
||||
];
|
||||
boot.resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b";
|
||||
boot.kernelParams = [ "resume_offset=44537856" ];
|
||||
services.logind = {
|
||||
lidSwitch = "hibernate";
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}
|
||||
];
|
||||
boot.resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b";
|
||||
boot.kernelParams = [ "resume_offset=44537856" ];
|
||||
services.logind = {
|
||||
lidSwitch = "hibernate";
|
||||
};
|
||||
|
||||
# Keychron Q11
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nextcloud";
|
||||
networking.hostName = "nextcloud";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../nextcloud.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../nextcloud.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nixos-cpu";
|
||||
networking.hostName = "nixos-cpu";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../development.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../development.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "vaultwarden";
|
||||
networking.hostName = "vaultwarden";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../vaultwarden.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../vaultwarden.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
SSID = "ENTER_SSID";
|
||||
SSIDpassword = "ENTER_PASSWORD";
|
||||
interface = "wlan0";
|
||||
wg_interface = "end0";
|
||||
hostname = "netflix-huijaus";
|
||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||
SSID = "ENTER_SSID";
|
||||
SSIDpassword = "ENTER_PASSWORD";
|
||||
interface = "wlan0";
|
||||
wg_interface = "end0";
|
||||
hostname = "netflix-huijaus";
|
||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||
in {
|
||||
imports = [
|
||||
../base.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ git wireguard-tools qrencode ];
|
||||
environment.systemPackages = with pkgs; [ git wireguard-tools qrencode ];
|
||||
|
||||
# enable NAT
|
||||
networking.nat.enable = true;
|
||||
|
@ -33,14 +33,14 @@ in {
|
|||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||
postSetup = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
'';
|
||||
|
||||
# This undoes the above command
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
# This undoes the above command
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
'';
|
||||
|
||||
|
||||
|
||||
# Path to the private key file.
|
||||
#
|
||||
|
@ -78,39 +78,39 @@ ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_int
|
|||
};
|
||||
};
|
||||
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
domains = [ "netflood.ddnsfree.com" ];
|
||||
use = "web, web=checkip.dynu.com/, web-skip='IP Address'";
|
||||
server = "api.dynu.com";
|
||||
username = "VSinerva";
|
||||
passwordFile = ddPassFile;
|
||||
};
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
domains = [ "netflood.ddnsfree.com" ];
|
||||
use = "web, web=checkip.dynu.com/, web-skip='IP Address'";
|
||||
server = "api.dynu.com";
|
||||
username = "VSinerva";
|
||||
passwordFile = ddPassFile;
|
||||
};
|
||||
#################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE ####################
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
wireless = {
|
||||
enable = false;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
wireless = {
|
||||
enable = false;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
# Nextcloud instance
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
|
||||
services.nextcloud = {
|
||||
package = pkgs.nextcloud29;
|
||||
enable = true;
|
||||
hostName = "nextcloud.vsinerva.fi";
|
||||
autoUpdateApps.enable = true;
|
||||
https = true;
|
||||
maxUploadSize = "10G";
|
||||
config = {
|
||||
adminpassFile = "/var/lib/nextcloud/adminpass";
|
||||
};
|
||||
settings = {
|
||||
overwriteprotocol = "https";
|
||||
};
|
||||
};
|
||||
services.nextcloud = {
|
||||
package = pkgs.nextcloud29;
|
||||
enable = true;
|
||||
hostName = "nextcloud.vsinerva.fi";
|
||||
autoUpdateApps.enable = true;
|
||||
https = true;
|
||||
maxUploadSize = "10G";
|
||||
config = {
|
||||
adminpassFile = "/var/lib/nextcloud/adminpass";
|
||||
};
|
||||
settings = {
|
||||
overwriteprotocol = "https";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts =
|
||||
{
|
||||
${config.services.nextcloud.hostName} = {
|
||||
forceSSL = true;
|
||||
kTLS = true;
|
||||
sslCertificate = "/var/lib/nextcloud/nextcloud_fullchain.pem";
|
||||
sslCertificateKey = "/var/lib/nextcloud/nextcloud_privkey.pem";
|
||||
locations = {
|
||||
"/".proxyWebsockets = true;
|
||||
"~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/)" = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
services.nginx.virtualHosts =
|
||||
{
|
||||
${config.services.nextcloud.hostName} = {
|
||||
forceSSL = true;
|
||||
kTLS = true;
|
||||
sslCertificate = "/var/lib/nextcloud/nextcloud_fullchain.pem";
|
||||
sslCertificateKey = "/var/lib/nextcloud/nextcloud_privkey.pem";
|
||||
locations = {
|
||||
"/".proxyWebsockets = true;
|
||||
"~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/)" = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#Main local NFS server with /home/vili etc.
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||||
networking.firewall.allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||||
|
||||
services.nfs.server =
|
||||
{
|
||||
enable = true;
|
||||
# fixed rpc.statd port; for (proxmox) firewall
|
||||
statdPort = 4000;
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
extraNfsdConfig = '''';
|
||||
createMountPoints = true;
|
||||
exports = ''
|
||||
/mnt/srv/nixos-conf 192.168.0.0/23(rw,no_root_squash) 172.16.0.0/24(rw,no_root_squash) 192.168.2.0/23(no_root_squash) 192.168.4.0/22(no_root_squash) 192.168.8.0/23(no_root_squash)
|
||||
'';
|
||||
};
|
||||
}
|
104
syncthing.nix
104
syncthing.nix
|
@ -1,59 +1,59 @@
|
|||
# Syncthing instance
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "vili";
|
||||
dataDir = "/home/vili/";
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "vili";
|
||||
dataDir = "/home/vili/";
|
||||
|
||||
settings = {
|
||||
devices = {
|
||||
"helium" = {
|
||||
id = "2MRUBSY-NHXYMAW-SY22RHP-CNNMHKR-DPDKMM4-2XV5F6M-6KSNLQI-DD4EOAM";
|
||||
addresses = [ "tcp://helium.vsinerva.fi:22000" ];
|
||||
};
|
||||
"nixos-cpu" = {
|
||||
id = "ZX35ARB-3ULEUV3-NNUEREF-DEDWOJU-GE7A4PP-T7O43NI-SU564OD-E26HHA4";
|
||||
addresses = [ "tcp://nixos-cpu.vsinerva.fi:22000" ];
|
||||
};
|
||||
"phone" = {
|
||||
id = "K6QCK2R-BU65RAC-PHTGLIA-24IHDXE-N6VNBAW-QYREMVD-XWGWKRA-VX2BNAK";
|
||||
addresses = [ "tcp://172.16.0.3:22000" ];
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
devices = {
|
||||
"helium" = {
|
||||
id = "2MRUBSY-NHXYMAW-SY22RHP-CNNMHKR-DPDKMM4-2XV5F6M-6KSNLQI-DD4EOAM";
|
||||
addresses = [ "tcp://helium.vsinerva.fi:22000" ];
|
||||
};
|
||||
"nixos-cpu" = {
|
||||
id = "ZX35ARB-3ULEUV3-NNUEREF-DEDWOJU-GE7A4PP-T7O43NI-SU564OD-E26HHA4";
|
||||
addresses = [ "tcp://nixos-cpu.vsinerva.fi:22000" ];
|
||||
};
|
||||
"phone" = {
|
||||
id = "K6QCK2R-BU65RAC-PHTGLIA-24IHDXE-N6VNBAW-QYREMVD-XWGWKRA-VX2BNAK";
|
||||
addresses = [ "tcp://172.16.0.3:22000" ];
|
||||
};
|
||||
};
|
||||
|
||||
folders =
|
||||
let
|
||||
default = {
|
||||
devices = [ "helium" "nixos-cpu" ];
|
||||
versioning = {
|
||||
type = "trashcan";
|
||||
params.cleanoutDays = "30";
|
||||
};
|
||||
fsWatcherDelayS = 1;
|
||||
};
|
||||
in
|
||||
{
|
||||
"~/Documents" = default // { devices = [ "helium" "nixos-cpu" "phone" ]; } ;
|
||||
"~/Downloads" = default;
|
||||
"~/Music" = default;
|
||||
"~/Pictures" = default;
|
||||
"~/Projects" = default;
|
||||
"~/School" = default;
|
||||
"~/Videos" = default;
|
||||
"~/Zotero" = default;
|
||||
};
|
||||
folders =
|
||||
let
|
||||
default = {
|
||||
devices = [ "helium" "nixos-cpu" ];
|
||||
versioning = {
|
||||
type = "trashcan";
|
||||
params.cleanoutDays = "30";
|
||||
};
|
||||
fsWatcherDelayS = 1;
|
||||
};
|
||||
in
|
||||
{
|
||||
"~/Documents" = default // { devices = [ "helium" "nixos-cpu" "phone" ]; } ;
|
||||
"~/Downloads" = default;
|
||||
"~/Music" = default;
|
||||
"~/Pictures" = default;
|
||||
"~/Projects" = default;
|
||||
"~/School" = default;
|
||||
"~/Videos" = default;
|
||||
"~/Zotero" = default;
|
||||
};
|
||||
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
localAnnounceEnabled = false;
|
||||
globalAnnounceEnabled = false;
|
||||
natEnabled = false;
|
||||
relaysEnabled = false;
|
||||
};
|
||||
};
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
localAnnounceEnabled = false;
|
||||
globalAnnounceEnabled = false;
|
||||
natEnabled = false;
|
||||
relaysEnabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
#TCP/UDP 22000 for transfers and UDP 21027 for discovery
|
||||
openDefaultPorts = true;
|
||||
};
|
||||
}
|
||||
#TCP/UDP 22000 for transfers and UDP 21027 for discovery
|
||||
openDefaultPorts = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
# Nextcloud instance
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
environmentFile = "/var/lib/vaultwarden/vaultwarden.env";
|
||||
config = {
|
||||
DOMAIN = "https://vaultwarden.vsinerva.fi";
|
||||
LOGIN_RATELIMIT_MAX_BURST = 10;
|
||||
LOGIN_RATELIMIT_SECONDS = 60;
|
||||
ADMIN_RATELIMIT_MAX_BURST = 10;
|
||||
ADMIN_RATELIMIT_SECONDS = 60;
|
||||
SENDS_ALLOWED = true;
|
||||
EMERGENCY_ACCESS_ALLOWED = true;
|
||||
WEB_VAULT_ENABLED = true;
|
||||
SIGNUPS_ALLOWED = true;
|
||||
SIGNUPS_VERIFY = true;
|
||||
SIGNUPS_VERIFY_RESEND_TIME = 3600;
|
||||
SIGNUPS_VERIFY_RESEND_LIMIT = 5;
|
||||
SMTP_HOST = "smtp.gmail.com";
|
||||
SMTP_FROM = "vmsskv12@gmail.com";
|
||||
SMTP_FROM_NAME = "Vaultwarden";
|
||||
SMTP_SECURITY = "force_tls";
|
||||
SMTP_PRT = 587;
|
||||
SMTP_USERNAME = "vmsskv12@gmail.com";
|
||||
SMTP_AUTH_MECHANISM = "Login";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
environmentFile = "/var/lib/vaultwarden/vaultwarden.env";
|
||||
config = {
|
||||
DOMAIN = "https://vaultwarden.vsinerva.fi";
|
||||
LOGIN_RATELIMIT_MAX_BURST = 10;
|
||||
LOGIN_RATELIMIT_SECONDS = 60;
|
||||
ADMIN_RATELIMIT_MAX_BURST = 10;
|
||||
ADMIN_RATELIMIT_SECONDS = 60;
|
||||
SENDS_ALLOWED = true;
|
||||
EMERGENCY_ACCESS_ALLOWED = true;
|
||||
WEB_VAULT_ENABLED = true;
|
||||
SIGNUPS_ALLOWED = true;
|
||||
SIGNUPS_VERIFY = true;
|
||||
SIGNUPS_VERIFY_RESEND_TIME = 3600;
|
||||
SIGNUPS_VERIFY_RESEND_LIMIT = 5;
|
||||
SMTP_HOST = "smtp.gmail.com";
|
||||
SMTP_FROM = "vmsskv12@gmail.com";
|
||||
SMTP_FROM_NAME = "Vaultwarden";
|
||||
SMTP_SECURITY = "force_tls";
|
||||
SMTP_PRT = 587;
|
||||
SMTP_USERNAME = "vmsskv12@gmail.com";
|
||||
SMTP_AUTH_MECHANISM = "Login";
|
||||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
|
||||
virtualHosts."vaultwarden.vsinerva.fi" = {
|
||||
forceSSL = true;
|
||||
kTLS = true;
|
||||
sslCertificate = "/var/lib/vaultwarden/fullchain.pem";
|
||||
sslCertificateKey = "/var/lib/vaultwarden/privkey.pem";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
virtualHosts."vaultwarden.vsinerva.fi" = {
|
||||
forceSSL = true;
|
||||
kTLS = true;
|
||||
sslCertificate = "/var/lib/vaultwarden/fullchain.pem";
|
||||
sslCertificateKey = "/var/lib/vaultwarden/privkey.pem";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
28
vili.nix
28
vili.nix
|
@ -1,20 +1,20 @@
|
|||
#Config for main user 'vili'
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.vili = {
|
||||
isNormalUser = true;
|
||||
home = "/home/vili";
|
||||
description = "Vili Sinervä";
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" ];
|
||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbGREoK1uVny1s8FK3KZ74Wmaf0VtifhqPyK69C/Gez vili@helium" ];
|
||||
hashedPasswordFile = "/home/vili/.hashedPasswordFile";
|
||||
};
|
||||
users.users.vili = {
|
||||
isNormalUser = true;
|
||||
home = "/home/vili";
|
||||
description = "Vili Sinervä";
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" ];
|
||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbGREoK1uVny1s8FK3KZ74Wmaf0VtifhqPyK69C/Gez vili@helium" ];
|
||||
hashedPasswordFile = "/home/vili/.hashedPasswordFile";
|
||||
};
|
||||
|
||||
users.groups.vili.gid = 1000;
|
||||
users.groups.vili.gid = 1000;
|
||||
|
||||
programs.ssh = {
|
||||
startAgent = true;
|
||||
enableAskPassword = false;
|
||||
};
|
||||
programs.ssh = {
|
||||
startAgent = true;
|
||||
enableAskPassword = false;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue