Updated configuration with bluetooth and gtk portals
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults lecture = never # rollback results in sudo lectures after each reboot, it's somewhat useless anyway
|
||||
Defaults pwfeedback # password input feedback - makes typed password visible as asterisks
|
||||
Defaults timestamp_timeout=120 # only ask for password every 2h
|
||||
Defaults timestamp_timeout=5 # only ask for password every 2h
|
||||
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
||||
Defaults env_keep+=SSH_AUTH_SOCK
|
||||
'';
|
||||
@@ -27,7 +27,7 @@
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 20d --keep 20";
|
||||
flake = "/home/user/${config.hostSpec.home}/nix-config";
|
||||
flake = "/home/user/${config.hostSpec.home}/Projects/nix-config";
|
||||
};
|
||||
|
||||
#
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.variables.GTK_USE_PORTAL = 1;
|
||||
}
|
||||
|
||||
5
hosts/common/optional/services/bluetooth.nix
Normal file
5
hosts/common/optional/services/bluetooth.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
# Enable bluetooth
|
||||
{...}: {
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
}
|
||||
@@ -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
|
||||
;
|
||||
}
|
||||
)
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
# This is an example nixos hosts module.
|
||||
# They will automatically be imported below.
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# Bellerophon - Example Desktop
|
||||
#
|
||||
###############################################################
|
||||
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
#
|
||||
# ========== Hardware ==========
|
||||
@@ -53,7 +50,7 @@
|
||||
# FIXME(starter): the primary user, defined in `nix-config/hosts/common/users`, is added by default, via
|
||||
# `hosts/common/core` above.
|
||||
# To create additional users, specify the path to their config file, as shown in the commented line below, and create/modify
|
||||
# the specified file as required. See `nix-config/hosts/common/users/exampleSecondUser` for more info.
|
||||
# the specified file as required. See `nix-config/hosts/common/users/exampleSecondUser` for more info.
|
||||
|
||||
#"hosts/common/users/exampleSecondUser"
|
||||
|
||||
@@ -62,7 +59,8 @@
|
||||
#
|
||||
# FIXME(starter): add or remove any optional host-level configuration files the host will use
|
||||
# The following are for example sake only and are not necessarily required.
|
||||
"hosts/common/optional/services/openssh.nix" # allow remote SSH access
|
||||
#"hosts/common/optional/services/openssh.nix" # allow remote SSH access
|
||||
"hosts/common/optional/services/bluetooth.nix"
|
||||
"hosts/common/optional/audio.nix" # pipewire and cli controls
|
||||
"hosts/common/optional/kde.nix"
|
||||
"hosts/common/optional/sddm.nix"
|
||||
|
||||
Reference in New Issue
Block a user