From 42da77d6b1f982a88564c4021947585c088d1a15 Mon Sep 17 00:00:00 2001 From: Alexander Szczepanski Date: Wed, 7 Jul 2021 01:45:30 +0200 Subject: [PATCH] moved zsh and vscode server --- configs/common.nix | 37 ++++++++++++++++++++++++++ configs/user.nix | 60 +++++++++++++++++------------------------- machine/desktop.nix | 22 ---------------- machine/homeserver.nix | 32 ---------------------- machine/thinkpad.nix | 24 ----------------- machine/vps.nix | 24 ----------------- 6 files changed, 61 insertions(+), 138 deletions(-) diff --git a/configs/common.nix b/configs/common.nix index 71cd97a..e812d29 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -1,6 +1,42 @@ { config, pkgs, lib, ... }: { + imports = + [ + (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") + ]; + + services.vscode-server.enable = true; + + programs.zsh = { + enable = true; + + enableCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + + ohMyZsh = { + enable = true; + theme = "agnoster"; + customPkgs = [ + pkgs.zsh-autosuggestions + pkgs.zsh-syntax-highlighting + pkgs.zsh-powerlevel10k + ]; + plugins = [ + "cp" + "common-aliases" + "docker " + "systemd" + "wd" + "kubectl" + "git" + # "zsh-autosuggestions" + # "zsh-syntax-highlightin" + ]; + }; + }; + boot.tmpOnTmpfs = true; environment.systemPackages = with pkgs; [ ack @@ -33,6 +69,7 @@ wget zsh ]; + documentation.enable = false; documentation.nixos.enable = false; #documentation.man.enable = false; diff --git a/configs/user.nix b/configs/user.nix index cf2cffa..5bffb56 100644 --- a/configs/user.nix +++ b/configs/user.nix @@ -18,47 +18,35 @@ home-manager.users.alex = { pkgs, ... }: { home.packages = [ pkgs.cryfs - pkgs.cinnamon.nemo ]; - dconf.enable = true; - dconf.settings = { - "org/gnome/desktop/wm/preferences".titlebar-font = "Liberation Sans Bold 9"; - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { - binding = "Return"; - command = "kitty"; - name = "kitty"; - }; + # dconf.enable = true; + # dconf.settings = { + # "org/gnome/desktop/wm/preferences".titlebar-font = "Liberation Sans Bold 9"; + # "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + # binding = "Return"; + # command = "kitty"; + # name = "kitty"; + # }; - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { - binding = "Return"; - command = "rofi -show drun"; - name = "rofi -show drun"; - }; + # "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { + # binding = "Return"; + # command = "rofi -show drun"; + # name = "rofi -show drun"; + # }; - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { - binding = "Tab"; - command = "rofi -show window"; - name = "rofi -show window"; - }; + # "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { + # binding = "Tab"; + # command = "rofi -show window"; + # name = "rofi -show window"; + # }; - "org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [ - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" - ]; - - # visual-bell = false; - # titlebar-font = "Liberation Sans Bold 9"; - # }; - # "org/gnome/mutter" = { - # button-mode = "programming"; - # show-thousands = true; - # base = 10; - # word-size = 64; - # window-position = lib.hm.gvariant.mkTuple [100 100]; - # }; - }; + # "org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [ + # "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + # "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + # "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" + # ]; + # }; programs = { ssh = { diff --git a/machine/desktop.nix b/machine/desktop.nix index 8886c8b..e08904c 100644 --- a/machine/desktop.nix +++ b/machine/desktop.nix @@ -112,28 +112,6 @@ in # Enable sound. sound.enable = true; - programs.zsh = { - enable = true; - - enableCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - - ohMyZsh = { - enable = true; - theme = "agnoster"; - plugins = [ - "cp" - "common-aliases" - "docker " - "systemd" - "wd" - "kubectl" - "git" - ]; - }; - }; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/machine/homeserver.nix b/machine/homeserver.nix index 4d4be37..947d9fd 100644 --- a/machine/homeserver.nix +++ b/machine/homeserver.nix @@ -6,7 +6,6 @@ /etc/nixos/hardware-configuration.nix ../configs/common.nix ../configs/virtualisation.nix - (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") ]; # Use the systemd-boot EFI boot loader. @@ -21,33 +20,6 @@ networking.useDHCP = false; networking.interfaces.enp3s0.useDHCP = true; - programs.zsh = { - enable = true; - - enableCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - - ohMyZsh = { - enable = true; - theme = "agnoster"; - customPkgs = [ - pkgs.zsh-autosuggestions - pkgs.zsh-syntax-highlighting - pkgs.zsh-powerlevel10k - ]; - plugins = [ - "cp" - "common-aliases" - "docker " - "systemd" - "wd" - "kubectl" - "git" - ]; - }; - }; - # Define a user account. Don't forget to set a password with ‘passwd’. users = { defaultUserShell = pkgs.zsh; @@ -146,10 +118,6 @@ # }; # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.vscode-server.enable = true; - services.openssh.enable = true; services.netdata.enable = true; diff --git a/machine/thinkpad.nix b/machine/thinkpad.nix index 79eb8ea..389c10b 100644 --- a/machine/thinkpad.nix +++ b/machine/thinkpad.nix @@ -164,30 +164,6 @@ in ]; }; - programs.zsh = { - enable = true; - - enableCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - - ohMyZsh = { - enable = true; - theme = "agnoster"; - plugins = [ - "cp" - "common-aliases" - "docker " - "systemd" - "wd" - "kubectl" -# "zsh-autosuggestions" -# "zsh-syntax-highlightin" - "git" - ]; - }; - }; - environment.systemPackages = with pkgs; [ nvidia-offload xorg.xf86videointel diff --git a/machine/vps.nix b/machine/vps.nix index 9074f0c..c118a7f 100644 --- a/machine/vps.nix +++ b/machine/vps.nix @@ -6,7 +6,6 @@ /etc/nixos/hardware-configuration.nix ../configs/common.nix ../configs/virtualisation.nix - (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") ]; # Use the GRUB 2 boot loader. @@ -20,7 +19,6 @@ time.timeZone = "Europe/Berlin"; networking.useDHCP = false; networking.interfaces.ens3.useDHCP = true; - services.vscode-server.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users = { @@ -32,28 +30,6 @@ }; }; - programs.zsh = { - enable = true; - - enableCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - - ohMyZsh = { - enable = true; - theme = "agnoster"; - plugins = [ - "cp" - "common-aliases" - "docker " - "systemd" - "wd" - "kubectl" - "git" - ]; - }; - }; - # List packages installed in system profile. To search, run: environment.systemPackages = with pkgs; [ docker-compose