Updated configuration with bluetooth and gtk portals
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# NOTE(starter): this is the primary user across all hosts. The username for primary is defined in hostSpec,
|
||||
# and is declared in `nix-config/common/core/default.nix`
|
||||
|
||||
# User config applicable to both nixos and darwin
|
||||
{
|
||||
inputs,
|
||||
@@ -8,61 +7,59 @@
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
hostSpec = config.hostSpec;
|
||||
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
||||
in
|
||||
{
|
||||
users.users.${hostSpec.username} = {
|
||||
name = hostSpec.username;
|
||||
shell = pkgs.bash; # default shell
|
||||
{
|
||||
users.users.${hostSpec.username} = {
|
||||
name = hostSpec.username;
|
||||
shell = pkgs.fish; # default shell
|
||||
|
||||
# These get placed into /etc/ssh/authorized_keys.d/<name> on nixos
|
||||
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
|
||||
};
|
||||
# These get placed into /etc/ssh/authorized_keys.d/<name> on nixos
|
||||
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
|
||||
};
|
||||
|
||||
# Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal)
|
||||
systemd.tmpfiles.rules =
|
||||
let
|
||||
# Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal)
|
||||
systemd.tmpfiles.rules = let
|
||||
user = config.users.users.${hostSpec.username}.name;
|
||||
group = config.users.users.${hostSpec.username}.group;
|
||||
in
|
||||
# you must set the rule for .ssh separately first, otherwise it will be automatically created as root:root and .ssh/sockects will fail
|
||||
[
|
||||
"d /home/${hostSpec.username}/.ssh 0750 ${user} ${group} -"
|
||||
"d /home/${hostSpec.username}/.ssh/sockets 0750 ${user} ${group} -"
|
||||
];
|
||||
# you must set the rule for .ssh separately first, otherwise it will be automatically created as root:root and .ssh/sockects will fail
|
||||
[
|
||||
"d /home/${hostSpec.username}/.ssh 0750 ${user} ${group} -"
|
||||
"d /home/${hostSpec.username}/.ssh/sockets 0750 ${user} ${group} -"
|
||||
];
|
||||
|
||||
# No matter what environment we are in we want these tools
|
||||
programs.zsh.enable = true;
|
||||
environment.systemPackages = [
|
||||
pkgs.just
|
||||
pkgs.rsync
|
||||
];
|
||||
}
|
||||
# Import the user's personal/home configurations, unless the environment is minimal
|
||||
// lib.optionalAttrs (inputs ? "home-manager") {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs;
|
||||
hostSpec = config.hostSpec;
|
||||
# No matter what environment we are in we want these tools
|
||||
programs.fish.enable = true;
|
||||
environment.systemPackages = [
|
||||
pkgs.just
|
||||
pkgs.rsync
|
||||
];
|
||||
}
|
||||
# Import the user's personal/home configurations, unless the environment is minimal
|
||||
// lib.optionalAttrs (inputs ? "home-manager") {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs;
|
||||
hostSpec = config.hostSpec;
|
||||
};
|
||||
users.${hostSpec.username}.imports = lib.flatten (
|
||||
lib.optional (!hostSpec.isMinimal) [
|
||||
(
|
||||
{config, ...}:
|
||||
import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") {
|
||||
inherit
|
||||
pkgs
|
||||
inputs
|
||||
config
|
||||
lib
|
||||
hostSpec
|
||||
;
|
||||
}
|
||||
)
|
||||
]
|
||||
);
|
||||
};
|
||||
users.${hostSpec.username}.imports = lib.flatten (
|
||||
lib.optional (!hostSpec.isMinimal) [
|
||||
(
|
||||
{ config, ... }:
|
||||
import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") {
|
||||
inherit
|
||||
pkgs
|
||||
inputs
|
||||
config
|
||||
lib
|
||||
hostSpec
|
||||
;
|
||||
}
|
||||
)
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user