mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-19 01:21:39 +01:00
formatting
This commit is contained in:
parent
9e4582d351
commit
68d67965f5
2 changed files with 179 additions and 177 deletions
|
@ -11,6 +11,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/thinkpad/configuration.nix
|
./hosts/thinkpad/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,208 +1,209 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
./hardware-configuration.nix
|
# Include the results of the hardware scan.
|
||||||
];
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "thinkpad"; # Define your hostname.
|
networking.hostName = "thinkpad"; # Define your hostname.
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedUDPPorts = [51820];
|
allowedUDPPorts = [ 51820 ];
|
||||||
checkReversePath = false;
|
checkReversePath = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
useXkbConfig = true; # use xkbOptions in tty.
|
useXkbConfig = true; # use xkbOptions in tty.
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
displayManager = {
|
displayManager = {
|
||||||
lightdm.enable = true;
|
lightdm.enable = true;
|
||||||
defaultSession = "none+awesome";
|
defaultSession = "none+awesome";
|
||||||
};
|
};
|
||||||
windowManager.awesome = {
|
windowManager.awesome = {
|
||||||
enable = true;
|
enable = true;
|
||||||
luaModules = with pkgs.luaPackages; [
|
luaModules = with pkgs.luaPackages; [
|
||||||
luarocks
|
luarocks
|
||||||
vicious
|
vicious
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver.layout = "us";
|
services.xserver.layout = "us";
|
||||||
services.xserver.xkbVariant = "dvorak-alt-intl";
|
services.xserver.xkbVariant = "dvorak-alt-intl";
|
||||||
services.xserver.displayManager.sessionCommands =
|
services.xserver.displayManager.sessionCommands =
|
||||||
"${pkgs.xorg.xmodmap}/bin/xmodmap ${pkgs.writeText "xkb-layout" ''
|
"${pkgs.xorg.xmodmap}/bin/xmodmap ${pkgs.writeText "xkb-layout" ''
|
||||||
keycode 108 = Mode_switch
|
keycode 108 = Mode_switch
|
||||||
keycode 94 = Shift_L NoSymbol Shift_L
|
keycode 94 = Shift_L NoSymbol Shift_L
|
||||||
keysym a = a A adiaeresis Adiaeresis
|
keysym a = a A adiaeresis Adiaeresis
|
||||||
keysym o = o O odiaeresis Odiaeresis
|
keysym o = o O odiaeresis Odiaeresis
|
||||||
keysym u = u U udiaeresis Udiaeresis
|
keysym u = u U udiaeresis Udiaeresis
|
||||||
keysym s = s S ssharp
|
keysym s = s S ssharp
|
||||||
''}";
|
''}";
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
environment.variables = { EDITOR = "vim"; };
|
environment.variables = { EDITOR = "vim"; };
|
||||||
|
|
||||||
# enable polkit
|
# enable polkit
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
# Define a user account.
|
# Define a user account.
|
||||||
users.users.rouven = {
|
users.users.rouven = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "video" "network" "libvirtd"];
|
extraGroups = [ "wheel" "video" "network" "libvirtd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
((vim_configurable.override { }).customize{
|
((vim_configurable.override { }).customize {
|
||||||
name = "vim";
|
name = "vim";
|
||||||
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
|
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
|
||||||
start = [ vim-nix vim-lastplace ];
|
start = [ vim-nix vim-lastplace ];
|
||||||
opt = [];
|
opt = [ ];
|
||||||
};
|
};
|
||||||
vimrcConfig.customRC = ''
|
vimrcConfig.customRC = ''
|
||||||
|
|
||||||
" basic commands bound to uppercase key
|
" basic commands bound to uppercase key
|
||||||
command Q q
|
command Q q
|
||||||
command W w
|
command W w
|
||||||
command Wq wq
|
command Wq wq
|
||||||
command WQ wq
|
command WQ wq
|
||||||
|
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set smartcase
|
set smartcase
|
||||||
set colorcolumn=120
|
set colorcolumn=120
|
||||||
set nowrap
|
set nowrap
|
||||||
syntax on
|
syntax on
|
||||||
highlight ColorColumn ctermbg=darkgray
|
highlight ColorColumn ctermbg=darkgray
|
||||||
|
|
||||||
nnoremap ; :
|
nnoremap ; :
|
||||||
nnoremap : ;
|
nnoremap : ;
|
||||||
vnoremap ; :
|
vnoremap ; :
|
||||||
vnoremap : ;
|
vnoremap : ;
|
||||||
|
|
||||||
" set space as leader
|
" set space as leader
|
||||||
nnoremap <SPACE> <Nop>
|
nnoremap <SPACE> <Nop>
|
||||||
let mapleader = " "
|
let mapleader = " "
|
||||||
|
|
||||||
|
|
||||||
" beautify indents
|
" beautify indents
|
||||||
:set list lcs=tab:\|\
|
:set list lcs=tab:\|\
|
||||||
|
|
||||||
"remove ex-mode shortcut
|
"remove ex-mode shortcut
|
||||||
nmap Q <Nop>
|
nmap Q <Nop>
|
||||||
|
|
||||||
" quickfixlist binds
|
" quickfixlist binds
|
||||||
nnoremap <C-j> :cnext<CR>
|
nnoremap <C-j> :cnext<CR>
|
||||||
nnoremap <C-k> :cprev<CR>
|
nnoremap <C-k> :cprev<CR>
|
||||||
|
|
||||||
" locallist binds
|
" locallist binds
|
||||||
nnoremap <C-l> :lnext<CR>
|
nnoremap <C-l> :lnext<CR>
|
||||||
nnoremap <C-h> :lprev<CR>
|
nnoremap <C-h> :lprev<CR>
|
||||||
|
|
||||||
" split keybinds
|
" split keybinds
|
||||||
nnoremap <leader>s :sp<CR>
|
nnoremap <leader>s :sp<CR>
|
||||||
nnoremap <leader>v :vs<CR>
|
nnoremap <leader>v :vs<CR>
|
||||||
|
|
||||||
nnoremap <leader>h <C-w>h
|
nnoremap <leader>h <C-w>h
|
||||||
nnoremap <leader>j <C-w>j
|
nnoremap <leader>j <C-w>j
|
||||||
nnoremap <leader>k <C-w>k
|
nnoremap <leader>k <C-w>k
|
||||||
nnoremap <leader>l <C-w>l
|
nnoremap <leader>l <C-w>l
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
# essentials
|
# essentials
|
||||||
wget
|
wget
|
||||||
git
|
git
|
||||||
gcc
|
gcc
|
||||||
htop
|
htop
|
||||||
tmux
|
tmux
|
||||||
dig
|
dig
|
||||||
traceroute
|
traceroute
|
||||||
killall
|
killall
|
||||||
xorg.xmodmap
|
xorg.xmodmap
|
||||||
# libs
|
# libs
|
||||||
libyubikey
|
libyubikey
|
||||||
libfido2
|
libfido2
|
||||||
# dev
|
# dev
|
||||||
jdk
|
jdk
|
||||||
maven
|
maven
|
||||||
# virtualisation
|
# virtualisation
|
||||||
virt-manager
|
virt-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.light.enable = true; # display brightness manager
|
programs.light.enable = true; # display brightness manager
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
services.devmon.enable = true;
|
services.devmon.enable = true;
|
||||||
services.pcscd.enable = true; # yubikey and smartcard stuff
|
services.pcscd.enable = true; # yubikey and smartcard stuff
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.fprintd.enable = true;
|
services.fprintd.enable = true;
|
||||||
|
|
||||||
# Automatically configure displays
|
# Automatically configure displays
|
||||||
services.autorandr.enable = true;
|
services.autorandr.enable = true;
|
||||||
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
"steam"
|
"steam"
|
||||||
"steam-original"
|
"steam-original"
|
||||||
"steam-runtime"
|
"steam-runtime"
|
||||||
"steam-run"
|
"steam-run"
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
system.copySystemConfiguration = true;
|
system.copySystemConfiguration = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "22.11"; # Did you read the comment?
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue