From 285745975b20377f04bb1a97d2def73a4a5b6322 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 10 Jul 2021 17:12:39 -0600 Subject: [PATCH] [NixOS] Fixes --- dotfiles/tmux.conf | 28 -------------------------- nixos/base.nix | 39 ++++++++++++++++++++++++++++++++++--- nixos/machines/biskcomp.nix | 2 +- nixos/raspberry-pi.nix | 23 ---------------------- 4 files changed, 37 insertions(+), 55 deletions(-) diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf index 4983cb9e..e69de29b 100644 --- a/dotfiles/tmux.conf +++ b/dotfiles/tmux.conf @@ -1,28 +0,0 @@ -set-option -g default-command "zsh" - -unbind C-o -set -g prefix C-q -bind-key C-q send-prefix - -set -gw mode-keys emacs - -set-option -g status on -bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'" -bind-key ^ command-prompt -p "swap window:,with window:" "swap-window -s %1 -t %2" - -set-option -g status-fg blue -set-option -g status-bg black -set-option -g status-interval 2 -set-option -g status-utf8 on -set-option -g status-justify "centre" -set-option -g status-left-length 60 -set-option -g status-right-length 90 - -# Set up resize-pane keys -bind-key + resize-pane -D 3 -bind-key / resize-pane -L 3 -bind-key - resize-pane -U 3 -bind-key * resize-pane -R 3 - -bind-key -t emacs-copy M-w copy-pipe "zsh -c 'oscopy'" -source ~/.tmux.powerline \ No newline at end of file diff --git a/nixos/base.nix b/nixos/base.nix index 0ad54da4..01064522 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -3,6 +3,7 @@ imports = [ ./users.nix ./fonts.nix + ./essential-packages.nix ]; nixpkgs.overlays = [ @@ -34,6 +35,24 @@ ''; networking.networkmanager = { enable = true; + enableStrongSwan = true; + packages = [ pkgs.networkmanager-l2tp ]; + extraConfig = '' + [main] + rc-manager=resolvconf + ''; + }; + + programs.zsh.enable = true; + + services.avahi = { + enable = true; + nssmdns = true; + publish = { + enable = true; + domain = true; + userServices = true; + }; }; # Audio @@ -44,17 +63,31 @@ hardware.bluetooth.enable = true; services.blueman.enable = true; - # Keyboard + # Keyboard/Keymap console.keyMap = "us"; + i18n = { + defaultLocale = "en_US.UTF-8"; + }; + # Update timezone automatically services.tzupdate.enable = true; - programs.zsh.enable = true; - # TODO: Add a comment explaining what this does. services.gnome.at-spi2-core.enable = true; + services.openssh.enable = true; + + services.autorandr.enable = true; + + services.locate.enable = true; + + virtualisation.docker.enable = true; + + programs.adb.enable = true; + + hardware.keyboard.zsa.enable = true; + services.xserver = { exportConfiguration = true; enable = true; diff --git a/nixos/machines/biskcomp.nix b/nixos/machines/biskcomp.nix index d07391e6..f9ba06c6 100644 --- a/nixos/machines/biskcomp.nix +++ b/nixos/machines/biskcomp.nix @@ -2,7 +2,7 @@ imports = [ ../raspberry-pi.nix # ../plex.nix - ./internet-computer.nix + ../internet-computer.nix ]; networking.hostName = "biskcomp"; diff --git a/nixos/raspberry-pi.nix b/nixos/raspberry-pi.nix index f0aa54f6..af6eff23 100644 --- a/nixos/raspberry-pi.nix +++ b/nixos/raspberry-pi.nix @@ -4,9 +4,6 @@ imports = [ ./base.nix - ./fonts.nix - ./internet-computer.nix - ./essential-packages.nix ]; hardware.raspberry-pi."4".fkms-3d.enable = true; @@ -53,30 +50,12 @@ options = [ "noatime" ]; }; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.imalison = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - }; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ raspberrypi-eeprom ]; - services.openssh.enable = true; - - services.avahi = { - enable = true; - nssmdns = true; - publish = { - enable = true; - domain = true; - userServices = true; - }; - }; - nix = { autoOptimiseStore = true; gc = { @@ -85,6 +64,4 @@ options = "--delete-older-than 30d"; }; }; - - system.stateVersion = "21.05"; # Did you read the comment? }