Most important stuff set up

This commit is contained in:
Trevor Vallender 2023-02-05 16:57:39 +00:00
parent df066f9217
commit 3d5efa20e7
4 changed files with 83 additions and 64 deletions

View File

@ -1,12 +1,8 @@
# 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, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -14,36 +10,11 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "thompson"; # Define your hostname. networking.hostName = "thompson";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
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.
# Set your time zone.
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty.
# };
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = {
# "eurosign:e";
# "caps:escape" # map caps to escape.
# };
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound. # Enable sound.
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
@ -53,10 +24,12 @@
pulse.enable = true; pulse.enable = true;
}; };
# Define a user account. Don't forget to set a password with passwd.
users.users.tsv = { users.users.tsv = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"docker"
];
initialPassword = "password"; initialPassword = "password";
}; };
@ -64,10 +37,8 @@
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. neovim
wget wget
tmux tmux
git git
@ -75,38 +46,12 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
virtualisation.docker.enable = true;
# 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; services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
system.copySystemConfiguration = true; system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default system.stateVersion = "22.11"; # Don't change this
# settings for stateful data, like file locations and database versions
# on your system were taken. Its 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?
} }

View File

@ -19,13 +19,40 @@
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
firefox firefox
git-crypt git-crypt
gnupg gnupg
delta # Nice diffing pager for Git delta # Nice diffing pager for Git
docker-compose
ruby_3_1
rubyPackages_3_1.dip
calibre
thunderbird
anki
htop
fzf
gitflow
gimp
slack
spotify
wine
winetricks
]; ];
programs.git = {
enable = true;
userName = "Trevor Vallender";
userEmail = "trevor@tsvallender.co.uk";
aliases = {
aa = "add -A";
cm = "commit";
pf = "push --force";
};
};
home.file = { home.file = {
".tmux.conf".text = '' ".tmux.conf".text = ''
set-option -g prefix C-o set-option -g prefix C-o
@ -33,4 +60,11 @@
bind-key C-o last-window bind-key C-o last-window
''; '';
}; };
xdg.configFile."nvim/init.vim".source = ./nvim/init.vim;
home.file.".ssh/config".source = ./ssh/config;
services.syncthing.enable = true;
services.syncthing.tray = {
enable = true;
};
} }

18
users/tsv/nvim/init.vim Normal file
View File

@ -0,0 +1,18 @@
set nocompatible
set showmatch
set ignorecase
set mouse=v
set hlsearch
set incsearch
set tabstop=2
set softtabstop=2
set expandtab
set shiftwidth=2
set autoindent
set number
set wildmode=longest,list
set cc=80
filetype plugin indent on
set clipboard=unnamedplus
set cursorline

22
users/tsv/ssh/config Normal file
View File

@ -0,0 +1,22 @@
Host kernighan
HostName 5.189.146.140
IdentityFile /home/tsv/.ssh/kernighan
User tsv
IdentitiesOnly yes
Host git.tsvallender.co.uk
HostName git.tsvallender.co.uk
IdentityFile /home/tsv/.ssh/personal
Port 222
User tsv
IdentitiesOnly yes
Host github.com
HostName github.com
IdentityFile /home/tsv/.ssh/foxsoft
IdentitiesOnly yes
Host git.foxsoft.co.uk
HostName git.foxsoft.co.uk
IdentityFile /home/tsv/.ssh/foxsoft
IdentitiesOnly yes