mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
modularized the config
This commit is contained in:
parent
fa032ceaca
commit
7e3ab85170
10 changed files with 375 additions and 355 deletions
|
@ -5,6 +5,8 @@
|
|||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../shared/vim.nix
|
||||
../../shared/input.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
@ -16,7 +18,7 @@
|
|||
networking.hostName = "thinkpad"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
allowedUDPPorts = [ 51820 ]; # used for wireguard
|
||||
checkReversePath = false;
|
||||
};
|
||||
|
||||
|
@ -48,91 +50,16 @@
|
|||
libinput.enable = true;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.layout = "us";
|
||||
services.xserver.xkbVariant = "dvorak-alt-intl";
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
"${pkgs.xorg.xmodmap}/bin/xmodmap ${pkgs.writeText "xkb-layout" ''
|
||||
keycode 108 = Mode_switch
|
||||
keycode 94 = Shift_L NoSymbol Shift_L
|
||||
keysym a = a A adiaeresis Adiaeresis
|
||||
keysym o = o O odiaeresis Odiaeresis
|
||||
keysym u = u U udiaeresis Udiaeresis
|
||||
keysym s = s S ssharp
|
||||
''}";
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
environment.variables = { EDITOR = "vim"; };
|
||||
|
||||
# enable polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
# Baseline of installed packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
((vim_configurable.override { }).customize {
|
||||
name = "vim";
|
||||
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
|
||||
start = [ vim-nix vim-lastplace ];
|
||||
opt = [ ];
|
||||
};
|
||||
vimrcConfig.customRC = ''
|
||||
|
||||
" basic commands bound to uppercase key
|
||||
command Q q
|
||||
command W w
|
||||
command Wq wq
|
||||
command WQ wq
|
||||
|
||||
set number relativenumber
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set smartcase
|
||||
set colorcolumn=120
|
||||
set nowrap
|
||||
syntax on
|
||||
highlight ColorColumn ctermbg=darkgray
|
||||
|
||||
nnoremap ; :
|
||||
nnoremap : ;
|
||||
vnoremap ; :
|
||||
vnoremap : ;
|
||||
|
||||
" set space as leader
|
||||
nnoremap <SPACE> <Nop>
|
||||
let mapleader = " "
|
||||
|
||||
|
||||
" beautify indents
|
||||
:set list lcs=tab:\|\
|
||||
|
||||
"remove ex-mode shortcut
|
||||
nmap Q <Nop>
|
||||
|
||||
" quickfixlist binds
|
||||
nnoremap <C-j> :cnext<CR>
|
||||
nnoremap <C-k> :cprev<CR>
|
||||
|
||||
" locallist binds
|
||||
nnoremap <C-l> :lnext<CR>
|
||||
nnoremap <C-h> :lprev<CR>
|
||||
|
||||
" split keybinds
|
||||
nnoremap <leader>s :sp<CR>
|
||||
nnoremap <leader>v :vs<CR>
|
||||
|
||||
nnoremap <leader>h <C-w>h
|
||||
nnoremap <leader>j <C-w>j
|
||||
nnoremap <leader>k <C-w>k
|
||||
nnoremap <leader>l <C-w>l
|
||||
'';
|
||||
}
|
||||
)
|
||||
# essentials
|
||||
wget
|
||||
git
|
||||
|
@ -148,6 +75,8 @@
|
|||
maven
|
||||
];
|
||||
|
||||
programs.light.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
|
@ -155,11 +84,14 @@
|
|||
|
||||
|
||||
# List services that you want to enable:
|
||||
services.blueman.enable = true;
|
||||
services.devmon.enable = true;
|
||||
services.pcscd.enable = true; # yubikey and smartcard stuff
|
||||
services.printing.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
devmon.enable = true;
|
||||
pcscd.enable = true; # yubikey and smartcard stuff
|
||||
printing.enable = true;
|
||||
fprintd.enable = true; # log in using fingerprint
|
||||
picom.enable = true;
|
||||
};
|
||||
|
||||
# Automatically configure displays
|
||||
services.autorandr.enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue