From f39962f2463804759cab2d803d6830299227fe4e Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Fri, 1 Dec 2023 08:06:48 +0100 Subject: [PATCH] Add apps and host-users modules --- .config/nix/flake.nix | 2 ++ .config/nix/modules/apps.nix | 19 +++++++++++++++++++ .config/nix/modules/darwin/default.nix | 17 ----------------- .config/nix/modules/host-users.nix | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 .config/nix/modules/apps.nix create mode 100644 .config/nix/modules/host-users.nix diff --git a/.config/nix/flake.nix b/.config/nix/flake.nix index 1a57777..63e0242 100644 --- a/.config/nix/flake.nix +++ b/.config/nix/flake.nix @@ -33,6 +33,8 @@ modules = [ ./modules/nix-core.nix ./modules/system.nix + ./modules/apps.nix + ./modules/host-users.nix ./modules/darwin home-manager.darwinModules.home-manager { diff --git a/.config/nix/modules/apps.nix b/.config/nix/modules/apps.nix new file mode 100644 index 0000000..81d7d18 --- /dev/null +++ b/.config/nix/modules/apps.nix @@ -0,0 +1,19 @@ +{ pkgs, ...}: { + homebrew = { + enable = true; + + brews = [ + "imagemagick" + "trippy" + ]; + + casks = [ + "amethyst" + "firefox" + "logseq" + "thunderbird" + "protonvpn" + "protonmail-bridge" + ]; + }; +} diff --git a/.config/nix/modules/darwin/default.nix b/.config/nix/modules/darwin/default.nix index 0573ac5..1a2e14f 100644 --- a/.config/nix/modules/darwin/default.nix +++ b/.config/nix/modules/darwin/default.nix @@ -21,22 +21,5 @@ }) ]; - users.users.tobi.description = "Tobias Ostner"; - users.users.tobi.home = "/Users/tobi"; users.users.tobi.shell = pkgs.zshInteractive; - homebrew = { - enable = true; - brews = [ - "imagemagick" - "trippy" - ]; - casks = [ - "amethyst" - "firefox" - "logseq" - "thunderbird" - "protonvpn" - "protonmail-bridge" - ]; - }; }) diff --git a/.config/nix/modules/host-users.nix b/.config/nix/modules/host-users.nix new file mode 100644 index 0000000..4d576af --- /dev/null +++ b/.config/nix/modules/host-users.nix @@ -0,0 +1,17 @@ +{ ... }@args: +let + hostname = "TobAir"; + username = "tobi"; +in +{ + networking.hostName = hostname; + networking.computerName = hostname; + system.defaults.smb.NetBIOSName = hostname; + + users.users."${username}" = { + home = "/Users/${username}"; + description = "Tobias Ostner"; + }; + + nix.settings.trusted-users = [ username ]; +}