Add xdg settings, cache, cleanup script
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -4,5 +4,8 @@
|
|||||||
histFile = "/var/lib/zsh/history";
|
histFile = "/var/lib/zsh/history";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/persist".directories = [ "/var/lib/zsh" ];
|
environment = {
|
||||||
|
persistence."/persist".directories = [ "/var/lib/zsh" ];
|
||||||
|
pathsToLink = [ "/share/zsh" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
./configs/nix-ld
|
./configs/nix-ld
|
||||||
./configs/git
|
./configs/git
|
||||||
./configs/gpg-agent
|
./configs/gpg-agent
|
||||||
|
./scripts/cleanup
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
@@ -63,8 +64,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
settings = {
|
||||||
|
use-xdg-base-directories = true;
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
};
|
||||||
|
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
|
optimise.automatic = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
34
hosts/common/scripts/cleanup/cleanup.sh
Normal file
34
hosts/common/scripts/cleanup/cleanup.sh
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root or with sudo privileges."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
delete_subvolume_recursively() {
|
||||||
|
IFS=$'\n'
|
||||||
|
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
||||||
|
delete_subvolume_recursively "/mnt/btrfs/$i"
|
||||||
|
done
|
||||||
|
btrfs subvolume delete "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ -e /mnt/btrfs && $(mountpoint -q /mnt/btrfs) ]]; then
|
||||||
|
echo "/mnt/btrfs is already mounted. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /mnt/btrfs
|
||||||
|
mount /dev/mapper/luks /mnt/btrfs
|
||||||
|
|
||||||
|
if [[ -e /mnt/btrfs/root.bak ]]; then
|
||||||
|
for i in /mnt/btrfs/root.bak/*; do
|
||||||
|
delete_subvolume_recursively "$i"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
umount /mnt/btrfs
|
||||||
|
rmdir /mnt/btrfs
|
||||||
|
|
||||||
|
nix-collect-garbage -d
|
||||||
|
nix-store --gc -v
|
5
hosts/common/scripts/cleanup/default.nix
Normal file
5
hosts/common/scripts/cleanup/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ (pkgs.writeShellScriptBin "nix-cleanup" (builtins.readFile ./cleanup.sh)) ];
|
||||||
|
}
|
@@ -11,7 +11,6 @@
|
|||||||
networking.hostName = "eirene";
|
networking.hostName = "eirene";
|
||||||
|
|
||||||
# https://github.com/NixOS/nixos-hardware/tree/master/lenovo/legion/16achg6
|
# https://github.com/NixOS/nixos-hardware/tree/master/lenovo/legion/16achg6
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
cpu.amd.updateMicrocode = true;
|
cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
@@ -58,6 +58,10 @@
|
|||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
||||||
};
|
};
|
||||||
|
"/cache" = {
|
||||||
|
mountpoint = "/cache";
|
||||||
|
mountOptions = ["subvol=cache" "compress=zstd" "noatime"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -6,25 +6,20 @@ in {
|
|||||||
programs.fuse.userAllowOther = lib.mkIf (users != [ ]) true;
|
programs.fuse.userAllowOther = lib.mkIf (users != [ ]) true;
|
||||||
|
|
||||||
systemd.tmpfiles.rules = lib.mkIf (users != [ ]) (
|
systemd.tmpfiles.rules = lib.mkIf (users != [ ]) (
|
||||||
[ "d /persist/home 0755 root root -" ] ++
|
[
|
||||||
lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users
|
"d /persist/home 0755 root root -"
|
||||||
|
"d /cache/home 0755 root root -"
|
||||||
|
] ++
|
||||||
|
lib.attrsets.mapAttrsToList (user: config: "d /persist${config.home} 0700 ${user} users -") users ++
|
||||||
|
lib.attrsets.mapAttrsToList (user: config: "d /cache${config.home} 0700 ${user} users -") users
|
||||||
);
|
);
|
||||||
|
|
||||||
home-manager.users = lib.attrsets.mapAttrs (user: config: ({
|
home-manager.users = lib.attrsets.mapAttrs (user: config: ({
|
||||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||||
|
|
||||||
home.persistence."/persist${config.home}" = {
|
home.persistence = {
|
||||||
allowOther = true;
|
"/persist${config.home}".allowOther = true;
|
||||||
directories = [
|
"/cache${config.home}".allowOther = true;
|
||||||
"Documents"
|
|
||||||
"Downloads"
|
|
||||||
"Music"
|
|
||||||
"Pictures"
|
|
||||||
"Videos"
|
|
||||||
"Templates"
|
|
||||||
"VMs"
|
|
||||||
"git"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
})) users;
|
})) users;
|
||||||
}
|
}
|
||||||
|
44
users/common/configs/xdg/default.nix
Normal file
44
users/common/configs/xdg/default.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
users = lib.attrsets.filterAttrs (name: config: config.isNormalUser) config.users.users;
|
||||||
|
in {
|
||||||
|
home-manager.users = lib.attrsets.mapAttrs (user: cfg: (let
|
||||||
|
cacheHome = "${cfg.home}/.cache";
|
||||||
|
configHome = "${cfg.home}/.config";
|
||||||
|
dataHome = "${cfg.home}/.local/share";
|
||||||
|
stateHome = "${cfg.home}/.local/state";
|
||||||
|
xdgVmDir = "${cfg.home}/VMs";
|
||||||
|
xdgGitDir = "${cfg.home}/git";
|
||||||
|
in {
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
mimeApps.enable = true;
|
||||||
|
|
||||||
|
inherit cacheHome;
|
||||||
|
inherit configHome;
|
||||||
|
inherit dataHome;
|
||||||
|
inherit stateHome;
|
||||||
|
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
XDG_VM_DIR = xdgVmDir;
|
||||||
|
XDG_GIT_DIR = xdgGitDir;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persistence."/persist${cfg.home}".directories = [
|
||||||
|
"Desktop" # userDirs.desktop
|
||||||
|
"Documents" # userDirs.documents
|
||||||
|
"Downloads" # userDirs.download
|
||||||
|
"Music" # userDirs.music
|
||||||
|
"Pictures" # userDirs.pictures
|
||||||
|
"Templates" # userDirs.templates
|
||||||
|
"Videos" # userDirs.videos
|
||||||
|
"VMs" # xdgVmDir
|
||||||
|
"git" # xdgGitDir
|
||||||
|
];
|
||||||
|
})) users;
|
||||||
|
}
|
@@ -1,4 +1,4 @@
|
|||||||
{ inputs, ... }:
|
{ config, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
./options.nix
|
./options.nix
|
||||||
./configs/persist
|
./configs/persist
|
||||||
./configs/sops
|
./configs/sops
|
||||||
|
./configs/xdg
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
sharedModules = [{
|
sharedModules = [{
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
nix.settings = config.nix.settings;
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -88,6 +88,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.persistence."/persist${user.home}".directories = [ ".mozilla" ];
|
home.persistence = {
|
||||||
|
"/persist${user.home}".directories = [ ".mozilla" ];
|
||||||
|
"/cache${user.home}".directories = [ ".cache/mozilla" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
{ user ? throw "user argument is required" }: { config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
hmConfig = config.home-manager.users."${user.name}";
|
||||||
|
in {
|
||||||
home-manager.users."${user.name}" = {
|
home-manager.users."${user.name}" = {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -14,7 +16,7 @@
|
|||||||
extraConfig.credential.helper = "store";
|
extraConfig.credential.helper = "store";
|
||||||
hooks = let
|
hooks = let
|
||||||
commit-msg-hook = pkgs.writeShellScriptBin "git-commit-msg" ''
|
commit-msg-hook = pkgs.writeShellScriptBin "git-commit-msg" ''
|
||||||
git interpret-trailers --if-exists doNothing --trailer \
|
${pkgs.git}/bin/git interpret-trailers --if-exists doNothing --trailer \
|
||||||
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
|
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
|
||||||
--in-place "$1"
|
--in-place "$1"
|
||||||
'';
|
'';
|
||||||
@@ -22,5 +24,7 @@
|
|||||||
commit-msg = "${commit-msg-hook}/bin/git-commit-msg";
|
commit-msg = "${commit-msg-hook}/bin/git-commit-msg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sops.secrets."git".path = "${hmConfig.xdg.configHome}/git/credentials";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,16 @@
|
|||||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users."${user.name}";
|
||||||
|
gpgPath = "${hmConfig.xdg.dataHome}/gnupg";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home-manager.users."${user.name}" = {
|
home-manager.users."${user.name}" = {
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
homedir = gpgPath;
|
||||||
|
};
|
||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultCacheTtl = 31536000;
|
defaultCacheTtl = 31536000;
|
||||||
@@ -11,22 +20,24 @@
|
|||||||
systemd.user = {
|
systemd.user = {
|
||||||
services.gpg-agent-import = let
|
services.gpg-agent-import = let
|
||||||
init = pkgs.writeShellScriptBin "import-gpg-keys" ''
|
init = pkgs.writeShellScriptBin "import-gpg-keys" ''
|
||||||
|
export GNUPGHOME=${gpgPath}
|
||||||
|
|
||||||
for keyfile in "${user.home}"/.config/sops-nix/secrets/gpg-agent/*.key; do
|
for keyfile in "${user.home}"/.config/sops-nix/secrets/gpg-agent/*.key; do
|
||||||
passfile="''${keyfile%.key}.pass"
|
passfile="''${keyfile%.key}.pass"
|
||||||
|
|
||||||
if [ -f "$passfile" ]; then
|
if [ -f "$passfile" ]; then
|
||||||
gpg --batch --yes --pinentry-mode loopback --passphrase-file "$passfile" --import "$keyfile"
|
${pkgs.gnupg}/bin/gpg2 --batch --yes --pinentry-mode loopback --passphrase-file "$passfile" --import "$keyfile"
|
||||||
else
|
else
|
||||||
gpg --batch --yes --import "$keyfile"
|
${pkgs.gnupg}/bin/gpg2 --batch --yes --import "$keyfile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gpg --with-colons --import-options show-only --import "$keyfile" | grep '^fpr' | cut -d: -f10 | while read -r KEY_ID; do
|
${pkgs.gnupg}/bin/gpg2 --with-colons --import-options show-only --import "$keyfile" | grep '^fpr' | cut -d: -f10 | while read -r KEY_ID; do
|
||||||
echo "$KEY_ID:6:" >> "${user.home}"/.gnupg/otrust.txt
|
echo "$KEY_ID:6:" >> "${gpgPath}"/otrust.txt
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
gpg --import-ownertrust "${user.home}"/.gnupg/otrust.txt
|
${pkgs.gnupg}/bin/gpg2 --import-ownertrust "${gpgPath}"/otrust.txt
|
||||||
rm "${user.home}"/.gnupg/otrust.txt
|
rm "${gpgPath}"/otrust.txt
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
Unit = {
|
Unit = {
|
||||||
@@ -43,7 +54,12 @@
|
|||||||
Install = { WantedBy = [ "default.target" ]; };
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
};
|
};
|
||||||
|
|
||||||
tmpfiles.rules = [ "d ${user.home}/.gnupg 0700 ${user.name} users -" ];
|
tmpfiles.rules = [ "d ${hmConfig.xdg.dataHome}/gnupg 0700 ${user.name} users -" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets = {
|
||||||
|
"gpg-agent/pgp.key" = { };
|
||||||
|
"gpg-agent/pgp.pass" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
10
users/configs/gtk/default.nix
Normal file
10
users/configs/gtk/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ user ? throw "user argument is required" }: { config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users."${user.name}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users."${user.name}" = {
|
||||||
|
gtk.gtk2.configLocation = "${hmConfig.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
};
|
||||||
|
}
|
@@ -1,5 +1,8 @@
|
|||||||
{ user ? throw "user argument is required" }: { lib, pkgs, ... }:
|
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users."${user.name}";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
@@ -8,12 +11,12 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$term" = "kitty";
|
"$term" = "${pkgs.kitty}/bin/kitty";
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
"$mod, Return, exec, $term"
|
"$mod, Return, exec, $term"
|
||||||
"$mod, r, exec, rofi -show drun"
|
"$mod, r, exec, ${pkgs.rofi-wayland}/bin/rofi -cache-dir ${hmConfig.xdg.cacheHome}/rofi -show drun"
|
||||||
"$mod, b, exec, firefox"
|
"$mod, b, exec, ${pkgs.firefox}/bin/firefox"
|
||||||
|
|
||||||
"$mod, 1, workspace, 1"
|
"$mod, 1, workspace, 1"
|
||||||
"$mod, 2, workspace, 2"
|
"$mod, 2, workspace, 2"
|
||||||
@@ -116,9 +119,8 @@
|
|||||||
|
|
||||||
home = {
|
home = {
|
||||||
sessionVariables.NIXOS_OZONE_WL = "1";
|
sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
swww
|
|
||||||
rofi-wayland
|
|
||||||
pavucontrol
|
pavucontrol
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@@ -8,5 +8,7 @@
|
|||||||
confirm_os_window_close 0
|
confirm_os_window_close 0
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.persistence."/cache${user.home}".directories = [ ".cache/kitty" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
10
users/configs/rofi/default.nix
Normal file
10
users/configs/rofi/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.users."${user.name}" = {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [ rofi-wayland ];
|
||||||
|
persistence."/cache${user.home}".directories = [ ".cache/rofi" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
users/configs/swww/default.nix
Normal file
10
users/configs/swww/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.users."${user.name}" = {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [ swww ];
|
||||||
|
persistence."/cache${user.home}".directories = [ ".cache/swww" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -1,6 +1,22 @@
|
|||||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
{ user ? throw "user argument is required" }: { inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
configDir = ".config/Code";
|
||||||
|
cacheDirs = [
|
||||||
|
".config/Code/Cache"
|
||||||
|
".config/Code/CachedConfigurations"
|
||||||
|
".config/Code/CachedData"
|
||||||
|
".config/Code/CachedExtensionVSIXs"
|
||||||
|
".config/Code/CachedExtensions"
|
||||||
|
".config/Code/CachedProfilesData"
|
||||||
|
".config/Code/Code Cache"
|
||||||
|
".config/Code/DawnCache"
|
||||||
|
".config/Code/GPUCache"
|
||||||
|
".config/Code/Service Worker/CacheStorage"
|
||||||
|
".config/Code/Service Worker/ScriptCache"
|
||||||
|
];
|
||||||
|
inherit (pkgs.callPackage "${inputs.impermanence}/lib.nix" { }) sanitizeName concatPaths;
|
||||||
|
in {
|
||||||
home-manager.users."${user.name}" = {
|
home-manager.users."${user.name}" = {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -59,6 +75,28 @@
|
|||||||
./langs/nix.nix
|
./langs/nix.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.persistence."/persist${user.home}".directories = [ ".config/Code" ];
|
home.persistence = {
|
||||||
|
"/persist${user.home}".directories = [ configDir ];
|
||||||
|
# Bastard: https://github.com/microsoft/vscode/issues/3884
|
||||||
|
"/cache${user.home}".directories = cacheDirs;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Some filthy fucking shit below, be warned.
|
||||||
|
# Microsoft stores cache under .config/Code instead of .cache/Code like normal people.
|
||||||
|
# Sometimes a race condition is caused if the cache bind mounts are created before the config one.
|
||||||
|
# So we do this. Sorry.
|
||||||
|
# https://github.com/nix-community/impermanence/blob/27979f1c3a0d3b9617a3563e2839114ba7d48d3f/home-manager.nix#L238
|
||||||
|
systemd.user.services = let
|
||||||
|
configDirService = "bindMount-${sanitizeName (lib.strings.escapeShellArg (concatPaths [ "/persist${user.home}" configDir ]))}.service";
|
||||||
|
in
|
||||||
|
builtins.listToAttrs (builtins.map (dir: {
|
||||||
|
name = "bindMount-${sanitizeName (lib.strings.escapeShellArg (concatPaths [ "/cache${user.home}" dir ]))}";
|
||||||
|
value = {
|
||||||
|
Unit = {
|
||||||
|
Requires = [ configDirService ];
|
||||||
|
After = [ configDirService ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}) cacheDirs);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
10
users/configs/x/default.nix
Normal file
10
users/configs/x/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ user ? throw "user argument is required" }: { config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users."${user.name}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users."${user.name}" = {
|
||||||
|
xresources.path = "${hmConfig.xdg.configHome}/X11/xresources";
|
||||||
|
};
|
||||||
|
}
|
@@ -4,6 +4,7 @@
|
|||||||
home-manager.users."${user.name}" = {
|
home-manager.users."${user.name}" = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
dotDir = ".config/zsh";
|
||||||
autocd = true;
|
autocd = true;
|
||||||
history = {
|
history = {
|
||||||
path = "${user.home}/.local/share/zsh/history";
|
path = "${user.home}/.local/share/zsh/history";
|
||||||
|
@@ -8,8 +8,12 @@ in
|
|||||||
./nogui.nix
|
./nogui.nix
|
||||||
(import ../configs/firefox { inherit user; })
|
(import ../configs/firefox { inherit user; })
|
||||||
(import ../configs/hyprland { inherit user; })
|
(import ../configs/hyprland { inherit user; })
|
||||||
|
(import ../configs/rofi { inherit user; })
|
||||||
|
(import ../configs/swww { inherit user; })
|
||||||
(import ../configs/kitty { inherit user; })
|
(import ../configs/kitty { inherit user; })
|
||||||
(import ../configs/vscode { inherit user; })
|
(import ../configs/vscode { inherit user; })
|
||||||
|
(import ../configs/gtk { inherit user; })
|
||||||
|
(import ../configs/x { inherit user; })
|
||||||
(import ../configs/stylix { inherit user; })
|
(import ../configs/stylix { inherit user; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
user = config.users.users.nick;
|
user = config.users.users.nick;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../common
|
../common
|
||||||
(import ../configs/zsh { inherit user; })
|
(import ../configs/zsh { inherit user; })
|
||||||
@@ -23,7 +22,7 @@ in
|
|||||||
home = "/home/nick";
|
home = "/home/nick";
|
||||||
email = "nick@karaolidis.com";
|
email = "nick@karaolidis.com";
|
||||||
fullName = "Nikolaos Karaolidis";
|
fullName = "Nikolaos Karaolidis";
|
||||||
description = config.users.users.nick.fullName;
|
description = user.fullName;
|
||||||
hashedPasswordFile = config.sops.secrets.nick-password.path;
|
hashedPasswordFile = config.sops.secrets.nick-password.path;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
linger = true;
|
linger = true;
|
||||||
@@ -31,14 +30,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.nick = {
|
home-manager.users.nick = {
|
||||||
home.homeDirectory = config.users.users.nick.home;
|
home.homeDirectory = user.home;
|
||||||
sops = {
|
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||||
defaultSopsFile = ./secrets/secrets.yaml;
|
|
||||||
secrets = {
|
|
||||||
"git" = { path = "/home/nick/.git-credentials"; };
|
|
||||||
"gpg-agent/pgp.key" = { };
|
|
||||||
"gpg-agent/pgp.pass" = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user