Compare commits
20 Commits
38c1cf22e6
...
nix
| Author | SHA1 | Date | |
|---|---|---|---|
| da7e352e8d | |||
| 0d37c9fe95 | |||
| 1483a5c46a | |||
| c828dfc2e6 | |||
| feb789c989 | |||
| 67ffb18e03 | |||
| 019e8708d3 | |||
| ee10125402 | |||
| 19857722b4 | |||
| 00c1b647ea | |||
| 5b30acf596 | |||
| 5f61d1d4cd | |||
| 9c8892559d | |||
| 4e1ac03bfe | |||
| 497f1b1fa6 | |||
| 2d63016f8a | |||
| 311d6a678b | |||
| 24ac06f925 | |||
| 89eacee8c4 | |||
| 85c3b5e36b |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fish/*
|
||||||
|
!fish/config.fish
|
||||||
|
!fish/functions/*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# The MIT License (MIT)
|
# The MIT License (MIT)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
HASH="%C(yellow)%h%C(reset)"
|
HASH="%C(yellow)%h%C(reset)"
|
||||||
RELATIVE_TIME="%C(green)%ar%C(reset)"
|
RELATIVE_TIME="%C(green)%ar%C(reset)"
|
||||||
|
|||||||
@@ -1,14 +1,34 @@
|
|||||||
set -x DOTFILES $HOME/dotfiles
|
set -x DOTFILES $HOME/dotfiles
|
||||||
|
|
||||||
if test -z "$FISH_SETUP_PATH"
|
if test -z "$FISH_SETUP_PATH"
|
||||||
set -x PATH $HOME/dotfiles/bin $PATH
|
set -xp PATH $HOME/.pyenv/bin
|
||||||
set -x PATH . $PATH
|
set -xp PATH $HOME/.local/bin
|
||||||
|
set -xp PATH $HOME/dotfiles/bin
|
||||||
|
set -xp PATH $HOME/bin
|
||||||
|
set -xp PATH .
|
||||||
|
|
||||||
set -x FISH_SETUP_PATH
|
set -x FISH_SETUP_PATH
|
||||||
end
|
end
|
||||||
|
|
||||||
set -x LANG sv_SE.UTF-8
|
set -x LANG sv_SE.UTF-8
|
||||||
set -x LC_ALL sv_SE.UTF-8
|
set -x LC_ALL sv_SE.UTF-8
|
||||||
set -x EDITOR nvim
|
|
||||||
|
|
||||||
alias v vim
|
set -x EDITOR nvim
|
||||||
|
alias v nvim
|
||||||
|
|
||||||
|
if type -q pyenv
|
||||||
|
pyenv init --path | source
|
||||||
|
end
|
||||||
|
# pyenv virtualenv-init - | source
|
||||||
|
|
||||||
|
alias dc="docker compose"
|
||||||
|
alias dce="docker compose exec"
|
||||||
|
alias drh="docker run -it --rm -v (pwd):/usr/(pwd) -w /usr/(pwd)"
|
||||||
|
|
||||||
|
|
||||||
|
# Include local config if present
|
||||||
|
|
||||||
|
if test -r $DOTFILES/fish/local.fish
|
||||||
|
source $DOTFILES/fish/local.fish
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
function fish_right_prompt
|
function fish_right_prompt
|
||||||
set -l ref (git symbolic-ref HEAD ^/dev/null)
|
set -l ref (git symbolic-ref HEAD 2>/dev/null)
|
||||||
if test -z $ref
|
if test -z $ref
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
git diff --no-ext-diff --quiet --exit-code ^/dev/null
|
git diff --no-ext-diff --quiet --exit-code 2>/dev/null
|
||||||
or set -l dirty 'yes'
|
or set -l dirty 'yes'
|
||||||
|
|
||||||
git diff-index --cached --quiet HEAD -- ^/dev/null
|
git diff-index --cached --quiet HEAD -- 2>/dev/null
|
||||||
or set -l staged 'yes'
|
or set -l staged 'yes'
|
||||||
|
|
||||||
set_color normal
|
set_color normal
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
[user]
|
[user]
|
||||||
name = Thomas Lovén
|
name = Thomas Lovén
|
||||||
email = thomasloven@gmail.com
|
email = thomasloven@gmail.com
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
[credential]
|
[credential]
|
||||||
helper = cache
|
helper = cache
|
||||||
[color]
|
[color]
|
||||||
|
|||||||
26
init.vim
26
init.vim
@@ -1,24 +1,45 @@
|
|||||||
|
" Display tab characters, trailing spaces and nbsp
|
||||||
set list
|
set list
|
||||||
set listchars=tab:→\ ,trail:␣,nbsp:⋅
|
set listchars=tab:→\ ,trail:␣,nbsp:⋅
|
||||||
|
|
||||||
|
" Remove unnecessary stuff from bottom of window
|
||||||
set noruler
|
set noruler
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
|
" Nice line numbers
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
|
|
||||||
|
" Spaces over tabs every day of the week (except in makefiles)
|
||||||
set expandtab
|
set expandtab
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
set smartindent
|
set smartindent
|
||||||
|
|
||||||
|
" Window navigation shortcuts
|
||||||
nnoremap <c-h> <c-w>h
|
nnoremap <c-h> <c-w>h
|
||||||
nnoremap <c-j> <c-w>j
|
nnoremap <c-j> <c-w>j
|
||||||
nnoremap <c-k> <c-w>k
|
nnoremap <c-k> <c-w>k
|
||||||
nnoremap <c-l> <c-w>l
|
nnoremap <c-l> <c-w>l
|
||||||
|
|
||||||
|
" ö for quick command access on Swedish keyboards
|
||||||
nnoremap ö :
|
nnoremap ö :
|
||||||
|
|
||||||
|
" Some navigation shortcuts for Swedish keyboards
|
||||||
|
nnoremap - `
|
||||||
|
nmap Å [
|
||||||
|
nmap å ]
|
||||||
|
omap Å [
|
||||||
|
omap å ]
|
||||||
|
xmap Å [
|
||||||
|
xmap å ]
|
||||||
|
noremap ÅÅ [[
|
||||||
|
noremap åå ]]
|
||||||
|
nnoremap <space>, <c-^>
|
||||||
|
nnoremap <tab> %
|
||||||
|
|
||||||
|
" Some searching options
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set smartcase
|
set smartcase
|
||||||
set incsearch
|
set incsearch
|
||||||
@@ -30,3 +51,8 @@ nnoremap * *N
|
|||||||
noh
|
noh
|
||||||
|
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
|
" Uppercase last word on c-^
|
||||||
|
inoremap <C-]> <Esc>gUiw`]a
|
||||||
|
|
||||||
|
nnoremap <silent> § :NERDTreeToggle<CR>
|
||||||
|
|||||||
115
install.sh
115
install.sh
@@ -1,37 +1,112 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function install_pkg() {
|
||||||
|
if hash apt-get 2>/dev/null; then
|
||||||
sudo -n apt-get update
|
sudo -n apt-get update
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${@}
|
||||||
fish \
|
return
|
||||||
neovim
|
fi
|
||||||
|
|
||||||
USER=`whoami`
|
if hash nix 2>/dev/null; then
|
||||||
sudo -n chsh $USER -s $(which fish)
|
echo "INSTALL ${@} yourself with nix"
|
||||||
echo "exec $(which fish) -l" >> ~/.profile
|
return
|
||||||
echo "exec $(which fish) -l" >> ~/.bashrc
|
fi
|
||||||
echo "exec $(which fish) -l" >> ~/.zshrc
|
}
|
||||||
|
|
||||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
function setup_ssh() {
|
||||||
sudo locale-gen
|
configfile=~/.ssh/config
|
||||||
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > ~/.gitconfig
|
mkdir -p ~/.ssh
|
||||||
|
touch ${configfile}
|
||||||
|
chmod 644 ${configfile}
|
||||||
|
cat << EOF >> ${configfile}
|
||||||
|
Include ${HOME}/dotfiles/ssh.config
|
||||||
|
# dotfiles installed
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_git() {
|
||||||
|
configfile=~/.gitconfig
|
||||||
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF > ${configfile}
|
||||||
[include]
|
[include]
|
||||||
path = ${HOME}/dotfiles/git/gitconfig
|
path = ${HOME}/dotfiles/git/gitconfig
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
||||||
|
# dotfiles installed
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
setup_ssh
|
||||||
cat << EOF > ~/.ssh/config
|
}
|
||||||
Host github.com
|
|
||||||
User git
|
function setup_tmux() {
|
||||||
Host gitea
|
configfile=~/.tmux.conf
|
||||||
HostName git.torpet.thomasloven.com
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
User git
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
install_pkg tmux
|
||||||
|
cat << EOF > ${configfile}
|
||||||
|
source ${HOME}/dotfiles/tmux/tmux.conf
|
||||||
|
# dotfiles.installed
|
||||||
EOF
|
EOF
|
||||||
chmod 644 ~/.ssh/config
|
}
|
||||||
|
|
||||||
|
function setup_fish() {
|
||||||
|
install_pkg fish
|
||||||
|
|
||||||
|
USER=`whoami`
|
||||||
|
sudo -n chsh $USER -s $(which fish)
|
||||||
|
# Force fish shell for devcontainers
|
||||||
|
echo "exec $(which fish) -l" >> ~/.bashrc
|
||||||
|
echo "exec $(which fish) -l" >> ~/.zshrc
|
||||||
|
|
||||||
mkdir -p ~/.config/
|
mkdir -p ~/.config/
|
||||||
ln -s ~/dotfiles/fish ~/.config/fish
|
ln -s ~/dotfiles/fish ~/.config/fish
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_nvim() {
|
||||||
|
install_pkg neovim
|
||||||
mkdir -p ~/.config/nvim/
|
mkdir -p ~/.config/nvim/
|
||||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||||
|
|
||||||
|
# Install NERDtree plugin
|
||||||
|
git clone --single-branch https://github.com/preservim/nerdtree.git ~/.config/nvim/pack/vendor/start/nerdtree
|
||||||
|
git clone --single-branch https://tpope.io/vim/commentary.git ~/.config/nvim/pack/vendor/start/commentary
|
||||||
|
nvim -u NONE -c "helptags ~/.config/nvim/pack/vendor/start/nerdtree/doc" -c q
|
||||||
|
nvim -u NONE -c "helptags ~/.config/nvim/pack/vendor/start/commentary/doc" -c q
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
|
||||||
|
install_pkg locales less
|
||||||
|
|
||||||
|
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||||
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
|
sudo locale-gen
|
||||||
|
fi
|
||||||
|
|
||||||
|
setup_fish
|
||||||
|
setup_ssh
|
||||||
|
setup_git
|
||||||
|
|
||||||
|
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||||
|
|
||||||
|
echo "INSTALLING IN DEVCONTAINER"
|
||||||
|
|
||||||
|
echo "set -x EDITOR code" >> ~/.config/fish/local.fish
|
||||||
|
|
||||||
|
else
|
||||||
|
setup_tmux
|
||||||
|
setup_nvim
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
||||||
|
|||||||
44
nixos/flake.lock
generated
Normal file
44
nixos/flake.lock
generated
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"espanso-fix": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733174540,
|
||||||
|
"narHash": "sha256-Yv72ufzlbccsUgjnDtLfybPS4HJ7v3lN+pjmcH3/l+I=",
|
||||||
|
"owner": "pitkling",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2c39301457f9b5cb18a042a1f5643b15de551c79",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "pitkling",
|
||||||
|
"ref": "espanso-fix-capabilities-export",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734875076,
|
||||||
|
"narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1807c2b91223227ad5599d7067a61665c52d1295",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"espanso-fix": "espanso-fix",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
25
nixos/flake.nix
Normal file
25
nixos/flake.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
description = "My nixos config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
espanso-fix.url = "github:pitkling/nixpkgs/espanso-fix-capabilities-export";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, espanso-fix, ... } @ inputs:
|
||||||
|
let
|
||||||
|
inherit (self) outputs;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
macbook = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
modules = [
|
||||||
|
./nixos/configuration.nix
|
||||||
|
espanso-fix.nixosModules.espanso-capdacoverride
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
181
nixos/nixos/configuration.nix
Normal file
181
nixos/nixos/configuration.nix
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
{ inputs, lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
"/etc/nixos/hardware-configuration.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "sv_SE.UTF-8";
|
||||||
|
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "sv_SE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||||
|
LC_MONETARY = "sv_SE.UTF-8";
|
||||||
|
LC_NAME = "sv_SE.UTF-8";
|
||||||
|
LC_NUMERIC = "sv_SE.UTF-8";
|
||||||
|
LC_PAPER = "sv_SE.UTF-8";
|
||||||
|
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||||
|
LC_TIME = "sv_SE.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
thomas = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Thomas";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
|
# Also groups "uinput" and "input" for xremap to work with home-manager?
|
||||||
|
packages = with pkgs; [ ];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Enable automatic login for the user.
|
||||||
|
services.displayManager.autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "thomas";
|
||||||
|
};
|
||||||
|
systemd.services."getty@tty1".enable = false;
|
||||||
|
systemd.services."autovt@tty1".enable = false;
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Enable the GNOME Desktop Environment.
|
||||||
|
# xpra, sx, lightdm, gdm
|
||||||
|
# xterm, xfce, surf-display, retroarch, plasma5, phosh, pantheon, mate, lxqt, lumina, kodi, gnome, enlightenment, deepin, cinnamon, cde, budgie
|
||||||
|
# services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
# services.xserver.desktopManager.lumina.enable = true;
|
||||||
|
|
||||||
|
# services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
# services.xserver.desktopManager.budgie.enable = true;
|
||||||
|
|
||||||
|
# services.displayManager.sddm.enable = true;
|
||||||
|
# services.xserver.desktopManager.plasma5.enable = true;
|
||||||
|
|
||||||
|
# Switch aps with alt+tab
|
||||||
|
# services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
# services.xserver.desktopManager.mate.enable = true;
|
||||||
|
|
||||||
|
# Switch aps with alt+tab
|
||||||
|
# services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
# services.xserver.desktopManager.cinnamon.enable = true;
|
||||||
|
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
programs.dconf = {
|
||||||
|
enable = true;
|
||||||
|
profiles.user.databases = [
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
"org/gnome/desktop/input-sources".xkb-options = [
|
||||||
|
"terminate:ctrl_alt_bksp"
|
||||||
|
"lv3:lalt_switch"
|
||||||
|
];
|
||||||
|
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||||
|
"org/gnome/desktop/interface".clock-show-date = true;
|
||||||
|
"org/gnome/desktop/interface".clock-show-weekday = true;
|
||||||
|
"org/gnome/desktop/calendar".show-weekdate = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Remap capslock to esc and ctrl
|
||||||
|
services.interception-tools =
|
||||||
|
let
|
||||||
|
itools = pkgs.interception-tools;
|
||||||
|
itools-caps = pkgs.interception-tools-plugins.caps2esc;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
plugins = [ itools-caps ];
|
||||||
|
udevmonConfig = ''
|
||||||
|
- JOB: "${itools}/bin/intercept -g $DEVNODE | ${itools-caps}/bin/caps2esc -m 1 | ${itools}/bin/uinput -d $DEVNODE"
|
||||||
|
DEVICE:
|
||||||
|
EVENTS:
|
||||||
|
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Remap right alt to left alt so both can be used for special characters
|
||||||
|
# services.xserver.displayManager.sessionCommands = "sleep 5 && ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keycode 100 = keycode 65' &";
|
||||||
|
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "se";
|
||||||
|
variant = "mac";
|
||||||
|
};
|
||||||
|
console.keyMap = "sv-latin1";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "thomas";
|
||||||
|
openDefaultPorts = true;
|
||||||
|
dataDir = "/home/thomas";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.espanso = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.espanso-wayland;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
firefox.enable = true;
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
vimAlias = true;
|
||||||
|
};
|
||||||
|
fish.enable = true;
|
||||||
|
git.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vscode
|
||||||
|
neovim
|
||||||
|
xorg.xmodmap
|
||||||
|
docker-compose
|
||||||
|
kitty
|
||||||
|
obsidian
|
||||||
|
python3Full
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
3
nixos/rebuild.sh
Executable file
3
nixos/rebuild.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
sudo nixos-rebuild switch --impure --flake ".#"
|
||||||
|
# sudo nixos-rebuild boot --impure --flake ".#"
|
||||||
8
ssh.config
Normal file
8
ssh.config
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Host *
|
||||||
|
AddKeysToAgent yes
|
||||||
|
VisualHostKey yes
|
||||||
|
Host github.com
|
||||||
|
User git
|
||||||
|
Host gitea
|
||||||
|
HostName git.thomasloven.com
|
||||||
|
User git
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
docker build . -t dotfiles -f test/Dockerfile --force-rm
|
docker build . -t dotfiles -f test/Dockerfile.devcontainer --force-rm
|
||||||
|
|
||||||
docker run --rm -it -v $(pwd):/workspaces/test dotfiles zsh
|
docker run --rm -it \
|
||||||
|
-v $(pwd):/workspaces/test \
|
||||||
|
-v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK\
|
||||||
|
dotfiles zsh
|
||||||
|
|
||||||
docker rmi dotfiles
|
docker rmi dotfiles
|
||||||
41
tmux/tmux.conf
Normal file
41
tmux/tmux.conf
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
set -g default-terminal tmux-256color
|
||||||
|
|
||||||
|
set-option -g base-index 1
|
||||||
|
|
||||||
|
set-option -g prefix C-a
|
||||||
|
unbind C-b
|
||||||
|
bind a send-prefix
|
||||||
|
bind-key C-a last-window
|
||||||
|
|
||||||
|
unbind %
|
||||||
|
bind-key | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind-key - split-window -v -c "#{pane_current_path}"
|
||||||
|
bind-key / split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
bind-key c neww -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
bind-key h select-pane -L
|
||||||
|
bind-key j select-pane -D
|
||||||
|
bind-key k select-pane -U
|
||||||
|
bind-key l select-pane -R
|
||||||
|
|
||||||
|
bind-key k confirm-before -p "Kill window #w? (y/n)" kill-window
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
unbind Space
|
||||||
|
bind-key Space next-window
|
||||||
|
|
||||||
|
set -sg escape-time 50
|
||||||
|
|
||||||
|
|
||||||
|
set -g status-justify centre
|
||||||
|
set -g status-bg colour16
|
||||||
|
set -g status-left-length 100
|
||||||
|
set -g status-fg colour12
|
||||||
|
set -g status-left '#[fg=green]#(hostname -s)#[fg=colour12]:#[fg=colour12]#S '
|
||||||
|
set -g window-status-format '#[fg=colour12]#I:#W '
|
||||||
|
set -g window-status-current-format '#[fg=red]#I:#W#[fg=green]#F #[fg=colour12]'
|
||||||
|
|
||||||
Reference in New Issue
Block a user