From db3dda1f0b87659e8436f57968dd1241c2583264 Mon Sep 17 00:00:00 2001 From: Nickolaj Jepsen Date: Wed, 19 Feb 2025 20:08:25 +0000 Subject: [PATCH] desktop deploy --- justfile | 9 ++++++++- ...nfiguration.disabled => disk-configuration.nix} | 0 parts/modules/base/user.nix | 14 ++------------ parts/modules/hardware/yubikey.nix | 3 +++ parts/modules/required.nix | 1 + 5 files changed, 14 insertions(+), 13 deletions(-) rename parts/hosts/desktop/{disk-configuration.disabled => disk-configuration.nix} (100%) create mode 100644 parts/modules/hardware/yubikey.nix diff --git a/justfile b/justfile index 81606e8..795ebd8 100644 --- a/justfile +++ b/justfile @@ -62,8 +62,15 @@ deploy-factor hostname target='': tmp_dir := "/tmp/secrets/" + uuid() +[group("deploy")] +deploy hostname *ARGS: + nix run nixpkgs#nixos-rebuild -- \ + --flake .#{{ hostname }} \ + {{ ARGS }} switch + + [group('deploy')] -deploy hostname target: +deploy-remote hostname target: #!/usr/bin/env -S bash -e git add . diff --git a/parts/hosts/desktop/disk-configuration.disabled b/parts/hosts/desktop/disk-configuration.nix similarity index 100% rename from parts/hosts/desktop/disk-configuration.disabled rename to parts/hosts/desktop/disk-configuration.nix diff --git a/parts/modules/base/user.nix b/parts/modules/base/user.nix index 45c9838..3c74cab 100644 --- a/parts/modules/base/user.nix +++ b/parts/modules/base/user.nix @@ -9,16 +9,6 @@ with lib; let inherit (config.age) secrets; in { options.fireproof = { - username = lib.mkOption { - type = lib.types.str; - default = "nickolaj"; - description = "The username of the user"; - }; - group = lib.mkOption { - type = lib.types.str; - default = "users"; - }; - home-manager = lib.mkOption { type = options.home-manager.users.type.functor.wrapped; }; @@ -29,8 +19,8 @@ in { users.users.${username} = { isNormalUser = true; extraGroups = ["wheel"]; - # initialPassword = "password"; - hashedPasswordFile = secrets.hashed-user-password.path; + initialPassword = "password"; + #hashedPasswordFile = secrets.hashed-user-password.path; }; home-manager = { diff --git a/parts/modules/hardware/yubikey.nix b/parts/modules/hardware/yubikey.nix new file mode 100644 index 0000000..519fb9b --- /dev/null +++ b/parts/modules/hardware/yubikey.nix @@ -0,0 +1,3 @@ +_: { + services.pcscd.enable = true; +} \ No newline at end of file diff --git a/parts/modules/required.nix b/parts/modules/required.nix index ac3d622..df4815a 100644 --- a/parts/modules/required.nix +++ b/parts/modules/required.nix @@ -9,5 +9,6 @@ ./base/default-apps.nix ./dev/just.nix ./hardware/usb.nix + ./hardware/yubikey.nix ]; }