feat: extract tuigreet and workstation modules
This commit is contained in:
@@ -21,6 +21,8 @@ in
|
|||||||
inputs.self.nixosModules.printing
|
inputs.self.nixosModules.printing
|
||||||
inputs.self.nixosModules.zsh
|
inputs.self.nixosModules.zsh
|
||||||
inputs.self.nixosModules.gnupg
|
inputs.self.nixosModules.gnupg
|
||||||
|
inputs.self.nixosModules.tuigreet
|
||||||
|
inputs.self.nixosModules.workstation
|
||||||
];
|
];
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
@@ -30,6 +32,11 @@ in
|
|||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
gnupg.enable = true;
|
gnupg.enable = true;
|
||||||
|
workstation.enable = true;
|
||||||
|
tuigreet = {
|
||||||
|
enable = true;
|
||||||
|
command = "sway";
|
||||||
|
};
|
||||||
|
|
||||||
sway = {
|
sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -53,12 +60,6 @@ in
|
|||||||
environment.variables.TZ = "America/New_York";
|
environment.variables.TZ = "America/New_York";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
# Docker
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
logDriver = "json-file";
|
|
||||||
};
|
|
||||||
|
|
||||||
# nix-ld for pip-installed binaries
|
# nix-ld for pip-installed binaries
|
||||||
# WARN:(matej) probably want to drop this in the future
|
# WARN:(matej) probably want to drop this in the future
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
@@ -70,21 +71,6 @@ in
|
|||||||
|
|
||||||
# Services
|
# Services
|
||||||
services.teamviewer.enable = true;
|
services.teamviewer.enable = true;
|
||||||
services.tailscale = {
|
|
||||||
enable = true;
|
|
||||||
useRoutingFeatures = "both";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Greetd
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd sway";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
programs.thunderbird.enable = true;
|
programs.thunderbird.enable = true;
|
||||||
@@ -102,11 +88,6 @@ in
|
|||||||
hardware.keyboard.zsa.enable = true;
|
hardware.keyboard.zsa.enable = true;
|
||||||
hardware.ledger.enable = true;
|
hardware.ledger.enable = true;
|
||||||
|
|
||||||
# System packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
smartmontools
|
|
||||||
];
|
|
||||||
|
|
||||||
# XDG
|
# XDG
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
networking.hostName = "matej-tower";
|
||||||
imports = [
|
imports = [
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
inputs.self.nixosModules.yubikey
|
inputs.self.nixosModules.yubikey
|
||||||
inputs.self.nixosModules.sway
|
inputs.self.nixosModules.sway
|
||||||
inputs.self.nixosModules.openssh
|
inputs.self.nixosModules.openssh
|
||||||
@@ -18,6 +20,8 @@
|
|||||||
inputs.self.nixosModules.printing
|
inputs.self.nixosModules.printing
|
||||||
inputs.self.nixosModules.zsh
|
inputs.self.nixosModules.zsh
|
||||||
inputs.self.nixosModules.gnupg
|
inputs.self.nixosModules.gnupg
|
||||||
|
inputs.self.nixosModules.tuigreet
|
||||||
|
inputs.self.nixosModules.workstation
|
||||||
];
|
];
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
@@ -27,6 +31,11 @@
|
|||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
gnupg.enable = true;
|
gnupg.enable = true;
|
||||||
|
workstation.enable = true;
|
||||||
|
tuigreet = {
|
||||||
|
enable = true;
|
||||||
|
command = "sway";
|
||||||
|
};
|
||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
|
|
||||||
# Stylix theming
|
# Stylix theming
|
||||||
@@ -49,30 +58,9 @@
|
|||||||
time.timeZone = "Europe/Ljubljana";
|
time.timeZone = "Europe/Ljubljana";
|
||||||
environment.variables.TZ = "Europe/Ljubljana";
|
environment.variables.TZ = "Europe/Ljubljana";
|
||||||
|
|
||||||
# Docker
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
logDriver = "json-file";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
services.tailscale = {
|
|
||||||
enable = true;
|
|
||||||
useRoutingFeatures = "both";
|
|
||||||
};
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
# Greetd
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd sway";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
programs._1password-gui.enable = true;
|
programs._1password-gui.enable = true;
|
||||||
@@ -87,7 +75,6 @@
|
|||||||
|
|
||||||
# System packages
|
# System packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
smartmontools
|
|
||||||
easyeffects
|
easyeffects
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
39
modules/nixos/tuigreet.nix
Normal file
39
modules/nixos/tuigreet.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.tuigreet;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
tuigreet = {
|
||||||
|
enable = lib.mkEnableOption "greetd with tuigreet";
|
||||||
|
|
||||||
|
command = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Session command to launch";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
useTextGreeter = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = builtins.toString (
|
||||||
|
pkgs.writeShellScript "tuigreet-session" ''
|
||||||
|
${pkgs.util-linux}/bin/setterm --blank 1 --powersave powerdown --powerdown 1
|
||||||
|
exec ${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd ${cfg.command}
|
||||||
|
''
|
||||||
|
);
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/nixos/workstation.nix
Normal file
32
modules/nixos/workstation.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.workstation;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
workstation = {
|
||||||
|
enable = lib.mkEnableOption "workstation utilities";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
logDriver = "json-file";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
useRoutingFeatures = "both";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
smartmontools
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user