From 9f471327dfbcf069adc2cf6935ce91c50d136803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Wed, 20 Nov 2024 16:52:13 +0100 Subject: [PATCH] `environment.systemPackages` --- infra/common/default.nix | 21 ++++++++++++++++++++- infra/vm02116/configuration.nix | 23 ----------------------- infra/vm02179/configuration.nix | 22 ---------------------- infra/vm02186/procolix-configuration.nix | 22 ---------------------- infra/vm02187/configuration.nix | 20 -------------------- 5 files changed, 20 insertions(+), 88 deletions(-) diff --git a/infra/common/default.nix b/infra/common/default.nix index 687fd58..5093233 100644 --- a/infra/common/default.nix +++ b/infra/common/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: let inherit (lib) mkDefault; @@ -15,4 +15,23 @@ in i18n.defaultLocale = "en_US.UTF-8"; system.stateVersion = "24.05"; # do not change nixpkgs.hostPlatform = mkDefault "x86_64-linux"; + + environment.systemPackages = with pkgs; [ + (pkgs.vim_configurable.customize { + name = "vim"; + vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { + start = [ vim-nix ]; # load plugin on startup + }; + vimrcConfig.customRC = '' + " your custom vimrc + set nocompatible + set backspace=indent,eol,start + " Turn on syntax highlighting by default + syntax on + " ... + ''; + }) + wget + subversion + ]; } diff --git a/infra/vm02116/configuration.nix b/infra/vm02116/configuration.nix index 98d9548..3a4b6f0 100644 --- a/infra/vm02116/configuration.nix +++ b/infra/vm02116/configuration.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { imports = [ ../common ]; @@ -9,27 +7,6 @@ ip6 = "2a00:51c0:12:1201::20"; }; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - (pkgs.vim_configurable.customize { - name = "vim"; - vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { - start = [ vim-nix ]; # load plugin on startup - }; - vimrcConfig.customRC = '' - " your custom vimrc - set nocompatible - set backspace=indent,eol,start - " Turn on syntax highlighting by default - syntax on - " ... - ''; - }) - wget - subversion - ]; - ## vm02116 is running on old hardware based on a Xen VM environment, so it ## needs these extra options. Once the VM gets moved to a newer node, these ## two options can safely be removed. diff --git a/infra/vm02179/configuration.nix b/infra/vm02179/configuration.nix index 7c8e32b..4e3cce9 100644 --- a/infra/vm02179/configuration.nix +++ b/infra/vm02179/configuration.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { imports = [ ../common ]; @@ -12,24 +10,4 @@ nix = { settings.trusted-users = [ "@wheel" ]; }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - (pkgs.vim_configurable.customize { - name = "vim"; - vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { - start = [ vim-nix ]; # load plugin on startup - }; - vimrcConfig.customRC = '' - " your custom vimrc - set nocompatible - set backspace=indent,eol,start - " Turn on syntax highlighting by default - syntax on - " ... - ''; - }) - wget - ]; } diff --git a/infra/vm02186/procolix-configuration.nix b/infra/vm02186/procolix-configuration.nix index 2919a0e..9cd4bf0 100644 --- a/infra/vm02186/procolix-configuration.nix +++ b/infra/vm02186/procolix-configuration.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { imports = [ ../common ]; @@ -8,24 +6,4 @@ ip4 = "185.206.232.186"; ip6 = "2a00:51c0:12:1201::186"; }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - (pkgs.vim_configurable.customize { - name = "vim"; - vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { - start = [ vim-nix ]; # load plugin on startup - }; - vimrcConfig.customRC = '' - " your custom vimrc - set nocompatible - set backspace=indent,eol,start - " Turn on syntax highlighting by default - syntax on - " ... - ''; - }) - wget - ]; } diff --git a/infra/vm02187/configuration.nix b/infra/vm02187/configuration.nix index 7687ffb..6aaf946 100644 --- a/infra/vm02187/configuration.nix +++ b/infra/vm02187/configuration.nix @@ -70,24 +70,4 @@ }; users.users.nginx.extraGroups = [ "acme" ]; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - (pkgs.vim_configurable.customize { - name = "vim"; - vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { - start = [ vim-nix ]; # load plugin on startup - }; - vimrcConfig.customRC = '' - " your custom vimrc - set nocompatible - set backspace=indent,eol,start - " Turn on syntax highlighting by default - syntax on - " ... - ''; - }) - wget - ]; }