diff --git a/system/configuration.nix b/system/configuration.nix index 20605b4..eb6cbde 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -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, ... }: { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix ]; @@ -14,36 +10,11 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "thompson"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.hostName = "thompson"; networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - # Set your time zone. 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. security.rtkit.enable = true; services.pipewire = { @@ -53,10 +24,12 @@ pulse.enable = true; }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.tsv = { isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + extraGroups = [ + "wheel" + "docker" + ]; initialPassword = "password"; }; @@ -64,10 +37,8 @@ services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; - # List packages installed in system profile. To search, run: - # $ nix search wget 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 tmux git @@ -75,38 +46,12 @@ 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; - # 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; - # 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.stateVersion = "22.11"; # Don't change this } diff --git a/users/tsv/home.nix b/users/tsv/home.nix index 4c76c50..857809a 100644 --- a/users/tsv/home.nix +++ b/users/tsv/home.nix @@ -19,13 +19,40 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; + nixpkgs.config.allowUnfree = true; + home.packages = with pkgs; [ firefox git-crypt gnupg 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 = { ".tmux.conf".text = '' set-option -g prefix C-o @@ -33,4 +60,11 @@ 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; + }; } diff --git a/users/tsv/nvim/init.vim b/users/tsv/nvim/init.vim new file mode 100644 index 0000000..5a47e09 --- /dev/null +++ b/users/tsv/nvim/init.vim @@ -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 + diff --git a/users/tsv/ssh/config b/users/tsv/ssh/config new file mode 100644 index 0000000..3bcbb74 --- /dev/null +++ b/users/tsv/ssh/config @@ -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