From 357187782f442eaa470d07d5af493506c8e33615 Mon Sep 17 00:00:00 2001 From: joy Date: Sat, 31 Aug 2024 17:43:40 +0200 Subject: [PATCH] user and homemanger --- modules/system/default.nix | 18 ++++-------------- modules/system/homemanger/default.nix | 11 +++++++++++ modules/system/user/default.nix | 7 +++++++ 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 modules/system/homemanger/default.nix create mode 100644 modules/system/user/default.nix diff --git a/modules/system/default.nix b/modules/system/default.nix index 50be83d..2729a6c 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,10 +1,4 @@ {pkgs, ...}: { - users.users.joy = { - isNormalUser = true; - description = "joy"; - extraGroups = ["wheel" "docker"]; - }; - fonts.packages = with pkgs; [ font-awesome (nerdfonts.override {fonts = ["FiraCode"];}) @@ -28,13 +22,9 @@ services.udisks2.enable = true; services.gvfs.enable = true; - home-manager.users.joy.programs.home-manager.enable = true; + imports = [ + ./user + ./homemanger + ]; - home-manager.users.joy.xdg.mimeApps.defaultApplications = { - "text/plain" = ["helix.desktop"]; - "image/*" = ["imv.desktop"]; - "video/png" = ["mpv.desktop"]; - "video/jpg" = ["mpv.desktop"]; - "video/*" = ["mpv.desktop"]; - }; } diff --git a/modules/system/homemanger/default.nix b/modules/system/homemanger/default.nix new file mode 100644 index 0000000..940300c --- /dev/null +++ b/modules/system/homemanger/default.nix @@ -0,0 +1,11 @@ +{...}: { + home-manager.users.joy.programs.home-manager.enable = true; + + home-manager.users.joy.xdg.mimeApps.defaultApplications = { + "text/plain" = ["helix.desktop"]; + "image/*" = ["imv.desktop"]; + "video/png" = ["mpv.desktop"]; + "video/jpg" = ["mpv.desktop"]; + "video/*" = ["mpv.desktop"]; + }; +} diff --git a/modules/system/user/default.nix b/modules/system/user/default.nix new file mode 100644 index 0000000..a5942e5 --- /dev/null +++ b/modules/system/user/default.nix @@ -0,0 +1,7 @@ +{...}: { + users.users.joy = { + isNormalUser = true; + description = "joy"; + extraGroups = ["wheel" "docker"]; + }; +}