Avoid possible infinite recursion
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ brightnessctl ];
|
||||
|
||||
@@ -18,15 +13,4 @@
|
||||
ACTION=="add", SUBSYSTEM=="leds", RUN+="${chgrp} input /sys/class/leds/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="leds", RUN+="${chmod} g+w /sys/class/leds/%k/brightness"
|
||||
'';
|
||||
|
||||
users.groups =
|
||||
let
|
||||
members = builtins.attrNames (
|
||||
lib.attrsets.filterAttrs (_: config: config.isNormalUser) config.users.users
|
||||
);
|
||||
in
|
||||
{
|
||||
video.members = members;
|
||||
input.members = members;
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,7 +8,7 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name}.systemd.user.services.mpris-proxy = {
|
||||
home-manager.users.${username}.systemd.user.services.mpris-proxy = {
|
||||
Unit = {
|
||||
Description = "MPRIS proxy";
|
||||
Requires = [ "sound.target" ];
|
||||
|
@@ -1,7 +1,12 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ brightnessctl ];
|
||||
users.users.${username}.extraGroups = [
|
||||
"video"
|
||||
"inputs"
|
||||
];
|
||||
|
||||
home-manager.users.${username}.home.packages = with pkgs; [ brightnessctl ];
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.programs.btop = {
|
||||
home-manager.users.${username}.programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,15 +8,16 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
userName = user.fullName;
|
||||
userEmail = user.email;
|
||||
userName = userConfig.fullName;
|
||||
userEmail = userConfig.email;
|
||||
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,11 +8,12 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
gpgPath = "${hmConfig.xdg.dataHome}/gnupg";
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = gpgPath;
|
||||
@@ -37,7 +38,7 @@ in
|
||||
];
|
||||
runtimeEnv = {
|
||||
GNUPGHOME = gpgPath;
|
||||
HOME = user.home;
|
||||
HOME = userConfig.home;
|
||||
};
|
||||
text = builtins.readFile ./import-gpg-keys.sh;
|
||||
}
|
||||
@@ -64,7 +65,7 @@ in
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
tmpfiles.rules = [ "d ${gpgPath} 0700 ${user.name} users -" ];
|
||||
tmpfiles.rules = [ "d ${gpgPath} 0700 ${username} users -" ];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ config, inputs, ... }:
|
||||
{
|
||||
@@ -14,7 +14,7 @@
|
||||
backupFileExtension = "bak";
|
||||
useGlobalPkgs = true;
|
||||
|
||||
users.${user.name} = {
|
||||
users.${username} = {
|
||||
home.stateVersion = "24.05";
|
||||
systemd.user.startServices = "sd-switch";
|
||||
nix.settings = config.nix.settings;
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -7,22 +7,25 @@
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
userConfig = config.users.users.${username};
|
||||
in
|
||||
{
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
systemd.tmpfiles.rules = ([
|
||||
"d /persist/home 0755 root root -"
|
||||
"d /cache/home 0755 root root -"
|
||||
"d /persist${user.home} 0700 ${user.name} users -"
|
||||
"d /cache${user.home} 0700 ${user.name} users -"
|
||||
"d /persist${userConfig.home} 0700 ${username} users -"
|
||||
"d /cache${userConfig.home} 0700 ${username} users -"
|
||||
]);
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".allowOther = true;
|
||||
"/cache${user.home}".allowOther = true;
|
||||
"/persist${userConfig.home}".allowOther = true;
|
||||
"/cache${userConfig.home}".allowOther = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home.packages = with pkgs; [
|
||||
wireplumber
|
||||
playerctl
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,17 +8,18 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
userConfig = config.users.users.${username};
|
||||
sopsKeyPath = ".config/sops-nix/key.txt";
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ inputs.sops-nix.homeManagerModules.sops ];
|
||||
|
||||
sops.age.keyFile = "/persist${user.home}/${sopsKeyPath}";
|
||||
sops.age.keyFile = "/persist${userConfig.home}/${sopsKeyPath}";
|
||||
|
||||
home = {
|
||||
persistence."/persist${user.home}".files = [ sopsKeyPath ];
|
||||
sessionVariables.SOPS_AGE_KEY_FILE = "${user.home}/${sopsKeyPath}";
|
||||
persistence."/persist${userConfig.home}".files = [ sopsKeyPath ];
|
||||
sessionVariables.SOPS_AGE_KEY_FILE = "${userConfig.home}/${sopsKeyPath}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
@@ -14,17 +14,17 @@
|
||||
sops.secrets = {
|
||||
# openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:3072
|
||||
"syncthing/key" = {
|
||||
owner = user.name;
|
||||
owner = username;
|
||||
group = "users";
|
||||
};
|
||||
# openssl req -new -x509 -key key.pem -out cert.pem -days 9999 -subj "/CN=syncthing"
|
||||
"syncthing/cert" = {
|
||||
owner = user.name;
|
||||
owner = username;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user.name}.services.syncthing = {
|
||||
home-manager.users.${username}.services.syncthing = {
|
||||
enable = true;
|
||||
key = config.sops.secrets."syncthing/key".path;
|
||||
cert = config.sops.secrets."syncthing/cert".path;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
xdg = {
|
||||
@@ -22,13 +23,13 @@ in
|
||||
userDirs = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
XDG_VM_DIR = "${user.home}/VMs";
|
||||
XDG_GIT_DIR = "${user.home}/git";
|
||||
XDG_VM_DIR = "${userConfig.home}/VMs";
|
||||
XDG_GIT_DIR = "${userConfig.home}/git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence."/persist${user.home}".directories = with hmConfig.xdg.userDirs; [
|
||||
home.persistence."/persist${userConfig.home}".directories = with hmConfig.xdg.userDirs; [
|
||||
relativeDesktop
|
||||
relativeDocuments
|
||||
relativeDownload
|
||||
|
@@ -1,12 +1,13 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${hmConfig.xdg.relativeConfigHome}/zsh";
|
||||
@@ -20,6 +21,8 @@ in
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
|
||||
home.persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeDataHome}/zsh" ];
|
||||
home.persistence."/persist${userConfig.home}".directories = [
|
||||
"${hmConfig.xdg.relativeDataHome}/zsh"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -9,11 +9,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
agsConfig = import ./config { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags.enable = true;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
services.blueman-applet.enable = true;
|
||||
systemd.user.services.blueman-applet.Unit.After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
@@ -1,9 +1,14 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.wayland.windowManager.hyprland.settings.bindle =
|
||||
users.users.${username}.extraGroups = [
|
||||
"video"
|
||||
"inputs"
|
||||
];
|
||||
|
||||
home-manager.users.${username}.wayland.windowManager.hyprland.settings.bindle =
|
||||
let
|
||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
||||
in
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,10 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs = {
|
||||
btop.settings.color_theme = "matugen";
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,7 +8,7 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
services.cbatticon = {
|
||||
enable = true;
|
||||
lowLevelPercent = 20;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,16 +8,19 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/cliphist" ];
|
||||
persistence."/cache${userConfig.home}".directories = [
|
||||
"${hmConfig.xdg.relativeCacheHome}/cliphist"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
|
@@ -1,9 +1,17 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
userConfig = config.users.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${username} = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
@@ -122,8 +130,8 @@
|
||||
wayland.windowManager.hyprland.settings.bind = [ "$mod, b, exec, ${lib.meta.getExe pkgs.firefox}" ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".mozilla" ];
|
||||
"/cache${user.home}".directories = [ ".cache/mozilla" ];
|
||||
"/persist${userConfig.home}".directories = [ ".mozilla" ];
|
||||
"/cache${userConfig.home}".directories = [ ".cache/mozilla" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,10 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,12 +8,12 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,10 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
hyprshot
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs = {
|
||||
kitty = {
|
||||
enable = true;
|
||||
@@ -44,6 +45,8 @@ in
|
||||
)
|
||||
} &";
|
||||
|
||||
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/kitty" ];
|
||||
home.persistence."/cache${userConfig.home}".directories = [
|
||||
"${hmConfig.xdg.relativeCacheHome}/kitty"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,10 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
programs.matugen = {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
services.network-manager-applet.enable = true;
|
||||
systemd.user.services.network-manager-applet.Unit.After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
programs = {
|
||||
@@ -71,10 +72,10 @@ in
|
||||
|
||||
matugen.settings.templates = builtins.mapAttrs (name: _: {
|
||||
input_path = ./theme.json;
|
||||
output_path = "${user.home}/${name}/.obsidian/plugins/obsidian-style-settings/data.json";
|
||||
output_path = "${userConfig.home}/${name}/.obsidian/plugins/obsidian-style-settings/data.json";
|
||||
}) hmConfig.programs.obsidian.vaults;
|
||||
};
|
||||
|
||||
home.persistence."/cache${user.home}".directories = [ ".config/obsidian" ];
|
||||
home.persistence."/cache${userConfig.home}".directories = [ ".config/obsidian" ];
|
||||
};
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home.packages = with pkgs; [ pavucontrol ];
|
||||
|
||||
wayland.windowManager.hyprland.settings =
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
@@ -8,16 +8,17 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [
|
||||
persistence."/cache${userConfig.home}".files = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history"
|
||||
];
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,10 +8,10 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,17 +8,20 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = builtins.head hmConfig.theme.font.monospace.names;
|
||||
};
|
||||
|
||||
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/rofi" ];
|
||||
home.persistence."/cache${userConfig.home}".directories = [
|
||||
"${hmConfig.xdg.relativeCacheHome}/rofi"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, r, exec, ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,7 +8,8 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
themeSwww = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "theme-swww";
|
||||
@@ -21,10 +22,10 @@ let
|
||||
);
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home = {
|
||||
packages = with pkgs; [ swww ];
|
||||
persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
persistence."/cache${userConfig.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/swww" ];
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -9,11 +9,12 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
themeBin = lib.meta.getExe hmConfig.theme.pkg;
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
theme.enable = true;
|
||||
@@ -27,7 +28,9 @@ in
|
||||
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [
|
||||
"writeBoundary"
|
||||
] "run ${themeBin}";
|
||||
persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/theme" ];
|
||||
persistence."/persist${userConfig.home}".directories = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/theme"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -9,10 +9,11 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
@@ -82,9 +83,9 @@ in
|
||||
imports = [ ./langs/nix.nix ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".directories = [ ".config/Code" ];
|
||||
"/persist${userConfig.home}".directories = [ ".config/Code" ];
|
||||
# Bastard: https://github.com/microsoft/vscode/issues/3884
|
||||
"/cache${user.home}".directories = [
|
||||
"/cache${userConfig.home}".directories = [
|
||||
".config/Code/Cache"
|
||||
".config/Code/CachedConfigurations"
|
||||
".config/Code/CachedData"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user.name}.home.packages = with pkgs; [ wev ];
|
||||
home-manager.users.${username}.home.packages = with pkgs; [ wev ];
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home-manager.users.${username} = {
|
||||
home.pointerCursor.x11.enable = true;
|
||||
xresources.path = "${hmConfig.xdg.configHome}/X11/xresources";
|
||||
};
|
||||
|
@@ -1,72 +1,73 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
user = config.users.users.nick;
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
username = "nick";
|
||||
userConfig = config.users.users.${username};
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../common/user/configs/options.nix
|
||||
(import ../common/user/configs/console/bluetooth { inherit user; })
|
||||
(import ../common/user/configs/console/brightnessctl { inherit user; })
|
||||
(import ../common/user/configs/console/btop { inherit user; })
|
||||
(import ../common/user/configs/console/git { inherit user; })
|
||||
(import ../common/user/configs/console/gpg-agent { inherit user; })
|
||||
(import ../common/user/configs/console/home-manager { inherit user; })
|
||||
(import ../common/user/configs/console/neovim { inherit user; })
|
||||
(import ../common/user/configs/console/persist { inherit user; })
|
||||
(import ../common/user/configs/console/pipewire { inherit user; })
|
||||
(import ../common/user/configs/console/sops { inherit user; })
|
||||
(import ../common/user/configs/console/syncthing { inherit user; })
|
||||
(import ../common/user/configs/console/xdg { inherit user; })
|
||||
(import ../common/user/configs/console/zsh { inherit user; })
|
||||
(import ../common/user/configs/gui/ags { inherit user; })
|
||||
(import ../common/user/configs/gui/bluetooth { inherit user; })
|
||||
(import ../common/user/configs/gui/brightnessctl { inherit user; })
|
||||
(import ../common/user/configs/gui/btop { inherit user; })
|
||||
# (import ../common/user/configs/gui/cbatticon { inherit user; })
|
||||
(import ../common/user/configs/gui/cliphist { inherit user; })
|
||||
(import ../common/user/configs/gui/firefox { inherit user; })
|
||||
(import ../common/user/configs/gui/gtk { inherit user; })
|
||||
(import ../common/user/configs/gui/hyprland { inherit user; })
|
||||
(import ../common/user/configs/gui/hyprshot { inherit user; })
|
||||
(import ../common/user/configs/gui/kitty { inherit user; })
|
||||
(import ../common/user/configs/gui/matugen { inherit user; })
|
||||
(import ../common/user/configs/gui/networking { inherit user; })
|
||||
(import ../common/user/configs/gui/obsidian { inherit user; })
|
||||
(import ../common/user/configs/gui/pipewire { inherit user; })
|
||||
(import ../common/user/configs/gui/qalculate { inherit user; })
|
||||
(import ../common/user/configs/gui/qt { inherit user; })
|
||||
(import ../common/user/configs/gui/rofi { inherit user; })
|
||||
(import ../common/user/configs/gui/swww { inherit user; })
|
||||
(import ../common/user/configs/gui/theme { inherit user; })
|
||||
(import ../common/user/configs/gui/vscode { inherit user; })
|
||||
(import ../common/user/configs/gui/wev { inherit user; })
|
||||
(import ../common/user/configs/gui/x11 { inherit user; })
|
||||
(import ../common/user/configs/console/bluetooth { inherit username; })
|
||||
(import ../common/user/configs/console/brightnessctl { inherit username; })
|
||||
(import ../common/user/configs/console/btop { inherit username; })
|
||||
(import ../common/user/configs/console/git { inherit username; })
|
||||
(import ../common/user/configs/console/gpg-agent { inherit username; })
|
||||
(import ../common/user/configs/console/home-manager { inherit username; })
|
||||
(import ../common/user/configs/console/neovim { inherit username; })
|
||||
(import ../common/user/configs/console/persist { inherit username; })
|
||||
(import ../common/user/configs/console/pipewire { inherit username; })
|
||||
(import ../common/user/configs/console/sops { inherit username; })
|
||||
(import ../common/user/configs/console/syncthing { inherit username; })
|
||||
(import ../common/user/configs/console/xdg { inherit username; })
|
||||
(import ../common/user/configs/console/zsh { inherit username; })
|
||||
(import ../common/user/configs/gui/ags { inherit username; })
|
||||
(import ../common/user/configs/gui/bluetooth { inherit username; })
|
||||
(import ../common/user/configs/gui/brightnessctl { inherit username; })
|
||||
(import ../common/user/configs/gui/btop { inherit username; })
|
||||
# (import ../common/user/configs/gui/cbatticon { inherit username; })
|
||||
(import ../common/user/configs/gui/cliphist { inherit username; })
|
||||
(import ../common/user/configs/gui/firefox { inherit username; })
|
||||
(import ../common/user/configs/gui/gtk { inherit username; })
|
||||
(import ../common/user/configs/gui/hyprland { inherit username; })
|
||||
(import ../common/user/configs/gui/hyprshot { inherit username; })
|
||||
(import ../common/user/configs/gui/kitty { inherit username; })
|
||||
(import ../common/user/configs/gui/matugen { inherit username; })
|
||||
(import ../common/user/configs/gui/networking { inherit username; })
|
||||
(import ../common/user/configs/gui/obsidian { inherit username; })
|
||||
(import ../common/user/configs/gui/pipewire { inherit username; })
|
||||
(import ../common/user/configs/gui/qalculate { inherit username; })
|
||||
(import ../common/user/configs/gui/qt { inherit username; })
|
||||
(import ../common/user/configs/gui/rofi { inherit username; })
|
||||
(import ../common/user/configs/gui/swww { inherit username; })
|
||||
(import ../common/user/configs/gui/theme { inherit username; })
|
||||
(import ../common/user/configs/gui/vscode { inherit username; })
|
||||
(import ../common/user/configs/gui/wev { inherit username; })
|
||||
(import ../common/user/configs/gui/x11 { inherit username; })
|
||||
];
|
||||
|
||||
sops.secrets.nick-password = {
|
||||
sopsFile = ../../users/nick/secrets/secrets.yaml;
|
||||
sops.secrets."${username}-password" = {
|
||||
sopsFile = ../../users/${username}/secrets/secrets.yaml;
|
||||
key = "password";
|
||||
neededForUsers = true;
|
||||
};
|
||||
|
||||
users.users.nick = {
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
email = "nick@karaolidis.com";
|
||||
fullName = "Nikolaos Karaolidis";
|
||||
description = user.fullName;
|
||||
hashedPasswordFile = config.sops.secrets.nick-password.path;
|
||||
description = userConfig.fullName;
|
||||
hashedPasswordFile = config.sops.secrets."${username}-password".path;
|
||||
extraGroups = [ "wheel" ];
|
||||
linger = true;
|
||||
uid = 1000;
|
||||
};
|
||||
|
||||
services.getty.autologinUser = user.name;
|
||||
services.getty.autologinUser = userConfig.name;
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
home.homeDirectory = user.home;
|
||||
sops.defaultSopsFile = ../../users/nick/secrets/secrets.yaml;
|
||||
theme.wallpaper = ../../users/nick/secrets/wallpapers/clouds.png;
|
||||
home-manager.users.${username} = {
|
||||
home.homeDirectory = userConfig.home;
|
||||
sops.defaultSopsFile = ../../users/${username}/secrets/secrets.yaml;
|
||||
theme.wallpaper = ../../users/${username}/secrets/wallpapers/clouds.png;
|
||||
|
||||
services.syncthing.settings.folders = {
|
||||
obsidian = {
|
||||
|
Reference in New Issue
Block a user