Added scripts to collect/deploy configs. Updated i3 and nixos configs.
This commit is contained in:
6
collect-configs.sh
Executable file
6
collect-configs.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp $HOME/.config/i3/config i3/config
|
||||||
|
cp /etc/nixos/configuration.nix nixos/configuration.nix
|
||||||
|
cp /etc/nixos/hardware-configuration.nix nixos/hardware-configuration.nix
|
||||||
|
cp /etc/nixos/security.nix nixos/security.nix
|
||||||
6
deploy-configs.sh
Executable file
6
deploy-configs.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp i3/config $HOME/.config/i3/config
|
||||||
|
cp nixos/configuration.nix /etc/nixos/configuration.nix
|
||||||
|
cp nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
|
||||||
|
cp nixos/security.nix /etc/nixos/security.nix
|
||||||
@@ -43,10 +43,10 @@ bindsym $mod+d exec dmenu_run
|
|||||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
bindsym $mod+j focus left
|
#bindsym $mod+j focus left
|
||||||
bindsym $mod+k focus down
|
#bindsym $mod+k focus down
|
||||||
bindsym $mod+l focus up
|
#bindsym $mod+l focus up
|
||||||
bindsym $mod+semicolon focus right
|
#bindsym $mod+semicolon focus right
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
# alternatively, you can use the cursor keys:
|
||||||
bindsym $mod+Left focus left
|
bindsym $mod+Left focus left
|
||||||
@@ -99,10 +99,10 @@ set $wspace3 3:console
|
|||||||
set $wspace4 4:file
|
set $wspace4 4:file
|
||||||
set $wspace5 5:edit
|
set $wspace5 5:edit
|
||||||
set $wspace6 6:pdf
|
set $wspace6 6:pdf
|
||||||
set $wspace7 7
|
set $wspace7 7:video
|
||||||
set $wspace8 8
|
set $wspace8 8
|
||||||
set $wspace9 9:chat
|
set $wspace9 9:chat
|
||||||
set $wspace10 10:video
|
set $wspace10 10
|
||||||
|
|
||||||
# rename workspaces
|
# rename workspaces
|
||||||
#rename workspace number 1 to $wspace1
|
#rename workspace number 1 to $wspace1
|
||||||
@@ -160,9 +160,11 @@ assign [class="(?i)^Nautilus$"] → $wspace4
|
|||||||
assign [class="(?i)^Gedit$"] → $wspace5
|
assign [class="(?i)^Gedit$"] → $wspace5
|
||||||
assign [class="(?i)^Evince$"] → $wspace6
|
assign [class="(?i)^Evince$"] → $wspace6
|
||||||
assign [class="(?i)^XpdfReader$"] → $wspace6
|
assign [class="(?i)^XpdfReader$"] → $wspace6
|
||||||
|
assign [class="(?i)^vlc$"] → $wspace7
|
||||||
|
assign [class="(?i)^mpv$"] → $wspace7
|
||||||
|
assign [class="(?i)^Transmission-gtk$"] → $wspace8
|
||||||
assign [class="(?i)^TelegramDesktop$"] → $wspace9
|
assign [class="(?i)^TelegramDesktop$"] → $wspace9
|
||||||
assign [class="(?i)^vlc$"] → $wspace10
|
assign [class="(?i)^Mattermost"] → $wspace9
|
||||||
assign [class="(?i)^mpv$"] → $wspace10
|
|
||||||
|
|
||||||
workspace_auto_back_and_forth yes
|
workspace_auto_back_and_forth yes
|
||||||
|
|
||||||
@@ -174,10 +176,11 @@ bindsym $mod+Shift+r restart
|
|||||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
# application shortcuts
|
# application shortcuts
|
||||||
bindsym $mod+i exec ~/Apps/idea.sh
|
bindsym $mod+i exec idea-community
|
||||||
bindsym $mod+o exec firefox
|
bindsym $mod+o exec firefox
|
||||||
bindsym $mod+g exec gedit
|
bindsym $mod+g exec gedit
|
||||||
bindsym $mod+n exec nautilus
|
bindsym $mod+n exec nautilus
|
||||||
|
bindsym $mod+l exec '/home/nnm/Apps/lock.sh'
|
||||||
|
|
||||||
# audio
|
# audio
|
||||||
bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%"
|
bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%"
|
||||||
@@ -225,4 +228,5 @@ exec --no-startup-id volumeicon
|
|||||||
exec --no-startup-id firefox
|
exec --no-startup-id firefox
|
||||||
exec --no-startup-id st -f "Liberation Mono:pixelsize=16:antialias=true:autohint=true"
|
exec --no-startup-id st -f "Liberation Mono:pixelsize=16:antialias=true:autohint=true"
|
||||||
exec --no-startup-id telegram-desktop
|
exec --no-startup-id telegram-desktop
|
||||||
|
exec --no-startup-id mattermost-desktop
|
||||||
|
exec --no-startup-id xautolock -time 10 -locker '/home/nnm/Apps/lock.sh'
|
||||||
235
nixos/configuration.nix
Normal file
235
nixos/configuration.nix
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./security.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "lenovo";
|
||||||
|
#wireless.enable = true;
|
||||||
|
useDHCP = false;
|
||||||
|
#wicd.enable = true;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n = {
|
||||||
|
consoleFont = "Lat2-Terminus16";
|
||||||
|
consoleKeyMap = "us";
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Prague";
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search by name, run:
|
||||||
|
# $ nix-env -qaP | grep wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wget
|
||||||
|
bind
|
||||||
|
vim
|
||||||
|
firefox
|
||||||
|
ranger
|
||||||
|
keepass
|
||||||
|
tdesktop
|
||||||
|
st
|
||||||
|
fish
|
||||||
|
transmission_gtk
|
||||||
|
wireshark
|
||||||
|
vlc
|
||||||
|
mpv
|
||||||
|
moc
|
||||||
|
libmtp
|
||||||
|
go-mtpfs
|
||||||
|
usbutils
|
||||||
|
binutils-unwrapped
|
||||||
|
patchelf
|
||||||
|
file
|
||||||
|
w3m
|
||||||
|
xpdf
|
||||||
|
highlight
|
||||||
|
mediainfo
|
||||||
|
evince
|
||||||
|
notepadqq
|
||||||
|
gnome3.adwaita-icon-theme
|
||||||
|
gnome3.gedit
|
||||||
|
gnome3.eog
|
||||||
|
gnome3.nautilus
|
||||||
|
gnome3.evolution
|
||||||
|
gnome3.gnome-keyring
|
||||||
|
libsecret
|
||||||
|
gnome3.file-roller
|
||||||
|
gnome3.seahorse
|
||||||
|
gnome3.gcr
|
||||||
|
gnome3.dconf
|
||||||
|
gimp
|
||||||
|
# libreoffice-fresh
|
||||||
|
xfontsel
|
||||||
|
xorg.xbacklight
|
||||||
|
volumeicon
|
||||||
|
ntfs3g
|
||||||
|
htop
|
||||||
|
git
|
||||||
|
lm_sensors
|
||||||
|
pavucontrol
|
||||||
|
openjdk8
|
||||||
|
#openjdk10
|
||||||
|
visualvm
|
||||||
|
scala
|
||||||
|
dotty
|
||||||
|
sbt
|
||||||
|
jetbrains.idea-community
|
||||||
|
protobuf3_5
|
||||||
|
openssl
|
||||||
|
openssl.dev
|
||||||
|
pv
|
||||||
|
#virtualbox
|
||||||
|
baobab
|
||||||
|
graphviz
|
||||||
|
wirelesstools
|
||||||
|
mattermost-desktop
|
||||||
|
openfortivpn
|
||||||
|
simplenote
|
||||||
|
i3lock
|
||||||
|
scrot
|
||||||
|
imagemagick
|
||||||
|
xautolock
|
||||||
|
squashfsTools
|
||||||
|
#skypeforlinux
|
||||||
|
atom
|
||||||
|
vscode
|
||||||
|
rpm
|
||||||
|
unzip
|
||||||
|
chromium
|
||||||
|
masterpdfeditor
|
||||||
|
telnet
|
||||||
|
geteltorito
|
||||||
|
gradle
|
||||||
|
nix-index
|
||||||
|
zoom-us
|
||||||
|
krita
|
||||||
|
maven
|
||||||
|
nodejs
|
||||||
|
jmeter
|
||||||
|
mongodb-tools
|
||||||
|
screen
|
||||||
|
p7zip
|
||||||
|
zlib.static
|
||||||
|
zlib.dev
|
||||||
|
gcc
|
||||||
|
#nextcloud-client
|
||||||
|
cmake
|
||||||
|
gnumake
|
||||||
|
gperf
|
||||||
|
#calibre
|
||||||
|
netcat-gnu
|
||||||
|
smartmontools
|
||||||
|
teamviewer
|
||||||
|
unrar
|
||||||
|
tcpdump
|
||||||
|
tcpflow
|
||||||
|
falkon
|
||||||
|
androidenv.androidPkgs_9_0.platform-tools
|
||||||
|
(python2.withPackages(ps: with ps; [ virtualenvwrapper jenkins-job-builder ]))
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fonts = with pkgs; [
|
||||||
|
source-code-pro
|
||||||
|
liberation_ttf
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
android_sdk.accept_license = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.bash.enableCompletion = true;
|
||||||
|
# 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;
|
||||||
|
services.teamviewer.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [ 88 8443 111 1039 1047 1048 2049 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 111 1039 1047 1048 2049 ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.printing.drivers = [ pkgs.splix ];
|
||||||
|
|
||||||
|
services.mongodb.enable = true;
|
||||||
|
|
||||||
|
# keyring
|
||||||
|
services.gnome3.gnome-keyring.enable = true;
|
||||||
|
services.gnome3.seahorse.enable = true;
|
||||||
|
services.gnome3.at-spi2-core.enable = true;
|
||||||
|
|
||||||
|
#programs.sway.enable = true;
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.layout = "us,ru";
|
||||||
|
services.xserver.xkbOptions = "grp:caps_toggle";
|
||||||
|
|
||||||
|
# Enable touchpad support.
|
||||||
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.extraUsers.nnm = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 1000;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
extraGroups = ["audio" "networkmanager" "wireshark" "vboxusers"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/export/development" = {
|
||||||
|
device = "/home/nnm/development";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/Downloads-pc" = {
|
||||||
|
device = "192.168.1.2:/Downloads";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["x-systemd.automount,noauto"];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nfs.server.enable = true;
|
||||||
|
services.nfs.server.exports = ''
|
||||||
|
/export 192.168.1.2(rw,fsid=0,no_subtree_check)
|
||||||
|
/export/development 192.168.1.2(rw,nohide,insecure,no_subtree_check)
|
||||||
|
'';
|
||||||
|
|
||||||
|
#virtualisation.virtualbox.host.enable = true;
|
||||||
|
#virtualisation.virtualbox.host.enableExtensionPack = true;
|
||||||
|
|
||||||
|
# This value determines the NixOS release with which your system is to be
|
||||||
|
# compatible, in order to avoid breaking some software such as database
|
||||||
|
# servers. You should change this only after NixOS release notes say you
|
||||||
|
# should.
|
||||||
|
system.stateVersion = "19.03"; # Did you read the comment?
|
||||||
|
}
|
||||||
37
nixos/hardware-configuration.nix
Normal file
37
nixos/hardware-configuration.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.cleanTmpDir = true;
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/a29debeb-54c8-44b8-ae1d-19de8032ee60";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ADDE-D2C3";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/88e4b0fa-ec8e-4235-88b1-9ad7721938be";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nix.maxJobs = lib.mkDefault 4;
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
}
|
||||||
47
nixos/security.nix
Normal file
47
nixos/security.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
security.pki.certificates = [
|
||||||
|
''
|
||||||
|
finfactory
|
||||||
|
==========
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIGTTCCBDWgAwIBAgIBATANBgkqhkiG9w0BAQsFADCBrzELMAkGA1UEBhMCQ1ox
|
||||||
|
FzAVBgNVBAgTDkN6ZWNoIHJlcHVibGljMQ8wDQYDVQQHEwZQcmFndWUxEzARBgNV
|
||||||
|
BAoTCkZpbkZhY3RvcnkxEzARBgNVBAsTCk9wZXJhdGlvbnMxKTAnBgNVBAMTIEZp
|
||||||
|
bkZhY3RvcnkgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJz
|
||||||
|
eXNAZmluZmFjdG9yeS5jb20wHhcNMTYwODA4MTQwOTAwWhcNMzYwODA4MTQwOTAw
|
||||||
|
WjCBrzELMAkGA1UEBhMCQ1oxFzAVBgNVBAgTDkN6ZWNoIHJlcHVibGljMQ8wDQYD
|
||||||
|
VQQHEwZQcmFndWUxEzARBgNVBAoTCkZpbkZhY3RvcnkxEzARBgNVBAsTCk9wZXJh
|
||||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EBBAQDAgAHMB4G
|
||||||
|
CWCGSAGG+EIBDQQRFg94Y2EgY2VydGlmaWNhdGUwDQYJKoZIhvcNAQELBQADggIB
|
||||||
|
ANWsZaLNa67StsBvn+YcSTHUTtXT22km+jsfMzgBxMGSfbyQcywUgJ1qCRI43xJJ
|
||||||
|
Fi7ZZ6jnMyQ/PWo8gA3+oYims8vspuXXz8jSM3IG4xYGvAElBjAfiI0dtrVvK7l9
|
||||||
|
/G41FCQmV7UcvTa7Lj0GkTP4qGwBSACXsSyKmDIYuxjhfdRx4f0cqOXzpKPQZ2Kv
|
||||||
|
tGGc1S3yUmvBwM4ebIOjUwe+zJVhsjjtCjEnMYh7s481wKP0yDcfmUansQWvWvtl
|
||||||
|
H77VOSB82B79OSIjY5DYtMLJLcMG6NDPm3DJa3qPHiNS2ROJS3rxASKXCS8ZUma1
|
||||||
|
AIFoEA7NwgJjdF2dqD/OUNFCUp+SCxOLptRHIgkzZJj0gvbKyMIU4azgfzUVyeEG
|
||||||
|
13NkicQWyJa1tF/rVXzWPB/hrfh0q685t5n7PHEO3iy0n8Ppw+AcoxK/rDDGga5F
|
||||||
|
dNrMgIWvn1xmceIBXFI7sXMn3+EXU7fKvi7dGc598vOc6yRMZz0nFOs7lkCzbAbd
|
||||||
|
yA41aJMOGYWyrYatnRzTy9/D7n0qhO0LodNs1TFTtn9z9dPplnrZuOGJgDEYlnOT
|
||||||
|
m34n5pUavtVns8THGd4QnxfV6rJzyP7L8tzj3nM3Nbj2+cQni3Y/gxVgO2OdNpjI
|
||||||
|
OPlWG7cYW793iDQsKKlFbV8TPziV1dgSOistImGRWptK
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
''
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user