Skip to content

Commit

Permalink
Move user specific files into user module
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Oct 20, 2023
1 parent 6e5f89e commit 957f6a2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
8 changes: 0 additions & 8 deletions home/roles/mobile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ let

cfg = config.custom.roles.mobile;

logseqSshKey = "id_logseq";
logseqSshPubKey = "${logseqSshKey}.pub";

in

{
Expand All @@ -27,11 +24,6 @@ in
custom = {
base.nix-on-droid.enable = true;

programs.ssh = {
enable = true;
identities = [ logseqSshKey logseqSshPubKey ];
};

roles = {
mobile.bin.enable = true;
};
Expand Down
2 changes: 2 additions & 0 deletions home/users/christian/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ in

custom = {
roles.homeage.enable = true;

users."${username}" = {
fonts.enable = !config.custom.roles.mobile.enable;
git.enable = true;
hardware = {
kmonad.enable = !config.custom.roles.mobile.enable;
xbindkeys.enable = !config.custom.roles.mobile.enable;
};
mobile.enable = config.custom.roles.mobile.enable;
office.cli.enable = config.custom.roles.office.cli.enable;
shell.enable = true;
steam.enable = config.custom.roles.gaming.enable;
Expand Down
29 changes: 29 additions & 0 deletions home/users/christian/mobile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.custom.users.christian.mobile;

logseqSshKey = "id_logseq";
logseqSshPubKey = "${logseqSshKey}.pub";

in

{
options = {
custom.users.christian.mobile = {
enable = mkEnableOption "Mobile";
};
};

config = mkIf cfg.enable {
custom = {
programs.ssh = {
enable = true;
identities = [ logseqSshKey logseqSshPubKey ];
};
};
};
}

0 comments on commit 957f6a2

Please sign in to comment.