Add Hyprland and Greetd configurations; update desktop settings and user examples
This commit is contained in:
15
hosts/common/optional/greetd.nix
Normal file
15
hosts/common/optional/greetd.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{pkgs, ...}: {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Disable conflicting getty services on tty1
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
}
|
||||
18
hosts/common/optional/hyprland.nix
Normal file
18
hosts/common/optional/hyprland.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# You can add more configuration options here as needed
|
||||
# For example, to set a basic config file:
|
||||
# settings = {
|
||||
# ...
|
||||
# };
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
}
|
||||
@@ -13,6 +13,12 @@ in {
|
||||
|
||||
stylix.base16Scheme = "${tinted-schemes}/base16/tokyo-city-dark.yaml";
|
||||
|
||||
stylix.cursor = {
|
||||
package = pkgs.qogir-icon-theme;
|
||||
name = "Qogir";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.noto-fonts;
|
||||
|
||||
@@ -1,67 +1,64 @@
|
||||
# FIXME(starter): this is an example of how a secondary user called "exampleSecondUser" can be declared.
|
||||
# NOTE that this file's parent directory matches the username!
|
||||
# Modify the directory name and all instances of `exampleSecondUser` in this file to a real username to
|
||||
# make use of this file. You'll also need to import this file in the relevant `nix-config/hosts/[platform]/[hostname]/default.nix`
|
||||
# make use of this file. You'll also need to import this file in the relevant `nix-config/hosts/[platform]/[hostname]/default.nix`
|
||||
# host file for the user to be created on the host.
|
||||
# NOTE that this file also assumes you will be declaring the user's password via sops.
|
||||
# .
|
||||
# If you have no need for secondary users, simple delete this file and its parent directory, and ensure that
|
||||
# your `nix-confitg/hosts/[platform]/[hostname]/default.nix` files do not import this file.
|
||||
|
||||
#
|
||||
# Basic user for viewing exampleSecondUser
|
||||
#
|
||||
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
hostSpec = config.hostSpec;
|
||||
secretsSubPath = "passwords/exampleSecondUser";
|
||||
in
|
||||
{
|
||||
# Decrypt passwords/exampleSecondUser to /run/secrets-for-users/ so it can be used to create the user
|
||||
sops.secrets.${secretsSubPath}.neededForUsers = true;
|
||||
users.mutableUsers = false; # Required for password to be set via sops during system activation!
|
||||
{
|
||||
# Decrypt passwords/exampleSecondUser to /run/secrets-for-users/ so it can be used to create the user
|
||||
sops.secrets.${secretsSubPath}.neededForUsers = true;
|
||||
users.mutableUsers = false; # Required for password to be set via sops during system activation!
|
||||
|
||||
users.users.exampleSecondUser = {
|
||||
isNormalUser = true;
|
||||
hashedPasswordFile = config.sops.secrets.${secretsSubPath}.path;
|
||||
shell = pkgs.zsh; # default shell
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
];
|
||||
users.users.exampleSecondUser = {
|
||||
isNormalUser = true;
|
||||
hashedPasswordFile = config.sops.secrets.${secretsSubPath}.path;
|
||||
shell = pkgs.zsh; # default shell
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
];
|
||||
|
||||
packages = [ pkgs.home-manager ];
|
||||
};
|
||||
}
|
||||
# Import this user's personal/home configurations
|
||||
// lib.optionalAttrs (inputs ? "home-manager") {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs;
|
||||
hostSpec = config.hostSpec;
|
||||
packages = [pkgs.home-manager];
|
||||
};
|
||||
users.exampleSecondUser.imports = lib.flatten (
|
||||
lib.optional (!hostSpec.isMinimal) [
|
||||
(
|
||||
{ config, ... }:
|
||||
import (lib.custom.relativeToRoot "home/exampleSecondUser/${hostSpec.hostName}.nix") {
|
||||
inherit
|
||||
pkgs
|
||||
inputs
|
||||
config
|
||||
lib
|
||||
hostSpec
|
||||
;
|
||||
}
|
||||
)
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
# Import this user's personal/home configurations
|
||||
// lib.optionalAttrs (inputs ? "home-manager") {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs;
|
||||
hostSpec = config.hostSpec;
|
||||
};
|
||||
users.exampleSecondUser.imports = lib.flatten (
|
||||
lib.optional (!hostSpec.isMinimal) [
|
||||
(
|
||||
{config, ...}:
|
||||
import (lib.custom.relativeToRoot "home/exampleSecondUser/${hostSpec.hostName}.nix") {
|
||||
inherit
|
||||
pkgs
|
||||
inputs
|
||||
config
|
||||
lib
|
||||
hostSpec
|
||||
;
|
||||
}
|
||||
)
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
"hosts/common/optional/services/docker.nix"
|
||||
"hosts/common/optional/services/tailscale.nix"
|
||||
"hosts/common/optional/audio.nix" # pipewire and cli controls
|
||||
"hosts/common/optional/kde.nix"
|
||||
"hosts/common/optional/sddm.nix"
|
||||
"hosts/common/optional/hyprland.nix"
|
||||
"hosts/common/optional/greetd.nix"
|
||||
"hosts/common/optional/flatpak.nix"
|
||||
"hosts/common/optional/thermal-management.nix"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user