Moved modules and hm dir to hosts dir. Moved some code to shared and extended lib with custom functions

This commit is contained in:
2025-04-12 17:05:38 +02:00
parent df5bea9cc0
commit e3a1dd36d7
99 changed files with 550 additions and 140 deletions

41
shared/common.nix Normal file
View File

@ -0,0 +1,41 @@
rec {
default = {
browser = "zen";
calculator = "gnome-calculator";
fileManager = "nautilus";
imageViewer = "loupe";
lockScreen = "hyprlock";
terminal = "kitty";
};
dir = {
home = "/home/${username}";
pictures = "${dir.home}/Pictures";
};
hostname = "desktop";
keymaps = {
layout = "gb,no";
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
};
# Empty matches all
monitor1 = "DP-1";
monitor2 = "DP-3";
username = "martin";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.version = "24.11";
secret.weatherApiKey = lib: loadSecret lib ./secrets/weather-api-key;
loadSecret =
lib: filePath: lib.strings.trim (lib.strings.removeSuffix "\n" (builtins.readFile filePath));
}