From d61ade383f253ef2d7422a28f99895587aecd8b0 Mon Sep 17 00:00:00 2001 From: Quentin Boyer Date: Sun, 20 Jun 2021 22:13:29 +0200 Subject: [PATCH] split local / sensitive info --- .gitignore | 1 + graphical.nix | 7 +++++-- home.nix | 9 ++++++--- localinfo.nix.template | 9 +++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 localinfo.nix.template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e89bd56 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +localinfo.nix diff --git a/graphical.nix b/graphical.nix index 2401d38..0b78ce4 100644 --- a/graphical.nix +++ b/graphical.nix @@ -1,5 +1,8 @@ { pkgs, config, ... }: +let + localinfo = import ./localinfo.nix; +in { home.packages = with pkgs; [ bitwarden @@ -99,12 +102,12 @@ command = "waybar"; }]; input = { - "1:1:AT_Translated_Set_2_keyboard" = { + "${localinfo.keyboard}" = { xkb_layout = "us"; xkb_variant = "dvp"; xkb_options = "compose:102"; }; - "2:7:SynPS/2_Synaptics_TouchPad" = { + "${localinfo.touchpad}" = { dwt = "disable"; }; }; diff --git a/home.nix b/home.nix index 0ccf214..3486669 100644 --- a/home.nix +++ b/home.nix @@ -1,13 +1,16 @@ { config, pkgs, lib, ... }: +let + localinfo = import ./localinfo.nix; +in { imports = [ ./graphical.nix ]; # Home Manager needs a bit of information about you and the # paths it should manage. - home.username = "traxys"; - home.homeDirectory = "/home/traxys"; + home.username = localinfo.username; + home.homeDirectory = localinfo.homeDir; home.sessionVariables = { EDITOR = "nvim"; @@ -41,7 +44,7 @@ git = { enable = true; userName = "Quentin Boyer"; - userEmail = "quentin+dev@familleboyer.net"; + userEmail = localinfo.email; }; zoxide = { diff --git a/localinfo.nix.template b/localinfo.nix.template new file mode 100644 index 0000000..07d406c --- /dev/null +++ b/localinfo.nix.template @@ -0,0 +1,9 @@ +{ + username = "string"; + homeDir = "path"; + + email = "email"; + + keyboard = "null or libinput id"; + touchpad = "null or libinput id"; +}