diff --git a/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix index 7dd8ea2..0bfa8ec 100644 --- a/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix +++ b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix @@ -30,6 +30,7 @@ }; ## Desktop + custom.users.jake.password = true; custom.desktop.awesome.enable = true; ## Resilio @@ -84,12 +85,7 @@ }; }; - ## Password (for interactive logins) - age.secrets."passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake".file = ../../secrets/passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake.age; - users.users."${config.custom.user}" = { - passwordFile = config.age.secrets."passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake".path; - packages = with pkgs; [ prismlauncher ]; diff --git a/hosts/router.home.ts.hillion.co.uk/default.nix b/hosts/router.home.ts.hillion.co.uk/default.nix index a0130be..7bb4954 100644 --- a/hosts/router.home.ts.hillion.co.uk/default.nix +++ b/hosts/router.home.ts.hillion.co.uk/default.nix @@ -19,6 +19,9 @@ "net.ipv4.conf.all.forwarding" = true; }; + ## Interactive password + custom.users.jake.password = true; + ## Impermanence custom.impermanence.enable = true; diff --git a/hosts/router.home.ts.hillion.co.uk/hardware-configuration.nix b/hosts/router.home.ts.hillion.co.uk/hardware-configuration.nix index af4ff7b..984ea88 100644 --- a/hosts/router.home.ts.hillion.co.uk/hardware-configuration.nix +++ b/hosts/router.home.ts.hillion.co.uk/hardware-configuration.nix @@ -12,6 +12,7 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; + boot.kernelParams = [ "console=ttyS0,115200n8" ]; boot.extraModulePackages = [ ]; fileSystems."/" = diff --git a/modules/default.nix b/modules/default.nix index 78df3b0..2893faf 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,6 +7,7 @@ ./common/hostinfo.nix ./desktop/awesome/default.nix ./drone/default.nix + ./ids.nix ./impermanence.nix ./locations.nix ./resilio.nix diff --git a/modules/ids.nix b/modules/ids.nix new file mode 100644 index 0000000..cbf39ff --- /dev/null +++ b/modules/ids.nix @@ -0,0 +1,21 @@ +{ config, pkgs, lib, ... }: + +{ + config = { + ids.uids = { + ## Defined System Users (see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/ids.nix) + unifi = 183; + + ## Consistent People + jake = 1000; + joseph = 1001; + }; + ids.gids = { + ## Defined System Groups (see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/ids.nix) + unifi = 183; + + ## Consistent Groups + mediaaccess = 1200; + }; + }; +} diff --git a/modules/users.nix b/modules/users.nix index cbf39ff..b2aae25 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -1,21 +1,21 @@ { config, pkgs, lib, ... }: +let + cfg = config.custom.users; +in { - config = { - ids.uids = { - ## Defined System Users (see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/ids.nix) - unifi = 183; - - ## Consistent People - jake = 1000; - joseph = 1001; - }; - ids.gids = { - ## Defined System Groups (see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/ids.nix) - unifi = 183; - - ## Consistent Groups - mediaaccess = 1200; + options.custom.users = { + jake = { + password = lib.mkOption { + description = "Enable an interactive password."; + type = lib.types.bool; + default = false; + }; }; }; + + config = lib.mkIf cfg.jake.password { + age.secrets."passwords/jake".file = ../secrets/passwords/jake.age; + users.users.jake.passwordFile = config.age.secrets."passwords/jake".path; + }; } diff --git a/secrets/passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake.age b/secrets/passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake.age deleted file mode 100644 index 9391b36..0000000 --- a/secrets/passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake.age +++ /dev/null @@ -1,22 +0,0 @@ -age-encryption.org/v1 --> ssh-rsa GxPFJQ -QdAi0Hx70g3qk8IjDJt1AsUWxsDyf/xPrxrkrK9Ad1H2WPpZ9NlP/rTFqBar8tUB -SaHL6BCP3ZXnoecD/dfSzQxW9KjgvhjZ1hRvmCn1W9ss1Y5LEVW5UZrkCp/3Hmkq -wz63dObgadMqEoEA72L/A3WIH2iTx4wEW8YPDpo359F1hbAw0WDEJcjwADv9hImj -htQZyFfOq/LUNRW1WDNS+FjETrxXTaozFcnQSzmPvlfC98lx2+Y+AN3nT4tTZaM/ -k63AobkTItuY06cPNnqndTuUMyhXHVNCX+s9bdFe/3jvaBUu0+gZ0dMphoEVumbg -JrzC3aLwHFVbLUVL3i/oTA --> ssh-rsa K9mW1w -gIsjWimmGNSwMaDrBHyno5z4Bzg58zUbjikbMUKn0tMniA14LNhrNyqcjLEMpqra -v93Zs+mQ9qIMP7ngwdLkNCOMe/Sa5fVKO8WEeXbs8J4cfHM9olgVwgfwyipkyQlT -C215GEaXAyeDZVg6dWYt+oQFNtWuaWMNqvMAgq0ZIsq+OOdbvfYJkopdcIDwtWjZ -SoyoN5K/DLMu2BVzNjs3lMVL05HEXz1BgUQHVY0cPWF+/A+51v4LkfHwbEJG47TY -0ICVMJomuzvP/2PIqbKrgrp5mzKpirxpHFtKRPyWjB2A78p+uP6VJjA3KGzdFigL -Dwsw7H2WPlCRp8bNBWZgyg --> ssh-ed25519 rjda/A ogkCjcpYMPgo19AEBSBsNaIk45e45WzA56qGdCsB7B4 -kt9h0r5+oT5yrveLbbcJVsVYhlJ9Uh/S+sA+o67hCgc --> |WiTRkb2-grease f~X": -X8pIHiPHYZWaBjj1H653wxf6MA6/noj4DsBCtgxGRitApWw ---- 8t+DYI+x/AdSt7zXMbhxjzox6qLM1COvctXS72tSjx8 -aSRlɪt>T'6& MrR|ӇUQ0QdfQ<*4 PFbV ":nB:%'\;I&km&|Jr9;= -Ex \ No newline at end of file diff --git a/secrets/passwords/jake.age b/secrets/passwords/jake.age new file mode 100644 index 0000000..e2b11b2 --- /dev/null +++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raWP@znE,P{0V$mj'"=L&B9$(w,mgtT8J<0 _!PEvJY鳲 \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f12ad64..d74bbcd 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -32,7 +32,7 @@ let in { # User Passwords - "passwords/gendry.jakehillion-terminals.ts.hillion.co.uk/jake.age".publicKeys = jake_users ++ [ ts.terminals.jakehillion.gendry ]; + "passwords/jake.age".publicKeys = jake_users ++ [ ts.terminals.jakehillion.gendry ts.home.router ]; # Tailscale Pre-Auth Keys "tailscale/gendry.jakehillion-terminals.ts.hillion.co.uk.age".publicKeys = jake_users ++ [ ts.terminals.jakehillion.gendry ];