mirror of
https://github.com/nmasur/dotfiles
synced 2025-02-07 11:02:04 +00:00
more updates
This commit is contained in:
parent
bb1a36330b
commit
620c72f731
@ -37,40 +37,22 @@
|
|||||||
description = "Path to existing private key file.";
|
description = "Path to existing private key file.";
|
||||||
default = "/etc/ssh/ssh_host_ed25519_key";
|
default = "/etc/ssh/ssh_host_ed25519_key";
|
||||||
};
|
};
|
||||||
gui = {
|
# homePath = lib.mkOption {
|
||||||
enable = lib.mkEnableOption {
|
# type = lib.types.path;
|
||||||
description = "Enable graphics.";
|
# description = "Path of user's home directory.";
|
||||||
default = false;
|
# default = builtins.toPath (
|
||||||
};
|
# if pkgs.stdenv.isDarwin then "/Users/${config.user}" else "/home/${config.user}"
|
||||||
};
|
# );
|
||||||
theme = {
|
# };
|
||||||
colors = lib.mkOption {
|
# dotfilesPath = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
# type = lib.types.path;
|
||||||
description = "Base16 color scheme.";
|
# description = "Path of dotfiles repository.";
|
||||||
default = (import ../colorscheme/gruvbox).dark;
|
# default = config.homePath + "/dev/personal/dotfiles";
|
||||||
};
|
# };
|
||||||
dark = lib.mkOption {
|
# dotfilesRepo = lib.mkOption {
|
||||||
type = lib.types.bool;
|
# type = lib.types.str;
|
||||||
description = "Enable dark mode.";
|
# description = "Link to dotfiles repository HTTPS URL.";
|
||||||
default = true;
|
# };
|
||||||
};
|
|
||||||
};
|
|
||||||
homePath = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Path of user's home directory.";
|
|
||||||
default = builtins.toPath (
|
|
||||||
if pkgs.stdenv.isDarwin then "/Users/${config.user}" else "/home/${config.user}"
|
|
||||||
);
|
|
||||||
};
|
|
||||||
dotfilesPath = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Path of dotfiles repository.";
|
|
||||||
default = config.homePath + "/dev/personal/dotfiles";
|
|
||||||
};
|
|
||||||
dotfilesRepo = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Link to dotfiles repository HTTPS URL.";
|
|
||||||
};
|
|
||||||
unfreePackages = lib.mkOption {
|
unfreePackages = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = "List of unfree packages to allow.";
|
description = "List of unfree packages to allow.";
|
||||||
@ -81,88 +63,88 @@
|
|||||||
description = "List of insecure packages to allow.";
|
description = "List of insecure packages to allow.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
hostnames = {
|
# hostnames = {
|
||||||
audiobooks = lib.mkOption {
|
# audiobooks = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for audiobook server (Audiobookshelf).";
|
# description = "Hostname for audiobook server (Audiobookshelf).";
|
||||||
};
|
# };
|
||||||
budget = lib.mkOption {
|
# budget = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for budgeting server (ActualBudget).";
|
# description = "Hostname for budgeting server (ActualBudget).";
|
||||||
};
|
# };
|
||||||
files = lib.mkOption {
|
# files = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for files server (Filebrowser).";
|
# description = "Hostname for files server (Filebrowser).";
|
||||||
};
|
# };
|
||||||
git = lib.mkOption {
|
# git = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for git server (Gitea).";
|
# description = "Hostname for git server (Gitea).";
|
||||||
};
|
# };
|
||||||
metrics = lib.mkOption {
|
# metrics = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for metrics server.";
|
# description = "Hostname for metrics server.";
|
||||||
};
|
# };
|
||||||
minecraft = lib.mkOption {
|
# minecraft = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for Minecraft server.";
|
# description = "Hostname for Minecraft server.";
|
||||||
};
|
# };
|
||||||
paperless = lib.mkOption {
|
# paperless = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for document server (paperless-ngx).";
|
# description = "Hostname for document server (paperless-ngx).";
|
||||||
};
|
# };
|
||||||
photos = lib.mkOption {
|
# photos = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for photo management (Immich).";
|
# description = "Hostname for photo management (Immich).";
|
||||||
};
|
# };
|
||||||
prometheus = lib.mkOption {
|
# prometheus = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for Prometheus server.";
|
# description = "Hostname for Prometheus server.";
|
||||||
};
|
# };
|
||||||
influxdb = lib.mkOption {
|
# influxdb = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for InfluxDB2 server.";
|
# description = "Hostname for InfluxDB2 server.";
|
||||||
};
|
# };
|
||||||
secrets = lib.mkOption {
|
# secrets = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for passwords and secrets (Vaultwarden).";
|
# description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||||
};
|
# };
|
||||||
stream = lib.mkOption {
|
# stream = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for video/media library (Jellyfin).";
|
# description = "Hostname for video/media library (Jellyfin).";
|
||||||
};
|
# };
|
||||||
content = lib.mkOption {
|
# content = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for personal content system (Nextcloud).";
|
# description = "Hostname for personal content system (Nextcloud).";
|
||||||
};
|
# };
|
||||||
books = lib.mkOption {
|
# books = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for books library (Calibre-Web).";
|
# description = "Hostname for books library (Calibre-Web).";
|
||||||
};
|
# };
|
||||||
download = lib.mkOption {
|
# download = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for download services.";
|
# description = "Hostname for download services.";
|
||||||
};
|
# };
|
||||||
irc = lib.mkOption {
|
# irc = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for IRC services.";
|
# description = "Hostname for IRC services.";
|
||||||
};
|
# };
|
||||||
n8n = lib.mkOption {
|
# n8n = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for n8n automation.";
|
# description = "Hostname for n8n automation.";
|
||||||
};
|
# };
|
||||||
notifications = lib.mkOption {
|
# notifications = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for push notification services (ntfy).";
|
# description = "Hostname for push notification services (ntfy).";
|
||||||
};
|
# };
|
||||||
status = lib.mkOption {
|
# status = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for status page (Uptime-Kuma).";
|
# description = "Hostname for status page (Uptime-Kuma).";
|
||||||
};
|
# };
|
||||||
transmission = lib.mkOption {
|
# transmission = lib.mkOption {
|
||||||
type = lib.types.str;
|
# type = lib.types.str;
|
||||||
description = "Hostname for peer2peer downloads (Transmission).";
|
# description = "Hostname for peer2peer downloads (Transmission).";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config =
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
_final: prev:
|
_final: prev:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
listToAttrsByField =
|
||||||
|
field: list:
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map (v: {
|
||||||
|
name = v.${field};
|
||||||
|
value = v;
|
||||||
|
}) list
|
||||||
|
);
|
||||||
lib = prev.lib;
|
lib = prev.lib;
|
||||||
packages = lib.pipe [
|
packagesDirectory = lib.filesystem.listFilesRecursive ../pkgs;
|
||||||
(lib.filesystem.listFilesRecursive ../pkgs)
|
packages = lib.pipe packagesDirectory [
|
||||||
|
# Get only files called package.nix
|
||||||
(builtins.filter (name: (lib.hasSuffix "package.nix" name)))
|
(builtins.filter (name: (lib.hasSuffix "package.nix" name)))
|
||||||
(builtins.map (package: prev.callPackage package))
|
# Apply callPackage to create a derivation
|
||||||
|
(builtins.map prev.callPackage)
|
||||||
|
# Convert the list to an attrset
|
||||||
|
(listToAttrsByField "name")
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
packages
|
||||||
|
|
||||||
loadkey = prev.callPackage ../pkgs/tools/misc/loadkey.nix { };
|
|
||||||
aws-ec2 = prev.callPackage ../pkgs/tools/misc/aws-ec2 { };
|
|
||||||
docker-cleanup = prev.callPackage ../pkgs/tools/misc/docker-cleanup { };
|
|
||||||
nmasur-neovim = prev.callPackage ../pkgs/applications/editors/neovim/nmasur/neovim { };
|
|
||||||
}
|
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
neovim = import ./package {
|
|
||||||
inherit pkgs;
|
|
||||||
colors = config.theme.colors;
|
|
||||||
terraform = config.terraform.enable;
|
|
||||||
github = true;
|
|
||||||
kubernetes = config.kubernetes.enable;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
options.neovim.enable = lib.mkEnableOption "Neovim.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.neovim.enable {
|
|
||||||
home-manager.users.${config.user} =
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
home.packages = [ neovim ];
|
|
||||||
|
|
||||||
# Use Neovim as the editor for git commit messages
|
|
||||||
programs.git.extraConfig.core.editor = "nvim";
|
|
||||||
programs.jujutsu.settings.ui.editor = "nvim";
|
|
||||||
|
|
||||||
# Set Neovim as the default app for text editing and manual pages
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
MANPAGER = "nvim +Man!";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create quick aliases for launching Neovim
|
|
||||||
programs.fish = {
|
|
||||||
shellAliases = {
|
|
||||||
vim = "nvim";
|
|
||||||
};
|
|
||||||
shellAbbrs = {
|
|
||||||
v = lib.mkForce "nvim";
|
|
||||||
vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
|
|
||||||
vll = "nvim -c 'Telescope oldfiles'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create a desktop option for launching Neovim from a file manager
|
|
||||||
# (Requires launching the terminal and then executing Neovim)
|
|
||||||
xdg.desktopEntries.nvim = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
|
|
||||||
name = "Neovim wrapper";
|
|
||||||
exec = "${config.home-manager.users.${config.user}.programs.rofi.terminal} nvim %F";
|
|
||||||
mimeType = [
|
|
||||||
"text/plain"
|
|
||||||
"text/markdown"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
"text/plain" = [ "nvim.desktop" ];
|
|
||||||
"text/markdown" = [ "nvim.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
55
platforms/home-manager/modules/nmasur/presets/gtk.nix
Normal file
55
platforms/home-manager/modules/nmasur/presets/gtk.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.gtk;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.gtk = {
|
||||||
|
enable = lib.mkEnableOption "Gnome GTK settings";
|
||||||
|
theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Adwaita-dark";
|
||||||
|
};
|
||||||
|
package = lib.mkPackageOption pkgs "gnome-themes-extra" { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Cursor
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.adwaita-icon-theme;
|
||||||
|
size = 24;
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable num lock on login
|
||||||
|
xsession.numlock.enable = true;
|
||||||
|
|
||||||
|
# Dark theme
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = cfg.theme.name;
|
||||||
|
package = cfg.theme.package;
|
||||||
|
};
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = config.theme.mode == "dark";
|
||||||
|
};
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = config.theme.mode == "dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -22,12 +22,13 @@ in
|
|||||||
path = lib.mkOption {
|
path = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Path to dotfiles on disk";
|
description = "Path to dotfiles on disk";
|
||||||
default = config.homePath + "/dev/personal/dotfiles";
|
default = config.home.homeDirectory + "/dev/personal/dotfiles";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
# Always make the dotfiles directory considered safe for git and direnv
|
||||||
programs.git.extraConfig.safe.directory = cfg.path;
|
programs.git.extraConfig.safe.directory = cfg.path;
|
||||||
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
||||||
|
|
||||||
@ -37,8 +38,7 @@ in
|
|||||||
cloneDotfiles = config.lib.dag.entryAfter [ "writeBoundary" "loadkey" ] ''
|
cloneDotfiles = config.lib.dag.entryAfter [ "writeBoundary" "loadkey" ] ''
|
||||||
if [ ! -d "${cfg.path}" ]; then
|
if [ ! -d "${cfg.path}" ]; then
|
||||||
run mkdir --parents $VERBOSE_ARG $(dirname "${cfg.path}")
|
run mkdir --parents $VERBOSE_ARG $(dirname "${cfg.path}")
|
||||||
run ${pkgs.git}/bin/git \
|
run ${lib.getExe pkgs.git} clone ${cfg.repo} "${cfg.path}"
|
||||||
clone ${cfg.repo} "${cfg.path}"
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,7 @@ in
|
|||||||
"extensions.pocket.enabled" = false;
|
"extensions.pocket.enabled" = false;
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Allow userChrome.css
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Allow userChrome.css
|
||||||
"layout.css.color-mix.enabled" = true;
|
"layout.css.color-mix.enabled" = true;
|
||||||
"ui.systemUsesDarkTheme" = if config.theme.dark == true then 1 else 0;
|
"ui.systemUsesDarkTheme" = if config.theme.mode == "dark" then 1 else 0;
|
||||||
"media.ffmpeg.vaapi.enabled" = true; # Enable hardware video acceleration
|
"media.ffmpeg.vaapi.enabled" = true; # Enable hardware video acceleration
|
||||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||||
"devtools.command-button-screenshot.enabled" = true; # Scrolling screenshot of entire page
|
"devtools.command-button-screenshot.enabled" = true; # Scrolling screenshot of entire page
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.presets.programs.msmtp;
|
cfg = config.nmasur.presets.programs.msmtp-system;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
options.nmasur.presets.programs.msmtp.enable = lib.mkEnableOption "System outgoing mail";
|
options.nmasur.presets.programs.msmtp-system.enable = lib.mkEnableOption "System outgoing mail";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
@ -13,13 +13,16 @@ in
|
|||||||
|
|
||||||
options.nmasur.presets.programs.nixpkgs-darwin.enable = lib.mkEnableOption {
|
options.nmasur.presets.programs.nixpkgs-darwin.enable = lib.mkEnableOption {
|
||||||
description = "Nixpkgs tools for macOS";
|
description = "Nixpkgs tools for macOS";
|
||||||
default = config.nmasur.presets.programs.nixpkgs && pkgs.stdenv.isDarwin;
|
default =
|
||||||
|
config.nmasur.presets.programs.nixpkgs.enable
|
||||||
|
&& pkgs.stdenv.isDarwin
|
||||||
|
&& config.nmasur.presets.programs.dotfiles.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (cfg.enable) {
|
config = lib.mkIf (cfg.enable) {
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
shellAbbrs = {
|
shellAbbrs = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
nr = {
|
nr = {
|
||||||
function = lib.mkForce "rebuild-darwin";
|
function = lib.mkForce "rebuild-darwin";
|
||||||
};
|
};
|
||||||
@ -27,23 +30,23 @@ in
|
|||||||
function = lib.mkForce "rebuild-darwin-offline";
|
function = lib.mkForce "rebuild-darwin-offline";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
functions = {
|
functions = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
rebuild-darwin = {
|
rebuild-darwin = {
|
||||||
body = ''
|
body = ''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "darwin-rebuild switch --flake ${config.dotfilesPath}#lookingglass"
|
echo "darwin-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}#lookingglass"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-darwin-offline = {
|
rebuild-darwin-offline = {
|
||||||
body = ''
|
body = ''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "darwin-rebuild switch --option substitute false --flake ${config.dotfilesPath}#lookingglass"
|
echo "darwin-rebuild switch --option substitute false --flake ${config.nmasur.presets.programs.dotfiles.path}#lookingglass"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-home = lib.mkForce {
|
rebuild-home = lib.mkForce {
|
||||||
body = ''
|
body = ''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
|
echo "${lib.getExe pkgs.home-manager} switch --flake ${config.nmasur.presets.programs.dotfiles.path}#lookingglass";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -24,13 +24,13 @@ in
|
|||||||
nps = "nix repl --expr 'import <nixpkgs>{}'";
|
nps = "nix repl --expr 'import <nixpkgs>{}'";
|
||||||
nixo = "man configuration.nix";
|
nixo = "man configuration.nix";
|
||||||
nixh = "man home-configuration.nix";
|
nixh = "man home-configuration.nix";
|
||||||
nr = {
|
nr = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
function = "rebuild-nixos";
|
function = "rebuild-nixos";
|
||||||
};
|
};
|
||||||
nro = {
|
nro = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
function = "rebuild-nixos-offline";
|
function = "rebuild-nixos-offline";
|
||||||
};
|
};
|
||||||
hm = {
|
hm = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
function = "rebuild-home";
|
function = "rebuild-home";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -56,25 +56,25 @@ in
|
|||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-nixos = {
|
rebuild-nixos = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
body = # fish
|
body = # fish
|
||||||
''
|
''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName}"
|
echo "doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-nixos-offline = {
|
rebuild-nixos-offline = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
body = # fish
|
body = # fish
|
||||||
''
|
''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "doas nixos-rebuild switch --option substitute false --flake ${config.dotfilesPath}#${config.networking.hostName}"
|
echo "doas nixos-rebuild switch --option substitute false --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-home = {
|
rebuild-home = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||||
body = # fish
|
body = # fish
|
||||||
''
|
''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||||
echo "${lib.getExe pkgs.home-manager} switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
|
echo "${lib.getExe pkgs.home-manager} switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -99,7 +99,7 @@ in
|
|||||||
# Create nix-index if doesn't exist
|
# Create nix-index if doesn't exist
|
||||||
home.activation.createNixIndex =
|
home.activation.createNixIndex =
|
||||||
let
|
let
|
||||||
cacheDir = "${config.homePath}/.cache/nix-index";
|
cacheDir = "${config.xdg.cacheHome}/nix-index";
|
||||||
in
|
in
|
||||||
lib.mkIf config.programs.nix-index.enable (
|
lib.mkIf config.programs.nix-index.enable (
|
||||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
@ -141,10 +141,12 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
# Add community Cachix to binary cache
|
# Add community Cachix to binary cache
|
||||||
# Don't use with macOS because blocked by corporate firewall
|
# Don't use at work because blocked by corporate firewall
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
substituters = lib.mkIf (!pkgs.stdenv.isDarwin) [ "https://nix-community.cachix.org" ];
|
substituters = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||||
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ in
|
|||||||
path = lib.mkOption {
|
path = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Path to notes on disk";
|
description = "Path to notes on disk";
|
||||||
default = config.homePath + "/dev/personal/notes";
|
default = config.home.homeDirectory + "/dev/personal/notes";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.programs.notmuch;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.programs.notmuch.enable = lib.mkEnableOption "Notmuch mail indexing";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Better local mail search
|
||||||
|
programs.notmuch = {
|
||||||
|
enable = true;
|
||||||
|
new.ignore = [
|
||||||
|
".mbsyncstate.lock"
|
||||||
|
".mbsyncstate.journal"
|
||||||
|
".mbsyncstate.new"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -202,9 +202,9 @@ in
|
|||||||
''exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
''exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
||||||
"${modifier}+Shift+x" = lib.mkIf cfg.commands.lockScreen != null "exec ${cfg.commands.lockScreen}";
|
"${modifier}+Shift+x" = lib.mkIf cfg.commands.lockScreen != null "exec ${cfg.commands.lockScreen}";
|
||||||
"${modifier}+Mod1+h" =
|
"${modifier}+Mod1+h" =
|
||||||
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName} || read'";
|
||||||
"${modifier}+Mod1+r" =
|
"${modifier}+Mod1+r" =
|
||||||
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c 'doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName} || read'";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
@ -322,7 +322,7 @@ in
|
|||||||
# Update lock screen cache only if cache is empty
|
# Update lock screen cache only if cache is empty
|
||||||
home.activation.updateLockScreenCache =
|
home.activation.updateLockScreenCache =
|
||||||
let
|
let
|
||||||
cacheDir = "${config.homePath}/.cache/betterlockscreen/current";
|
cacheDir = "${config.xdg.cacheHome}/betterlockscreen/current";
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.commands.updateLockScreen != null (
|
lib.mkIf cfg.commands.updateLockScreen != null (
|
||||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
@ -0,0 +1,123 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
options = {
|
||||||
|
mail.enable = lib.mkEnableOption "Mail service.";
|
||||||
|
mail.user = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "User name for the email address.";
|
||||||
|
default = config.user;
|
||||||
|
};
|
||||||
|
mail.server = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Server name for the email address.";
|
||||||
|
};
|
||||||
|
mail.imapHost = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Server host for IMAP (reading mail).";
|
||||||
|
};
|
||||||
|
mail.smtpHost = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Server host for SMTP (sending mail).";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.mail.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
programs.mbsync = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Automatically check for mail and keep files synced locally
|
||||||
|
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
enable = true;
|
||||||
|
frequency = "*:0/5";
|
||||||
|
postExec = "${lib.getExe pkgs.notmuch} new";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Used to watch for new mail and trigger sync
|
||||||
|
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
||||||
|
|
||||||
|
# Allows sending email from CLI/sendmail
|
||||||
|
programs.msmtp.enable = true;
|
||||||
|
|
||||||
|
accounts.email = {
|
||||||
|
|
||||||
|
# Where email files are stored
|
||||||
|
maildirBasePath = "${config.home.homeDirectory}/mail";
|
||||||
|
|
||||||
|
accounts = {
|
||||||
|
home =
|
||||||
|
let
|
||||||
|
address = "${config.mail.user}@${config.mail.server}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
userName = address;
|
||||||
|
realName = config.fullName;
|
||||||
|
primary = true;
|
||||||
|
inherit address;
|
||||||
|
aliases = map (user: "${user}@${config.mail.server}") [
|
||||||
|
"me"
|
||||||
|
"hey"
|
||||||
|
"admin"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Options for contact completion
|
||||||
|
alot = { };
|
||||||
|
|
||||||
|
imap = {
|
||||||
|
host = config.mail.imapHost;
|
||||||
|
port = 993;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Watch for mail and run notifications or sync
|
||||||
|
imapnotify = {
|
||||||
|
enable = true;
|
||||||
|
boxes = [ "Inbox" ];
|
||||||
|
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
||||||
|
onNotifyPost =
|
||||||
|
lib.mkIf config.home-manager.users.${config.user}.services.dunst.enable
|
||||||
|
"${lib.getExe pkgs.libnotify} 'New mail arrived'";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Name of the directory in maildir for this account
|
||||||
|
maildir = {
|
||||||
|
path = "main";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Bi-directional syncing options for local files
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
expunge = "both";
|
||||||
|
remove = "both";
|
||||||
|
patterns = [ "*" ];
|
||||||
|
extraConfig.channel = {
|
||||||
|
CopyArrivalDate = "yes"; # Sync time of original message
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable indexing
|
||||||
|
notmuch.enable = true;
|
||||||
|
|
||||||
|
# Used to login and send and receive emails
|
||||||
|
passwordCommand = "${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "mailpass.age" (builtins.readFile ../../../private/mailpass.age)}";
|
||||||
|
|
||||||
|
smtp = {
|
||||||
|
host = config.mail.smtpHost;
|
||||||
|
port = 465;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -15,35 +14,7 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Cursor
|
nmasur.gtk.enable = lib.mkDefault true;
|
||||||
home.pointerCursor = {
|
|
||||||
name = lib.mkDefault "Adwaita";
|
|
||||||
package = lib.mkDefault pkgs.adwaita-icon-theme;
|
|
||||||
size = lib.mkDefault 24;
|
|
||||||
gtk.enable = lib.mkDefault true;
|
|
||||||
x11.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable num lock on login
|
|
||||||
xsession.numlock.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
# Dark theme
|
|
||||||
gtk =
|
|
||||||
let
|
|
||||||
gtkExtraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = lib.mkDefault config.theme.dark;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
theme = {
|
|
||||||
name = lib.mkDefault config.gtk.theme.name;
|
|
||||||
package = lib.mkDefault config.gtk.theme.package;
|
|
||||||
};
|
|
||||||
gtk3.extraConfig = lib.mkDefault gtkExtraConfig;
|
|
||||||
gtk4.extraConfig = lib.mkDefault gtkExtraConfig;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zed-editor.enable = lib.mkDefault true;
|
programs.zed-editor.enable = lib.mkDefault true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.profiles.common;
|
cfg = config.nmasur.profiles.power-user;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.nmasur.profiles.common.enable = lib.mkEnableOption "Extra home-manager config";
|
options.nmasur.profiles.power-user.enable = lib.mkEnableOption "power user home-manager config";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = lib.mkDefault [
|
home.packages = lib.mkDefault [
|
26
platforms/home-manager/theme.nix
Normal file
26
platforms/home-manager/theme.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Color palette name (fallback when individual colors aren't specified)";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
colors = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
description = "Base16 color scheme.";
|
||||||
|
default = (import ../colorscheme/gruvbox).dark;
|
||||||
|
};
|
||||||
|
mode = lib.mkOption {
|
||||||
|
type = lib.types.enum [
|
||||||
|
"light"
|
||||||
|
"dark"
|
||||||
|
];
|
||||||
|
description = "Light or dark mode";
|
||||||
|
default = "dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -18,7 +18,9 @@ in
|
|||||||
homebrew.casks = [ "hammerspoon" ];
|
homebrew.casks = [ "hammerspoon" ];
|
||||||
|
|
||||||
system.activationScripts.postUserActivation.text = ''
|
system.activationScripts.postUserActivation.text = ''
|
||||||
defaults write org.hammerspoon.Hammerspoon MJConfigFile "${config.homePath}/.config/hammerspoon/init.lua"
|
defaults write org.hammerspoon.Hammerspoon MJConfigFile "${
|
||||||
|
config.home-manager.users.${config.user}.xdg.configHome
|
||||||
|
}/hammerspoon/init.lua"
|
||||||
sudo killall Dock
|
sudo killall Dock
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
users.users."${config.user}" = {
|
users.users."${config.user}" = {
|
||||||
# macOS user
|
# macOS user
|
||||||
home = config.homePath;
|
home = config.home-manager.users.${config.user}.home.homeDirectory;
|
||||||
uid = 502;
|
uid = 502;
|
||||||
# shell = pkgs.fish; # Default shell
|
# shell = pkgs.fish; # Default shell
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -16,6 +17,13 @@ in
|
|||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Wallpaper background image file";
|
description = "Wallpaper background image file";
|
||||||
};
|
};
|
||||||
|
gtk.theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Adwaita-dark";
|
||||||
|
};
|
||||||
|
package = lib.mkPackageOption pkgs "gnome-themes-extra" { };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
@ -34,6 +42,13 @@ in
|
|||||||
extraSeatDefaults = ''
|
extraSeatDefaults = ''
|
||||||
greeter-hide-users = false
|
greeter-hide-users = false
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Make the login screen dark
|
||||||
|
greeters.gtk.theme = {
|
||||||
|
name = cfg.gtk.theme.name;
|
||||||
|
package = cfg.gtk.theme.package;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,14 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
options.nmasur.presets.services.nix-autoupgrade.enable = lib.mkEnableOption "Nix auto upgrade";
|
options.nmasur.presets.services.nix-autoupgrade = {
|
||||||
|
enable = lib.mkEnableOption "Nix auto upgrade";
|
||||||
|
repo = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
description = "Git URL of the flake repository to use for upgrades";
|
||||||
|
default = "git@github.com:nmasur/dotfiles";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
@ -19,7 +26,7 @@ in
|
|||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "09:33";
|
dates = "09:33";
|
||||||
flake = "git+${config.dotfilesRepo}";
|
flake = "git+${cfg.repo}";
|
||||||
randomizedDelaySec = "25min";
|
randomizedDelaySec = "25min";
|
||||||
operation = "switch";
|
operation = "switch";
|
||||||
allowReboot = true;
|
allowReboot = true;
|
||||||
@ -46,8 +53,8 @@ in
|
|||||||
set +e
|
set +e
|
||||||
systemctl status $SERVICE_ID >> $TEMPFILE
|
systemctl status $SERVICE_ID >> $TEMPFILE
|
||||||
set -e
|
set -e
|
||||||
${pkgs.msmtp}/bin/msmtp \
|
${lib.getExe pkgs.msmtp} \
|
||||||
--file=${config.homePath}/.config/msmtp/config \
|
--file=${config.home-manager.users.${config.user}.xdg.configDir}/msmtp/config \
|
||||||
--account=system \
|
--account=system \
|
||||||
${address} < $TEMPFILE
|
${address} < $TEMPFILE
|
||||||
'';
|
'';
|
||||||
|
@ -25,9 +25,9 @@ in
|
|||||||
Unit.Description = "Get latest notes.";
|
Unit.Description = "Get latest notes.";
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStartPre = "${pkgs.git}/bin/git -C /data/git/notes reset --hard master";
|
ExecStartPre = "${lib.getExe pkgs.git} -C /data/git/notes reset --hard master";
|
||||||
ExecStart = "${pkgs.git}/bin/git -C /data/git/notes pull";
|
ExecStart = "${lib.getExe pkgs.git} -C /data/git/notes pull";
|
||||||
WorkingDirectory = config.homePath;
|
WorkingDirectory = config.home-manager.users.${config.user}.home.homeDirectory;
|
||||||
Environment = "PATH=${pkgs.openssh}/bin";
|
Environment = "PATH=${pkgs.openssh}/bin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -82,15 +82,10 @@ in
|
|||||||
services.dbus.packages = [ pkgs.dconf ];
|
services.dbus.packages = [ pkgs.dconf ];
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
# Make the login screen dark
|
# TODO: can we get rid of this?
|
||||||
services.xserver.displayManager.lightdm.greeters.gtk.theme = {
|
# environment.sessionVariables = {
|
||||||
name = config.gtk.theme.name;
|
# GTK_THEME = config.gtk.theme.name;
|
||||||
package = config.gtk.theme.package;
|
# };
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
GTK_THEME = config.gtk.theme.name;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.betterlockscreen;
|
cfg = config.services.betterlockscreen;
|
||||||
lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen --lock --display 1 --blur 0.5 --span";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -29,7 +28,7 @@ in
|
|||||||
Type = "simple";
|
Type = "simple";
|
||||||
Environment = "DISPLAY=:0";
|
Environment = "DISPLAY=:0";
|
||||||
TimeoutSec = "infinity";
|
TimeoutSec = "infinity";
|
||||||
ExecStart = lockCmd;
|
ExecStart = "${lib.getExe pkgs.betterlockscreen} --lock --display 1 --blur 0.5 --span";
|
||||||
ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1";
|
ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1";
|
||||||
};
|
};
|
||||||
wantedBy = [
|
wantedBy = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user