Add syncthing base
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name}.systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
After = [ "network.target" "sound.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-mpris-proxy";
|
||||
runtimeInputs = with pkgs; [ bluez ];
|
||||
text = "exec mpris-proxy";
|
||||
});
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ brightnessctl ];
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
[
|
||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
||||
];
|
||||
};
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
{ user ? throw "user argument is required", gpu ? false }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs = {
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "matugen";
|
||||
theme_background = false;
|
||||
presets = "";
|
||||
vim_keys = true;
|
||||
shown_boxes = "cpu mem net proc gpu0 gpu1";
|
||||
update_ms = 1000;
|
||||
proc_tree = true;
|
||||
cpu_single_graph = true;
|
||||
disks_filter = "/ /nix /persist /cache";
|
||||
};
|
||||
};
|
||||
|
||||
matugen.settings.templates.btop = {
|
||||
input_path = ./theme.theme;
|
||||
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-btop";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill btop -SIGUSR2";
|
||||
})} &";
|
||||
};
|
||||
}
|
31
users/configs/console/bluetooth/default.nix
Normal file
31
users/configs/console/bluetooth/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name}.systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
After = [
|
||||
"network.target"
|
||||
"sound.target"
|
||||
];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-mpris-proxy";
|
||||
runtimeInputs = with pkgs; [ bluez ];
|
||||
text = "exec mpris-proxy";
|
||||
}
|
||||
);
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
7
users/configs/console/brightnessctl/default.nix
Normal file
7
users/configs/console/brightnessctl/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ brightnessctl ];
|
||||
}
|
19
users/configs/console/btop/default.nix
Normal file
19
users/configs/console/btop/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
presets = "";
|
||||
vim_keys = true;
|
||||
shown_boxes = "cpu mem net proc gpu0 gpu1";
|
||||
update_ms = 1000;
|
||||
proc_tree = true;
|
||||
cpu_single_graph = true;
|
||||
disks_filter = "/ /nix /persist /cache";
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -22,11 +29,13 @@ in
|
||||
};
|
||||
|
||||
hooks = {
|
||||
commit-msg = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "git-commit-msg-hook";
|
||||
runtimeInputs = with pkgs; [ git ];
|
||||
text = builtins.readFile ./commit-msg.sh;
|
||||
});
|
||||
commit-msg = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "git-commit-msg-hook";
|
||||
runtimeInputs = with pkgs; [ git ];
|
||||
text = builtins.readFile ./commit-msg.sh;
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
gpgPath = "${hmConfig.xdg.dataHome}/gnupg";
|
||||
@@ -20,25 +27,33 @@ in
|
||||
systemd.user = {
|
||||
services.gpg-agent-import =
|
||||
let
|
||||
init = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "import-gpg-keys";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils-full
|
||||
gnugrep
|
||||
gnupg
|
||||
];
|
||||
runtimeEnv = {
|
||||
GNUPGHOME = gpgPath;
|
||||
HOME = user.home;
|
||||
};
|
||||
text = builtins.readFile ./import-gpg-keys.sh;
|
||||
});
|
||||
init = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "import-gpg-keys";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
gnugrep
|
||||
gnupg
|
||||
];
|
||||
runtimeEnv = {
|
||||
GNUPGHOME = gpgPath;
|
||||
HOME = user.home;
|
||||
};
|
||||
text = builtins.readFile ./import-gpg-keys.sh;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
Description = "Auto-import GPG keys";
|
||||
Requires = [ "sops-nix.service" "gpg-agent.socket" ];
|
||||
After = [ "sops-nix.service" "gpg-agent.socket" ];
|
||||
Requires = [
|
||||
"sops-nix.service"
|
||||
"gpg-agent.socket"
|
||||
];
|
||||
After = [
|
||||
"sops-nix.service"
|
||||
"gpg-agent.socket"
|
||||
];
|
||||
};
|
||||
|
||||
Service = {
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs.neovim = {
|
13
users/configs/console/pipewire/default.nix
Normal file
13
users/configs/console/pipewire/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [
|
||||
wireplumber
|
||||
playerctl
|
||||
];
|
||||
services.playerctld.enable = true;
|
||||
};
|
||||
}
|
35
users/configs/console/syncthing/default.nix
Normal file
35
users/configs/console/syncthing/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22000 ];
|
||||
allowedUDPPorts = [
|
||||
21027
|
||||
22000
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
# openssl ecparam -name prime256v1 -genkey -noout -out key.pem
|
||||
"syncthing/key" = {
|
||||
owner = user.name;
|
||||
group = "users";
|
||||
};
|
||||
# openssl req -new -x509 -key key.pem -out cert.pem -days 3650
|
||||
"syncthing/cert" = {
|
||||
owner = user.name;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user.name}.services.syncthing = {
|
||||
enable = true;
|
||||
key = config.sops.secrets."syncthing/key".path;
|
||||
cert = config.sops.secrets."syncthing/cert".path;
|
||||
extraOptions = [ "-no-default-folder" ];
|
||||
|
||||
settings.options.urAccepted = -1;
|
||||
};
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { config, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
@@ -1,5 +1,7 @@
|
||||
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "ags-config";
|
||||
|
@@ -1,8 +1,16 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
agsConfig = (import ./config { inherit pkgs; });
|
||||
agsConfig = import ./config { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
@@ -23,7 +31,10 @@ in
|
||||
systemd.user = {
|
||||
targets.tray.Unit = {
|
||||
BindsTo = [ "ags.service" ];
|
||||
After = [ "graphical-session.target" "ags.service" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"ags.service"
|
||||
];
|
||||
};
|
||||
|
||||
services.ags = {
|
||||
@@ -37,20 +48,22 @@ in
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
|
||||
ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-ags";
|
||||
runtimeInputs = with pkgs; [
|
||||
inputs.ags.packages.${stdenv.hostPlatform.system}.default
|
||||
sassc
|
||||
hyprland
|
||||
nixos-icons
|
||||
rofi-wayland
|
||||
wl-clipboard
|
||||
cliphist
|
||||
libdbusmenu-gtk3
|
||||
];
|
||||
text = "exec ags";
|
||||
});
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-ags";
|
||||
runtimeInputs = with pkgs; [
|
||||
inputs.ags.packages.${stdenv.hostPlatform.system}.default
|
||||
sassc
|
||||
hyprland
|
||||
nixos-icons
|
||||
rofi-wayland
|
||||
wl-clipboard
|
||||
cliphist
|
||||
libdbusmenu-gtk3
|
||||
];
|
||||
text = "exec ags";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
|
14
users/configs/gui/brightnessctl/default.nix
Normal file
14
users/configs/gui/brightnessctl/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
[
|
||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
||||
];
|
||||
}
|
34
users/configs/gui/btop/default.nix
Normal file
34
users/configs/gui/btop/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs = {
|
||||
btop.settings.color_theme = "matugen";
|
||||
|
||||
matugen.settings.templates.btop = {
|
||||
input_path = ./theme.theme;
|
||||
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-btop";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill btop -SIGUSR2";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
services.cbatticon = {
|
@@ -1,12 +1,22 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ wl-clipboard cliphist ];
|
||||
packages = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/cliphist" ];
|
||||
};
|
||||
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
programs.firefox = {
|
||||
@@ -47,38 +49,59 @@
|
||||
"Wikipedia (en)".metaData.alias = "@w";
|
||||
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"Nix Options" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{ name = "type"; value = "options"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "options";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
|
||||
"Home Manager Options" = {
|
||||
urls = [{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@nh" ];
|
||||
@@ -88,9 +111,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, b, exec, ${lib.meta.getExe pkgs.firefox}"
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.bind = [ "$mod, b, exec, ${lib.meta.getExe pkgs.firefox}" ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".mozilla" ];
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -42,21 +49,25 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "theme-gtk";
|
||||
runtimeInputs = with pkgs; [ dconf ];
|
||||
text = ''
|
||||
MODE=$(cat "${hmConfig.theme.configDir}/mode")
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-gtk";
|
||||
runtimeInputs = with pkgs; [ dconf ];
|
||||
text = ''
|
||||
MODE=$(cat "${hmConfig.theme.configDir}/mode")
|
||||
|
||||
if [ "$MODE" = "light" ]; then
|
||||
GTK_THEME="adw-gtk3"
|
||||
else
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
fi
|
||||
if [ "$MODE" = "light" ]; then
|
||||
GTK_THEME="adw-gtk3"
|
||||
else
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
fi
|
||||
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
|
||||
'';
|
||||
})} &";
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
|
||||
'';
|
||||
}
|
||||
)
|
||||
} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -133,11 +140,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
runtimeInputs = with pkgs; [ hyprland ];
|
||||
text = "exec hyprctl reload";
|
||||
})} &";
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
runtimeInputs = with pkgs; [ hyprland ];
|
||||
text = "exec hyprctl reload";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
};
|
@@ -1,26 +1,38 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ hyprshot swappy ];
|
||||
packages = with pkgs; [
|
||||
hyprshot
|
||||
swappy
|
||||
];
|
||||
sessionVariables.HYPRSHOT_DIR = "${hmConfig.xdg.userDirs.pictures}/screenshots";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
hyprshot = lib.meta.getExe pkgs.hyprshot;
|
||||
date = "${pkgs.coreutils-full}/bin/date";
|
||||
date = "${pkgs.coreutils}/bin/date";
|
||||
filename = "\"$(${date} +'%Y-%m-%d-%H%M%S.png')\"";
|
||||
|
||||
swappyWrapper = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "swappy-wrapper";
|
||||
runtimeInputs = with pkgs; [ swappy ];
|
||||
text = "exec swappy -f \"$1\"";
|
||||
});
|
||||
swappyWrapper = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "swappy-wrapper";
|
||||
runtimeInputs = with pkgs; [ swappy ];
|
||||
text = "exec swappy -f \"$1\"";
|
||||
}
|
||||
);
|
||||
in
|
||||
[
|
||||
", Print, exec, ${hyprshot} -m output -m active -f ${filename}"
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -27,11 +34,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "reload-kitty";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill kitty -SIGUSR1";
|
||||
})} &";
|
||||
theme.extraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-kitty";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill kitty -SIGUSR1";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
|
||||
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/kitty" ];
|
||||
};
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -54,8 +61,8 @@ in
|
||||
blur = builtins.toString hmConfig.theme.blur;
|
||||
opacity = builtins.toString hmConfig.theme.opacity;
|
||||
opacity_hex = builtins.toString (percentageToHex hmConfig.theme.opacity);
|
||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * .75);
|
||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * .75));
|
||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * 0.75);
|
||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * 0.75));
|
||||
font_size = builtins.toString hmConfig.theme.font.size;
|
||||
font_sans_serif = builtins.head hmConfig.theme.font.sansSerif.names;
|
||||
font_sans_serif_all = builtins.concatStringsSep ", " hmConfig.theme.font.sansSerif.names;
|
||||
@@ -72,15 +79,19 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkBefore (lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "theme-matugen";
|
||||
runtimeInputs = with pkgs; [ matugen ];
|
||||
text = ''
|
||||
exec matugen image "${hmConfig.theme.configDir}/wallpaper" \
|
||||
--type scheme-${hmConfig.theme.flavour} \
|
||||
--mode "$(cat "${hmConfig.theme.configDir}/mode")" \
|
||||
--contrast ${builtins.toString hmConfig.theme.contrast}
|
||||
'';
|
||||
}));
|
||||
theme.extraConfig = lib.mkBefore (
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-matugen";
|
||||
runtimeInputs = with pkgs; [ matugen ];
|
||||
text = ''
|
||||
exec matugen image "${hmConfig.theme.configDir}/wallpaper" \
|
||||
--type scheme-${hmConfig.theme.flavour} \
|
||||
--mode "$(cat "${hmConfig.theme.configDir}/mode")" \
|
||||
--contrast ${builtins.toString hmConfig.theme.contrast}
|
||||
'';
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
services.network-manager-applet.enable = true;
|
@@ -1,10 +1,15 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ pavucontrol ];
|
||||
|
||||
wayland.windowManager.hyprland.settings =
|
||||
let
|
||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||
playerctl = lib.meta.getExe pkgs.playerctl;
|
||||
in
|
||||
{
|
||||
bindle = [
|
||||
@@ -12,11 +17,17 @@
|
||||
", XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ -l 2.0 2%-"
|
||||
"CTRL, XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ -l 1.0 2%+"
|
||||
"CTRL, XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ -l 1.0 2%-"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"CTRL, XF86AudioNext, exec, ${playerctl} position 10+"
|
||||
"CTRL, XF86AudioPrev, exec, ${playerctl} position 10-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioStop, exec, ${playerctl} stop"
|
||||
];
|
||||
};
|
||||
};
|
50
users/configs/gui/qalculate/default.nix
Normal file
50
users/configs/gui/qalculate/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history"
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."qalculate/qalculate-gtk.cfg".source =
|
||||
(pkgs.formats.ini { }).generate "qalculate-gtk.cfg"
|
||||
{
|
||||
General = {
|
||||
allow_multiple_instances = 1;
|
||||
width = 500;
|
||||
save_history_separately = 1;
|
||||
auto_update_exchange_rates = 1;
|
||||
local_currency_conversion = 1;
|
||||
use_binary_prefixes = 1;
|
||||
persistent_keypad = 1;
|
||||
copy_ascii = 1;
|
||||
copy_ascii_without_units = 1;
|
||||
};
|
||||
Mode = {
|
||||
calculate_as_you_type = 1;
|
||||
excessive_parenthesis = 1;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -34,9 +41,7 @@ in
|
||||
|
||||
xdg.configFile =
|
||||
let
|
||||
qtConfig = (pkgs.formats.ini { }).generate "qt5ct.conf" {
|
||||
Appearance.style = "kvantum";
|
||||
};
|
||||
qtConfig = (pkgs.formats.ini { }).generate "qt5ct.conf" { Appearance.style = "kvantum"; };
|
||||
in
|
||||
{
|
||||
"qt5ct/qt5ct.conf".source = qtConfig;
|
@@ -1,5 +1,12 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
64
users/configs/gui/swww/default.nix
Normal file
64
users/configs/gui/swww/default.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeSwww = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-swww";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
swww
|
||||
];
|
||||
text = "exec swww img \"${hmConfig.theme.configDir}/wallpaper\"";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ swww ];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
Description = "Wallpaper daemon";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww init";
|
||||
}
|
||||
);
|
||||
|
||||
ExecStartPost = themeSwww;
|
||||
|
||||
ExecStop = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "kill-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww kill";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkAfter "${themeSwww} &";
|
||||
};
|
||||
}
|
@@ -1,5 +1,13 @@
|
||||
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeBin = lib.meta.getExe hmConfig.theme.pkg;
|
||||
@@ -14,7 +22,9 @@ in
|
||||
];
|
||||
|
||||
home = {
|
||||
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [ "writeBoundary" ] "run ${themeBin}";
|
||||
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [
|
||||
"writeBoundary"
|
||||
] "run ${themeBin}";
|
||||
persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/theme" ];
|
||||
};
|
||||
};
|
@@ -1,5 +1,13 @@
|
||||
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
||||
@@ -7,7 +15,10 @@ in
|
||||
home-manager.users.${user.name} = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
extensions = with pkgs.vscode-extensions; [ naumovs.color-highlight ];
|
||||
|
||||
userSettings = {
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.accessibilitySupport" = "off";
|
||||
@@ -65,9 +76,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./langs/nix.nix
|
||||
];
|
||||
imports = [ ./langs/nix.nix ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".config/Code" ];
|
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.vscode = {
|
||||
userSettings = {
|
||||
@@ -7,9 +6,7 @@
|
||||
"nix.formatterPath" = "nixpkgs-fmt";
|
||||
"nix.serverSettings" = { };
|
||||
};
|
||||
extensions = with pkgs; with vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
];
|
||||
extensions = with pkgs; with vscode-extensions; [ jnoortheen.nix-ide ];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ wev ];
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
{ user ? throw "user argument is required" }: { config, ... }:
|
||||
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
in
|
@@ -1,5 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ pavucontrol ];
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home.packages = with pkgs; [ playerctl ];
|
||||
services.playerctld.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
playerctl = lib.meta.getExe pkgs.playerctl;
|
||||
in
|
||||
[
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioStop, exec, ${playerctl} stop"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"CTRL, XF86AudioNext, exec, ${playerctl} position 10+"
|
||||
"CTRL, XF86AudioPrev, exec, ${playerctl} position 10-"
|
||||
];
|
||||
};
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [ "${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history" ];
|
||||
};
|
||||
|
||||
xdg.configFile."qalculate/qalculate-gtk.cfg".source = (pkgs.formats.ini { }).generate "qalculate-gtk.cfg" {
|
||||
General = {
|
||||
allow_multiple_instances = 1;
|
||||
width = 500;
|
||||
save_history_separately = 1;
|
||||
auto_update_exchange_rates = 1;
|
||||
local_currency_conversion = 1;
|
||||
use_binary_prefixes = 1;
|
||||
persistent_keypad = 1;
|
||||
copy_ascii = 1;
|
||||
copy_ascii_without_units = 1;
|
||||
};
|
||||
Mode = {
|
||||
calculate_as_you_type = 1;
|
||||
excessive_parenthesis = 1;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
themeSwww = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "theme-swww";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils-full
|
||||
swww
|
||||
];
|
||||
text = "exec swww img \"${hmConfig.theme.configDir}/wallpaper\"";
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = with pkgs; [ swww ];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
Description = "Wallpaper daemon";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
|
||||
ExecStart = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "init-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww init";
|
||||
});
|
||||
|
||||
ExecStartPost = themeSwww;
|
||||
|
||||
ExecStop = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "kill-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww kill";
|
||||
});
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
theme.extraConfig = lib.mkAfter "${themeSwww} &";
|
||||
};
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
{ user ? throw "user argument is required" }: { ... }:
|
||||
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22000 ];
|
||||
allowedUDPPorts = [ 21027 22000 ];
|
||||
};
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
extraOptions = [ "-no-default-folder" ];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user