Add config for H0165, move lazygit and ssh config into nix expressions, adjust Makefile accordingly
This commit is contained in:
parent
21bf495eb4
commit
74220266e1
27
Makefile
27
Makefile
|
@ -1,13 +1,10 @@
|
|||
CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
|
||||
SSH_DIR := $(HOME)/.ssh
|
||||
THEMES_DIR := $(HOME)/.themes
|
||||
|
||||
CONFIG_ITEMS := $(wildcard config/*)
|
||||
CONFIG_TARGETS := $(CONFIG_ITEMS:config/%=$(CONFIG_DIR)/%)
|
||||
SSH_ITEMS := $(wildcard ssh/*)
|
||||
SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%)
|
||||
THEMES_ITEMS := $(wildcard themes/*)
|
||||
THEMES_TARGETS := $(THEMES_ITEMS:themes/%=$(THEMES_DIR)/%)
|
||||
|
||||
LAZY_REPO := https://github.com/folke/lazy.nvim.git
|
||||
PYENV_DIR := $(if $(PYENV_ROOT), $(PYENV_ROOT), $(HOME)/.pyenv)
|
||||
|
@ -21,32 +18,18 @@ all: default install
|
|||
clean:
|
||||
for link in $(CONFIG_TARGETS); do rm "$$link"; done
|
||||
for link in $(SSH_TARGETS); do rm "$$link"; done
|
||||
for link in $(THEMES_TARGETS); do rm "$$link"; done
|
||||
rm -rf $(LAZY_DIR)
|
||||
rm $(HOME)/.profile
|
||||
rm $(HOME)/.inputrc
|
||||
rm $(HOME)/.bashrc
|
||||
rm $(HOME)/.zshrc
|
||||
rmdir $(HOME)/.ssh/sockets
|
||||
|
||||
check:
|
||||
echo "Placeholder"
|
||||
directories: $(CONFIG_DIR) $(SSH_DIR)
|
||||
|
||||
directories: $(CONFIG_DIR) $(SSH_DIR) $(THEMES_DIR) $(HOME)/.ssh/sockets $(HOME)/.local/bin
|
||||
|
||||
$(CONFIG_DIR) $(SSH_DIR) $(THEMES_DIR) $(HOME)/.ssh/sockets $(HOME)/.local/bin:
|
||||
$(CONFIG_DIR) $(SSH_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
link: $(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(HOME)/.profile $(HOME)/.inputrc $(HOME)/.bashrc $(HOME)/.zshrc
|
||||
link: $(CONFIG_TARGETS) $(HOME)/.ssh/config.d
|
||||
|
||||
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
||||
$(SSH_TARGETS): $(SSH_DIR)/%: ssh/%
|
||||
$(THEMES_TARGETS): $(THEMES_DIR)/%: themes/%
|
||||
$(HOME)/.profile: $(HOME)/%: %
|
||||
$(HOME)/.inputrc: $(HOME)/%: %
|
||||
$(HOME)/.bashrc: $(HOME)/%: %
|
||||
$(HOME)/.zshrc: $(HOME)/%: %
|
||||
$(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(HOME)/.profile $(HOME)/.inputrc $(HOME)/.bashrc $(HOME)/.zshrc:
|
||||
$(SSH_DIR)/config.d: $(SSH_DIR)/%: ssh/%
|
||||
$(CONFIG_TARGETS) $(SSH_DIR)/config.d:
|
||||
ln -s $(PWD)/$? $@
|
||||
|
||||
install: $(LAZY_DIR)
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
gui:
|
||||
showFileTree: true
|
||||
showCommandLog: false
|
||||
showIcons: true
|
||||
theme:
|
||||
lightTheme: false
|
||||
activeBorderColor:
|
||||
- "#a6da95" # Green
|
||||
- bold
|
||||
inactiveBorderColor:
|
||||
- "#cad3f5" # Text
|
||||
optionsTextColor:
|
||||
- "#8aadf4" # Blue
|
||||
selectedLineBgColor:
|
||||
- "#363a4f" # Surface0
|
||||
selectedRangeBgColor:
|
||||
- "#363a4f" # Surface0
|
||||
cherryPickedCommitBgColor:
|
||||
- "#8bd5ca" # Teal
|
||||
cherryPickedCommitFgColor:
|
||||
- "#8aadf4" # Blue
|
||||
unstagedChangesColor:
|
||||
- red # Red
|
||||
promptToReturnFromSubprocess: false
|
||||
# to exit immediately if run outside of the Git repository
|
||||
notARepository: "quit"
|
25
nixos/H0615-elitherl-home.nix
Normal file
25
nixos/H0615-elitherl-home.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./home/common.nix
|
||||
./home/dev.nix
|
||||
./home/nomachine.nix
|
||||
./home/python310.nix
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = "elitherl";
|
||||
home.homeDirectory = "/home/elitherl";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
microsoft-edge
|
||||
bitwarden
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
userEmail = "evie.litherland-smith@ukaea.uk";
|
||||
};
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
}
|
118
nixos/H0615-elitherl.nix
Normal file
118
nixos/H0615-elitherl.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
./packages.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
networking.hostName = "H0615"; # Define your hostname.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.elitherl = {
|
||||
isNormalUser = true;
|
||||
description = "Evie Litherland-Smith";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "elitherl";
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Set up home manager for user
|
||||
home-manager.users.elitherl = import ./H0615-elitherl-home.nix;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.useGlobalPkgs = false;
|
||||
|
||||
# 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 = [ 22 ];
|
||||
# networking.firewall.allowedUDPPorts = [ 22 ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# 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 = "22.11"; # Did you read the comment?
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
}
|
|
@ -2,6 +2,20 @@
|
|||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
includes = [ "config.d/*" ];
|
||||
forwardAgent = true;
|
||||
serverAliveInterval = 15;
|
||||
serverAliveCountMax = 3;
|
||||
controlMaster = "auto";
|
||||
controlPersist = "5s";
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Evie Litherland-Smith";
|
||||
userEmail = "evie.litherland-smith@ukaea.uk";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wezterm
|
||||
|
|
|
@ -8,7 +8,33 @@
|
|||
home.packages = with pkgs; [
|
||||
git
|
||||
gcc
|
||||
gnumake
|
||||
lazygit
|
||||
direnv
|
||||
];
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
gui = {
|
||||
showFileTree = true;
|
||||
showCommandLog = false;
|
||||
showIcons = true;
|
||||
theme = {
|
||||
lightTheme = false;
|
||||
activeBorderColor = ["#a6da95" "bold"];
|
||||
inactiveBorderColor = ["#cad3f5"];
|
||||
optionsTextColor = ["#8aadf4"];
|
||||
selectedLineBgColor = ["#363a4f"];
|
||||
selectedRangeBgColor = ["#363a4f"];
|
||||
cherryPickedCommitBgColor = ["#8bd5ca"];
|
||||
cherryPickedCommitFgColor = ["#8aadf4"];
|
||||
unstagedChangesColor = ["red"];
|
||||
};
|
||||
};
|
||||
update.method = "never";
|
||||
promptToReturnFromSubprocess = false;
|
||||
notARepository = "quit";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
{
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
gnumake
|
||||
gcc
|
||||
python310Packages.pynvim
|
||||
fzf
|
||||
ripgrep
|
||||
|
|
7
nixos/home/nomachine.nix
Normal file
7
nixos/home/nomachine.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nomachine-client
|
||||
];
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [];
|
||||
environment.systemPackages = with pkgs; [
|
||||
home-manager
|
||||
];
|
||||
}
|
||||
|
|
14
ssh/config
14
ssh/config
|
@ -1,14 +0,0 @@
|
|||
# vim: ft=sshconfig
|
||||
|
||||
Include config.d/*
|
||||
|
||||
Host *
|
||||
User elitherl
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
ServerAliveInterval 15
|
||||
ServerAliveCountMax 3
|
||||
ControlMaster auto
|
||||
ControlPath ~/.ssh/sockets/%r@%h:%p
|
||||
ControlPersist 5s
|
||||
ForwardX11Timeout 0
|
Loading…
Reference in a new issue