mirror of
https://github.com/arnaucube/configs.git
synced 2026-02-10 12:36:42 +01:00
update nixos configs
- bin/screens: line to fix touchscreen rotation - add zathura config file (zathurarc) - nixos: - rearrange config files reusing most of configs in common-configuration.nix - add chuwi-configuration.nix
This commit is contained in:
2
.zshrc
2
.zshrc
@@ -52,6 +52,8 @@ RPROMPT=\$vcs_info_msg_0_%F{244}%*%f
|
|||||||
zstyle ':vcs_info:git:*' formats '%F{207}(%b)%f'
|
zstyle ':vcs_info:git:*' formats '%F{207}(%b)%f'
|
||||||
zstyle ':vcs_info:*' enable git
|
zstyle ':vcs_info:*' enable git
|
||||||
|
|
||||||
|
export PATH=$PATH:~/bin
|
||||||
|
|
||||||
# go
|
# go
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
export PATH=$PATH:~/go/bin
|
export PATH=$PATH:~/go/bin
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ if len(sys.argv)>2:
|
|||||||
# for fixing touch screen
|
# for fixing touch screen
|
||||||
# Check the input device ID with `xinput`.
|
# Check the input device ID with `xinput`.
|
||||||
# Check the display device name with `xrandr`.
|
# Check the display device name with `xrandr`.
|
||||||
|
#
|
||||||
# `xinput map-to-output <ID> <NAME>`
|
# `xinput map-to-output <ID> <NAME>`
|
||||||
# eg. xinput map-to-output 12 eDP-1
|
# eg. xinput map-to-output 12 eDP-1
|
||||||
|
#
|
||||||
|
# to rotate (90 degrees to right) the input of the touchscreen:
|
||||||
|
# `xinput set-prop 'pointer:Goodix Capacitive TouchScreen' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1`
|
||||||
|
|||||||
6
bin/timeatlock
Executable file
6
bin/timeatlock
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
current_time=$(date +"%H:%M")
|
||||||
|
battery_level=$(cat "/sys/class/power_supply/BAT0/capacity")
|
||||||
|
|
||||||
|
echo "timeatlock $current_time h, Battery level: $battery_level %"
|
||||||
@@ -177,7 +177,7 @@ default_border pixel 1
|
|||||||
for_window [window_role="alert"] floating enable
|
for_window [window_role="alert"] floating enable
|
||||||
|
|
||||||
# having installed feh (sudo apt install feh)
|
# having installed feh (sudo apt install feh)
|
||||||
exec feh --bg-fill ~/Sync/wallpapers/geometry02_croped1920x1080.png
|
exec feh --bg-fill ~/Sync-tablet/wallpapers/geometry02_croped1920x1080.png
|
||||||
exec xmodmap .Xmodmap
|
exec xmodmap .Xmodmap
|
||||||
|
|
||||||
# move current workspace to another display
|
# move current workspace to another display
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ cp ./.zshrc ~/.zshrc
|
|||||||
cp ./.sh_alias ~/.sh_alias
|
cp ./.sh_alias ~/.sh_alias
|
||||||
|
|
||||||
mkdir -p ~/bin
|
mkdir -p ~/bin
|
||||||
cp ./bin/ltx ~/bin/
|
cp -r ./bin/* ~/bin/
|
||||||
cp ./bin/screens ~/bin/
|
|
||||||
cp ./bin/wk ~/bin/
|
|
||||||
|
|
||||||
cp -r ./alacritty ~/.config/
|
cp -r ./alacritty ~/.config/
|
||||||
cp -r ./i3status ~/.config/
|
cp -r ./i3status ~/.config/
|
||||||
|
|
||||||
|
mkdir -p ~/.config/zathura
|
||||||
|
cp ./zathurarc ~/.config/zathura/
|
||||||
|
|
||||||
|
|
||||||
# assuming that Rust is installed
|
# assuming that Rust is installed
|
||||||
echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
|
echo "append .gitconfig of this repo lines to the .gitconfig system file to use delta gitdiff tool"
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
from time to time run the following commands to remove stuff from old generations
|
After nixos installation and config files in place, run the `../install-new-desktop.sh` script to put in place all the config files (vim,nvim,tmux,i3,etc)
|
||||||
|
|
||||||
|
|
||||||
|
From time to time run the following commands to remove stuff from old generations
|
||||||
```
|
```
|
||||||
# list old generations
|
# list old generations
|
||||||
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
||||||
@@ -10,6 +13,10 @@ sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations 9 10 11
|
|||||||
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +5
|
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +5
|
||||||
|
|
||||||
|
|
||||||
|
# update
|
||||||
|
`sudo nix-channel --update`
|
||||||
|
`sudo nixos-rebuild switch`
|
||||||
|
|
||||||
# to remove old programs
|
# to remove old programs
|
||||||
nix-collect-garbage --delete-old
|
nix-collect-garbage --delete-old
|
||||||
```
|
```
|
||||||
|
|||||||
66
nixos/chuwi-configuration.nix
Normal file
66
nixos/chuwi-configuration.nix
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# This file is meant to be renamed to `configuration.nix`
|
||||||
|
# Chuwi minibook NixOS configuration
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./common-configuration.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./private-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "chuwi"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.user = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "user";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
packages = with pkgs; [];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# 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.
|
||||||
|
# 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 = "24.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
# Chuwi specific:
|
||||||
|
# fix wifi issues
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# fix screen rotation issue
|
||||||
|
boot.kernelParams = [
|
||||||
|
"fbcon=rotate:1"
|
||||||
|
];
|
||||||
|
services.xserver.xrandrHeads = [
|
||||||
|
{
|
||||||
|
monitorConfig = "Option \"Rotate\" \"right\"";
|
||||||
|
output = "DSI-1";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# some extra packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# note taking
|
||||||
|
rnote
|
||||||
|
xournalpp
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -21,6 +21,28 @@
|
|||||||
LC_TIME = "es_ES.UTF-8";
|
LC_TIME = "es_ES.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.displayManager = {
|
||||||
|
defaultSession = "none+i3";
|
||||||
|
};
|
||||||
|
services.xserver = {
|
||||||
|
xkb = { # Configure keymap in X11
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
enable=true;
|
||||||
|
#displayManager = {
|
||||||
|
# defaultSession = "none+i3";
|
||||||
|
#};
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable=true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
i3status
|
||||||
|
i3lock
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# utilities
|
# utilities
|
||||||
@@ -41,6 +63,7 @@
|
|||||||
gnutar
|
gnutar
|
||||||
xorg.xmodmap # keyboard remapping
|
xorg.xmodmap # keyboard remapping
|
||||||
xfce.xfce4-screenshooter
|
xfce.xfce4-screenshooter
|
||||||
|
pulseaudio
|
||||||
|
|
||||||
# code editors
|
# code editors
|
||||||
vim
|
vim
|
||||||
@@ -63,6 +86,11 @@
|
|||||||
xfce.xfconf # needed to save preferences of thunar
|
xfce.xfconf # needed to save preferences of thunar
|
||||||
xfce.ristretto
|
xfce.ristretto
|
||||||
xfce.tumbler # for thumbnails of imgs
|
xfce.tumbler # for thumbnails of imgs
|
||||||
|
# for detecting usbs:
|
||||||
|
xfce.thunar-volman
|
||||||
|
gvfs
|
||||||
|
polkit_gnome
|
||||||
|
udiskie
|
||||||
|
|
||||||
# media
|
# media
|
||||||
pavucontrol
|
pavucontrol
|
||||||
@@ -93,7 +121,7 @@
|
|||||||
clang
|
clang
|
||||||
clang-tools
|
clang-tools
|
||||||
pkg-config
|
pkg-config
|
||||||
openssl
|
openssl.dev
|
||||||
stdenv
|
stdenv
|
||||||
rustup
|
rustup
|
||||||
wabt # wasm binary toolkit
|
wabt # wasm binary toolkit
|
||||||
@@ -129,8 +157,21 @@
|
|||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
environment.shells = with pkgs; [zsh];
|
environment.shells = with pkgs; [zsh];
|
||||||
|
|
||||||
|
# set default pdf reader to zathura
|
||||||
xdg.mime.enable=true;
|
xdg.mime.enable=true;
|
||||||
|
environment.sessionVariables = {
|
||||||
|
BROWSER = "zathura";
|
||||||
|
};
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"application/pdf" = "zathura";
|
"application/pdf" = "zathura";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# gvfs needed for Thunar to detect external disks
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
# bluetooth related
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
#hardware.pulseaudio.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
# This file is meant to be renamed to `configuration.nix`
|
# This file is meant to be renamed to `configuration.nix`
|
||||||
|
# Surface Go 2 NixOS configuration
|
||||||
# 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, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
@@ -24,7 +21,7 @@
|
|||||||
"/crypto_keyfile.bin" = null;
|
"/crypto_keyfile.bin" = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
networking.hostName = "surface"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
@@ -34,35 +31,6 @@
|
|||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/Madrid";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
layout = "us";
|
|
||||||
xkbVariant = "";
|
|
||||||
|
|
||||||
enable=true;
|
|
||||||
displayManager = {
|
|
||||||
defaultSession = "none+i3";
|
|
||||||
};
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable=true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
i3status
|
|
||||||
i3lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.userc = {
|
users.users.userc = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -74,30 +42,6 @@
|
|||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
environment.shells = with pkgs; [zsh];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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
|
||||||
@@ -109,10 +53,6 @@
|
|||||||
# gvfs needed for Thunar to detect external disks
|
# gvfs needed for Thunar to detect external disks
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
# bluetooth related
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
# obs virtual camera
|
# obs virtual camera
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
v4l2loopback
|
v4l2loopback
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
# This file is meant to be renamed to `configuration.nix`
|
# This file is meant to be renamed to `configuration.nix`
|
||||||
|
# Thinkpad NixOS configuration
|
||||||
# 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, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
@@ -18,35 +15,12 @@
|
|||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
networking.hostName = "thinkpad"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
services.displayManager = {
|
|
||||||
defaultSession = "none+i3";
|
|
||||||
};
|
|
||||||
services.xserver = {
|
|
||||||
xkb = { # Configure keymap in X11
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
enable=true;
|
|
||||||
#displayManager = {
|
|
||||||
# defaultSession = "none+i3";
|
|
||||||
#};
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable=true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
i3status
|
|
||||||
i3lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Define a user account
|
# Define a user account
|
||||||
users.users.user = {
|
users.users.user = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -70,9 +44,5 @@
|
|||||||
# gvfs needed for Thunar to detect external disks
|
# gvfs needed for Thunar to detect external disks
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
# bluetooth related
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,3 +42,6 @@ set pastetoggle=<F3>
|
|||||||
|
|
||||||
" set ignorecase " do case insensitive search
|
" set ignorecase " do case insensitive search
|
||||||
set incsearch " show incremental search results as you type
|
set incsearch " show incremental search results as you type
|
||||||
|
|
||||||
|
" disable mouse
|
||||||
|
set mouse=
|
||||||
|
|||||||
Reference in New Issue
Block a user