From 6098a39e2a07c511c0359dfcf8365cebb96d63fe Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sun, 9 Jan 2022 13:29:03 -0500 Subject: [PATCH 01/13] Flakes update --- flake.lock | 16 +++---- flake.nix | 45 ++++++++++++++++--- .../loft => environments/mac}/config.nix | 0 user/{machines => environments}/mac/home.nix | 0 .../mac => environments/nixos}/config.nix | 0 .../loft => environments/nixos}/home.nix | 4 -- .../{machines => environments}/wsl/config.nix | 0 user/{machines => environments}/wsl/home.nix | 1 - user/machines/kitchen/config.nix | 3 -- user/machines/kitchen/home.nix | 20 --------- 10 files changed, 48 insertions(+), 41 deletions(-) rename user/{machines/loft => environments/mac}/config.nix (100%) rename user/{machines => environments}/mac/home.nix (100%) rename user/{machines/mac => environments/nixos}/config.nix (100%) rename user/{machines/loft => environments/nixos}/home.nix (79%) rename user/{machines => environments}/wsl/config.nix (100%) rename user/{machines => environments}/wsl/home.nix (90%) delete mode 100644 user/machines/kitchen/config.nix delete mode 100644 user/machines/kitchen/home.nix diff --git a/flake.lock b/flake.lock index e8408e5..395e242 100644 --- a/flake.lock +++ b/flake.lock @@ -7,32 +7,32 @@ ] }, "locked": { - "lastModified": 1627649712, - "narHash": "sha256-AJBasvMKpsyJmCLdjroBElCHY5AlalbVy+XY5vjbgXc=", + "lastModified": 1639871969, + "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=", "owner": "rycee", "repo": "home-manager", - "rev": "b39647e52ed3c0b989e9d5c965e598ae4c38d7ef", + "rev": "697cc8c68ed6a606296efbbe9614c32537078756", "type": "github" }, "original": { "owner": "rycee", - "ref": "release-21.05", + "ref": "release-21.11", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1629033443, - "narHash": "sha256-Vo3TvQvR5hsd3incx/xOt6GFgTm651CYVauHS/irOFo=", + "lastModified": 1641687203, + "narHash": "sha256-W6Xrb/l1x+E+WMVLw4q5HUnNjt3x4WQFSYJtjJtopbU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8ac785da9843aa110caeed6c912875e46a415a11", + "rev": "00acdb2aa817048fbe1f91ece18fe7de09762531", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-21.05", + "ref": "nixos-21.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 87c20ab..be42941 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,16 @@ description = "Michael Thomas's NixOS configuration"; inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; + unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nur.url = "github:nix-community/NUR"; + home-manager = { - url = "github:rycee/home-manager/release-21.05"; + url = "github:rycee/home-manager/release-21.11"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; - - nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05"; - unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nur.url = "github:nix-community/NUR"; }; outputs = inputs: { @@ -38,7 +38,42 @@ ]; specialArgs = { inherit inputs; }; }; + }; + homeConfigurations = { + nixos = inputs.home-manager.lib.homeManagerConfiguration { + system = "x86_64-linux"; + homeDirectory = "/home/michael"; + username = "michael"; + stateVersion = "21.05"; + configuration = { config, pkgs, ... }: + { + nixpkgs.config = { + allowUnfree = true; + }; + + imports = [ + ./user/environments/nixos/home.nix + ]; + }; + }; + + wsl = inputs.home-manager.lib.homeManagerConfiguration { + system = "x86_64-linux"; + homeDirectory = "/home/michael"; + username = "michael"; + stateVersion = "21.05"; + configuration = { config, pkgs, ... }: + { + nixpkgs.config = { + allowUnfree = true; + }; + + imports = [ + ./user/environments/wsl/home.nix + ]; + }; + }; }; }; } diff --git a/user/machines/loft/config.nix b/user/environments/mac/config.nix similarity index 100% rename from user/machines/loft/config.nix rename to user/environments/mac/config.nix diff --git a/user/machines/mac/home.nix b/user/environments/mac/home.nix similarity index 100% rename from user/machines/mac/home.nix rename to user/environments/mac/home.nix diff --git a/user/machines/mac/config.nix b/user/environments/nixos/config.nix similarity index 100% rename from user/machines/mac/config.nix rename to user/environments/nixos/config.nix diff --git a/user/machines/loft/home.nix b/user/environments/nixos/home.nix similarity index 79% rename from user/machines/loft/home.nix rename to user/environments/nixos/home.nix index 24f89e4..860a3d4 100644 --- a/user/machines/loft/home.nix +++ b/user/environments/nixos/home.nix @@ -2,7 +2,6 @@ { imports = [ - ../../modules/home-manager.nix ../../modules/dev.nix ../../modules/fonts.nix ../../modules/git.nix @@ -13,9 +12,6 @@ ]; home.packages = with pkgs; [ - neofetch - fortune - google-chrome firefox ]; diff --git a/user/machines/wsl/config.nix b/user/environments/wsl/config.nix similarity index 100% rename from user/machines/wsl/config.nix rename to user/environments/wsl/config.nix diff --git a/user/machines/wsl/home.nix b/user/environments/wsl/home.nix similarity index 90% rename from user/machines/wsl/home.nix rename to user/environments/wsl/home.nix index 8b95958..bf87936 100644 --- a/user/machines/wsl/home.nix +++ b/user/environments/wsl/home.nix @@ -2,7 +2,6 @@ { imports = [ - ../../modules/home-manager.nix ../../modules/git.nix ../../modules/zsh.nix ]; diff --git a/user/machines/kitchen/config.nix b/user/machines/kitchen/config.nix deleted file mode 100644 index 1dd1750..0000000 --- a/user/machines/kitchen/config.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - allowUnfree = true; -} diff --git a/user/machines/kitchen/home.nix b/user/machines/kitchen/home.nix deleted file mode 100644 index 918fc12..0000000 --- a/user/machines/kitchen/home.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ - ../../modules/home-manager.nix - ../../modules/fonts.nix - ../../modules/git.nix - ../../modules/git_nixos.nix - ../../modules/gnome.nix - ../../modules/dev.nix - ../../modules/vscode.nix - ../../modules/zsh.nix - ]; - - home.packages = with pkgs; [ - neofetch - fortune - ]; - -} \ No newline at end of file From dcb10ba18a6bdc6ad6c0058ab26548818cc7a3a2 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sun, 9 Jan 2022 13:37:10 -0500 Subject: [PATCH 02/13] Fix home-manager --- flake.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake.nix b/flake.nix index be42941..cf71d54 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,8 @@ allowUnfree = true; }; + programs.home-manager.enable = true; + imports = [ ./user/environments/nixos/home.nix ]; @@ -69,6 +71,8 @@ allowUnfree = true; }; + programs.home-manager.enable = true; + imports = [ ./user/environments/wsl/home.nix ]; From cffaa90de36ed5a48fd2d57e5856a6b78d5a5307 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sun, 9 Jan 2022 13:37:20 -0500 Subject: [PATCH 03/13] Fix zsh error symbol --- user/modules/zsh.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix index d1ac3e1..98f146d 100644 --- a/user/modules/zsh.nix +++ b/user/modules/zsh.nix @@ -41,6 +41,7 @@ enableZshIntegration = true; settings = { character.success_symbol = "[➜](green)"; + character.error_symbol = "[➜](red)"; }; }; } \ No newline at end of file From 89f16664c5439668a3e4f8c45ae43a43e9083983 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sun, 9 Jan 2022 16:31:18 -0500 Subject: [PATCH 04/13] Add dev module to wsl --- user/environments/wsl/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/environments/wsl/home.nix b/user/environments/wsl/home.nix index bf87936..db17ab0 100644 --- a/user/environments/wsl/home.nix +++ b/user/environments/wsl/home.nix @@ -2,6 +2,7 @@ { imports = [ + ../../modules/dev.nix ../../modules/git.nix ../../modules/zsh.nix ]; From 6f365c4dab7f9c5b98d3211065db28ce4a63e8ef Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 03:26:57 +0000 Subject: [PATCH 05/13] Add nix package config --- modules/nix.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/nix.nix diff --git a/modules/nix.nix b/modules/nix.nix new file mode 100644 index 0000000..cb995c0 --- /dev/null +++ b/modules/nix.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + nix.extraOptions = '' + experimental-features = nix-command + ''; + # this is required until nix 2.4 is released + nix.package = pkgs.nixUnstable; +} From 0c955ab2ccaf188c6e8766052b2750d49bbf7a0c Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 03:27:09 +0000 Subject: [PATCH 06/13] Add support for vscode development server --- modules/vscode-server.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/vscode-server.nix diff --git a/modules/vscode-server.nix b/modules/vscode-server.nix new file mode 100644 index 0000000..0ee46c8 --- /dev/null +++ b/modules/vscode-server.nix @@ -0,0 +1,7 @@ +{ + imports = [ + (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") + ]; + + services.vscode-server.enable = true; +} \ No newline at end of file From 28132b678310129d4328cd61c78b1758557150ff Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 03:28:24 +0000 Subject: [PATCH 07/13] Add nodejs to dev environment --- user/modules/dev.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/modules/dev.nix b/user/modules/dev.nix index dcd64e4..664e8c1 100644 --- a/user/modules/dev.nix +++ b/user/modules/dev.nix @@ -1,7 +1,8 @@ { config, pkgs, libs, ... }: { home.packages = with pkgs; [ + nodejs nodePackages.yarn php ]; -} \ No newline at end of file +} From e95897a160f4cc152a774fc8af1ea0941378e2d1 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 03:28:40 +0000 Subject: [PATCH 08/13] Init work machine --- flake.nix | 12 +++++++ machines/work/configuration.nix | 59 +++++++++++++++++++++++++++++++++ machines/work/syschdemd.nix | 15 +++++++++ machines/work/syschdemd.sh | 26 +++++++++++++++ modules/common.nix | 1 + 5 files changed, 113 insertions(+) create mode 100644 machines/work/configuration.nix create mode 100644 machines/work/syschdemd.nix create mode 100644 machines/work/syschdemd.sh diff --git a/flake.nix b/flake.nix index cf71d54..edb8b17 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,18 @@ ]; specialArgs = { inherit inputs; }; }; + + work = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./modules/nix.nix + ./modules/containers.nix + + ./machines/work/configuration.nix + ]; + specialArgs = { inherit inputs; }; + }; + }; homeConfigurations = { diff --git a/machines/work/configuration.nix b/machines/work/configuration.nix new file mode 100644 index 0000000..f005e01 --- /dev/null +++ b/machines/work/configuration.nix @@ -0,0 +1,59 @@ +{ lib, pkgs, config, modulesPath, ... }: + +with lib; +let + defaultUser = "michael"; + syschdemd = import ./syschdemd.nix { inherit lib pkgs config defaultUser; }; +in +{ + imports = [ + "${modulesPath}/profiles/minimal.nix" + ]; + + # WSL is closer to a container than anything else + boot.isContainer = true; + + environment.etc.hosts.enable = false; + environment.etc."resolv.conf".enable = false; + + programs.adb.enable = true; + networking.dhcpcd.enable = false; + + # Proxychains + programs.proxychains = { + enable = true; + proxies.main = { + enable = true; + type = "http"; + host = "172.21.32.1"; + port = 1080; + }; + }; + + users.users.${defaultUser} = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + shell = pkgs.zsh; + }; + + users.users.root = { + shell = "${syschdemd}/bin/syschdemd"; + # Otherwise WSL fails to login as root with "initgroups failed 5" + extraGroups = [ "root" ]; + }; + + security.sudo.wheelNeedsPassword = false; + + # Disable systemd units that don't make sense on WSL + systemd.services."serial-getty@ttyS0".enable = false; + systemd.services."serial-getty@hvc0".enable = false; + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@".enable = false; + + systemd.services.firewall.enable = false; + systemd.services.systemd-resolved.enable = false; + systemd.services.systemd-udevd.enable = false; + + # Don't allow emergency mode, because we don't have a console. + systemd.enableEmergencyMode = false; +} diff --git a/machines/work/syschdemd.nix b/machines/work/syschdemd.nix new file mode 100644 index 0000000..29b7817 --- /dev/null +++ b/machines/work/syschdemd.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, config, defaultUser, ... }: + +pkgs.substituteAll { + name = "syschdemd"; + src = ./syschdemd.sh; + dir = "bin"; + isExecutable = true; + + buildInputs = with pkgs; [ daemonize ]; + + inherit (pkgs) daemonize; + inherit defaultUser; + inherit (config.security) wrapperDir; + fsPackagesPath = lib.makeBinPath config.system.fsPackages; +} diff --git a/machines/work/syschdemd.sh b/machines/work/syschdemd.sh new file mode 100644 index 0000000..bf94dda --- /dev/null +++ b/machines/work/syschdemd.sh @@ -0,0 +1,26 @@ +#! @shell@ + +set -e + +sw="/nix/var/nix/profiles/system/sw/bin" +systemPath=`${sw}/readlink -f /nix/var/nix/profiles/system` + +# Needs root to work +if [[ $EUID -ne 0 ]]; then + echo "[ERROR] Requires root! :( Make sure the WSL default user is set to root" + exit 1 +fi + +if [ ! -e "/run/current-system" ]; then + /nix/var/nix/profiles/system/activate +fi + +if [ ! -e "/run/systemd.pid" ]; then + PATH=/run/current-system/systemd/lib/systemd:@fsPackagesPath@ \ + LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ + @daemonize@/bin/daemonize /run/current-system/sw/bin/unshare -fp --mount-proc systemd + /run/current-system/sw/bin/pgrep -xf systemd > /run/systemd.pid +fi + +userShell=$($sw/getent passwd @defaultUser@ | $sw/cut -d: -f7) +exec $sw/nsenter -t $(< /run/systemd.pid) -p -m --wd="$PWD" -- @wrapperDir@/su -s $userShell @defaultUser@ "$@" diff --git a/modules/common.nix b/modules/common.nix index 0a86359..c4b83ae 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -7,6 +7,7 @@ ./flatpak.nix ./fonts.nix ./gnome.nix + ./nix.nix ./sound.nix ]; } \ No newline at end of file From 039cd98dd693cf29ba55190398850ee768d3e647 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 05:04:14 +0000 Subject: [PATCH 09/13] Update work flake --- flake.nix | 3 ++- modules/nix.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index edb8b17..e79abc6 100644 --- a/flake.nix +++ b/flake.nix @@ -42,8 +42,9 @@ work = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./modules/nix.nix ./modules/containers.nix + ./modules/nix.nix + ./modules/vscode-server.nix ./machines/work/configuration.nix ]; diff --git a/modules/nix.nix b/modules/nix.nix index cb995c0..b40a5bd 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { nix.extraOptions = '' - experimental-features = nix-command + experimental-features = flakes nix-command ''; # this is required until nix 2.4 is released nix.package = pkgs.nixUnstable; From a8b3f865b76567f390ebeb4378b95c072c0309c1 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 05:04:30 +0000 Subject: [PATCH 10/13] Update inputs to latest --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 395e242..9a7be9d 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1641687203, - "narHash": "sha256-W6Xrb/l1x+E+WMVLw4q5HUnNjt3x4WQFSYJtjJtopbU=", + "lastModified": 1642190797, + "narHash": "sha256-cxeEEAtfIACnm8sV1oz0xlNp9IVk10Fxcc09ggoEZuo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "00acdb2aa817048fbe1f91ece18fe7de09762531", + "rev": "3ddd960a3b575bf3230d0e59f42614b71f9e0db9", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nur": { "locked": { - "lastModified": 1629143403, - "narHash": "sha256-Z57DBF3MUTqTnJyYjqEN+DNZLrVukEJJotcxYPHNR/M=", + "lastModified": 1642392502, + "narHash": "sha256-ZRgwagDhwT5eQgTSqhupXz3ugQmFat0836d5Hh8ZK4Q=", "owner": "nix-community", "repo": "NUR", - "rev": "79a06a9145c61960dd4b5c2eda67e26276976db1", + "rev": "8993a1cfc2d6ed69725788a2ccafbe8cde0510e3", "type": "github" }, "original": { @@ -62,11 +62,11 @@ }, "unstable": { "locked": { - "lastModified": 1629048390, - "narHash": "sha256-do7HuXFSKyj4ulMlRvGigNZCqOaGD9i0M3OLkFQgEAc=", + "lastModified": 1642104392, + "narHash": "sha256-m71b7MgMh9FDv4MnI5sg9MiBVW6DhE1zq+d/KlLWSC8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e41ba38114055832e5ba4a851e9c00149eef3e4a", + "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5", "type": "github" }, "original": { From 9f301190bedc3c3237e7749796367659f1f1ad33 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 05:08:17 +0000 Subject: [PATCH 11/13] Finish modularizing nix config --- machines/kitchen/configuration.nix | 18 ------------------ machines/loft/configuration.nix | 18 ------------------ modules/nix.nix | 23 ++++++++++++++++++----- 3 files changed, 18 insertions(+), 41 deletions(-) diff --git a/machines/kitchen/configuration.nix b/machines/kitchen/configuration.nix index c27d5f4..b185314 100644 --- a/machines/kitchen/configuration.nix +++ b/machines/kitchen/configuration.nix @@ -10,24 +10,6 @@ ./hardware-configuration.nix ]; - # Auto cleanup - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - autoOptimiseStore = true; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; - - nixpkgs.config = { - allowUnfree = true; - }; - networking.hostName = "nixos"; # Define your hostname. # The global useDHCP flag is deprecated, therefore explicitly set to false here. diff --git a/machines/loft/configuration.nix b/machines/loft/configuration.nix index 90ee687..a0b5c89 100644 --- a/machines/loft/configuration.nix +++ b/machines/loft/configuration.nix @@ -10,24 +10,6 @@ ./hardware-configuration.nix ]; - # Auto cleanup - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - autoOptimiseStore = true; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; - - nixpkgs.config = { - allowUnfree = true; - }; - # Set your time zone. time.timeZone = "America/New_York"; diff --git a/modules/nix.nix b/modules/nix.nix index b40a5bd..233b2ba 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,8 +1,21 @@ { pkgs, ... }: { - nix.extraOptions = '' - experimental-features = flakes nix-command - ''; - # this is required until nix 2.4 is released - nix.package = pkgs.nixUnstable; + nix = { + extraOptions = '' + experimental-features = flakes nix-command + ''; + # this is required until nix 2.4 is released + package = pkgs.nixUnstable; + + autoOptimiseStore = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + }; + + nixpkgs.config = { + allowUnfree = true; + }; } From 661a612d16ac49e0be43704b8a3a835d324f10de Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 05:10:38 +0000 Subject: [PATCH 12/13] Add timezone to work config --- machines/work/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machines/work/configuration.nix b/machines/work/configuration.nix index f005e01..cadde05 100644 --- a/machines/work/configuration.nix +++ b/machines/work/configuration.nix @@ -16,6 +16,8 @@ in environment.etc.hosts.enable = false; environment.etc."resolv.conf".enable = false; + time.timeZone = "America/New_York"; + programs.adb.enable = true; networking.dhcpcd.enable = false; From a3576c89f69ebd70e193402083fb504ead952e64 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 17 Jan 2022 05:10:47 +0000 Subject: [PATCH 13/13] Update kitchen hostname --- machines/kitchen/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/kitchen/configuration.nix b/machines/kitchen/configuration.nix index b185314..0970b27 100644 --- a/machines/kitchen/configuration.nix +++ b/machines/kitchen/configuration.nix @@ -10,7 +10,7 @@ ./hardware-configuration.nix ]; - networking.hostName = "nixos"; # Define your hostname. + networking.hostName = "kitchen-nixos"; # Define your hostname. # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config