Compare commits
No commits in common. "7d0351df18a68b0fdf5c705f0895f708434bc7e4" and "67ffb18e0307a693cae785066da069e5c15fae52" have entirely different histories.
7d0351df18
...
67ffb18e03
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/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)"
|
||||||
|
61
install.sh
61
install.sh
@ -1,65 +1,38 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
function install_pkg() {
|
|
||||||
if hash apt-get 2>/dev/null; then
|
|
||||||
sudo -n apt-get update
|
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${$}
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if hash nix 2>/dev/null; then
|
|
||||||
echo "INSTALL ${@} yourself with nix"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup_ssh() {
|
function setup_ssh() {
|
||||||
configfile=~/.ssh/config
|
|
||||||
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
touch ${configfile}
|
touch ~/.ssh/config
|
||||||
chmod 644 ${configfile}
|
chmod 644 ~/.ssh/config
|
||||||
cat << EOF >> ${configfile}
|
cat << EOF >> ~/.ssh/config
|
||||||
Include ${HOME}/dotfiles/ssh.config
|
Include ${HOME}/dotfiles/ssh.config
|
||||||
# dotfiles installed
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_git() {
|
function setup_git() {
|
||||||
configfile=~/.gitconfig
|
cat << EOF > ~/.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
|
||||||
|
|
||||||
setup_ssh
|
setup_ssh
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_tmux() {
|
function setup_tmux() {
|
||||||
configfile=~/.tmux.conf
|
sudo -n apt-get update
|
||||||
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
return
|
tmux
|
||||||
fi
|
cat << EOF > ~/.tmux.conf
|
||||||
|
|
||||||
install_pkg tmux
|
|
||||||
cat << EOF > ${configfile}
|
|
||||||
source ${HOME}/dotfiles/tmux/tmux.conf
|
source ${HOME}/dotfiles/tmux/tmux.conf
|
||||||
# dotfiles.installed
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_fish() {
|
function setup_fish() {
|
||||||
install_pkg fish
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
fish
|
||||||
|
|
||||||
USER=`whoami`
|
USER=`whoami`
|
||||||
sudo -n chsh $USER -s $(which fish)
|
sudo -n chsh $USER -s $(which fish)
|
||||||
@ -72,7 +45,9 @@ function setup_fish() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_nvim() {
|
function setup_nvim() {
|
||||||
install_pkg neovim
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
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
|
||||||
|
|
||||||
@ -85,10 +60,10 @@ function setup_nvim() {
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
install_pkg locales less
|
sudo apt-get install locales less
|
||||||
|
|
||||||
#echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
#sudo locale-gen
|
sudo locale-gen
|
||||||
|
|
||||||
setup_fish
|
setup_fish
|
||||||
setup_ssh
|
setup_ssh
|
||||||
|
44
nixos/flake.lock
generated
44
nixos/flake.lock
generated
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,181 +0,0 @@
|
|||||||
{ 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?
|
|
||||||
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
sudo nixos-rebuild switch --impure --flake ".#"
|
|
||||||
# sudo nixos-rebuild boot --impure --flake ".#"
|
|
Loading…
x
Reference in New Issue
Block a user