Refactor custom options
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./options.nix ];
|
|
||||||
}
|
|
7
hosts/common/configs/system/default.nix
Normal file
7
hosts/common/configs/system/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu/options.nix
|
||||||
|
./impermanence/options.nix
|
||||||
|
];
|
||||||
|
}
|
@@ -1,7 +1,5 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
|
||||||
|
|
||||||
# uuidgen -r | tr -d -
|
# uuidgen -r | tr -d -
|
||||||
# https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/administration/systemd-state.section.md
|
# https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/administration/systemd-state.section.md
|
||||||
# https://github.com/NixOS/nixpkgs/pull/286140/files
|
# https://github.com/NixOS/nixpkgs/pull/286140/files
|
||||||
|
@@ -18,8 +18,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ (import ./options.nix { inherit home; }) ];
|
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mimeApps.enable = true;
|
mimeApps.enable = true;
|
||||||
|
@@ -1,112 +0,0 @@
|
|||||||
{
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.xdg;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.xdg =
|
|
||||||
with lib;
|
|
||||||
with types;
|
|
||||||
{
|
|
||||||
relativeCacheHome = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = ".cache";
|
|
||||||
description = "Relative path to directory holding application caches.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeConfigHome = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = ".config";
|
|
||||||
description = "Relative path to directory holding application configurations.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeDataHome = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = ".local/share";
|
|
||||||
description = "Relative path to directory holding application data.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeStateHome = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = ".local/state";
|
|
||||||
description = "Relative path to directory holding application states.";
|
|
||||||
};
|
|
||||||
|
|
||||||
userDirs = {
|
|
||||||
relativeDesktop = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Desktop";
|
|
||||||
description = "Relative path to the Desktop directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeDocuments = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Documents";
|
|
||||||
description = "Relative path to the Documents directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeDownload = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Downloads";
|
|
||||||
description = "Relative path to the Downloads directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeMusic = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Music";
|
|
||||||
description = "Relative path to the Music directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativePictures = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Pictures";
|
|
||||||
description = "Relative path to the Pictures directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeTemplates = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Templates";
|
|
||||||
description = "Relative path to the Templates directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
relativeVideos = mkOption {
|
|
||||||
type = str;
|
|
||||||
readOnly = true;
|
|
||||||
default = "Videos";
|
|
||||||
description = "Relative path to the Videos directory.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.xdg =
|
|
||||||
with lib;
|
|
||||||
with cfg;
|
|
||||||
{
|
|
||||||
cacheHome = mkDefault "${home}/${relativeCacheHome}";
|
|
||||||
configHome = mkDefault "${home}/${relativeConfigHome}";
|
|
||||||
dataHome = mkDefault "${home}/${relativeDataHome}";
|
|
||||||
stateHome = mkDefault "${home}/${relativeStateHome}";
|
|
||||||
|
|
||||||
userDirs = with userDirs; {
|
|
||||||
desktop = mkDefault "${home}/${relativeDesktop}";
|
|
||||||
documents = mkDefault "${home}/${relativeDocuments}";
|
|
||||||
download = mkDefault "${home}/${relativeDownload}";
|
|
||||||
music = mkDefault "${home}/${relativeMusic}";
|
|
||||||
pictures = mkDefault "${home}/${relativePictures}";
|
|
||||||
templates = mkDefault "${home}/${relativeTemplates}";
|
|
||||||
videos = mkDefault "${home}/${relativeVideos}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -94,7 +94,7 @@ footer = { fg = "{{colors.surface.default.hex}}", bg = "{{colors.on_surface.def
|
|||||||
prepend_dirs = [
|
prepend_dirs = [
|
||||||
{ name = ".cache", text = "" },
|
{ name = ".cache", text = "" },
|
||||||
{ name = ".local", text = "" },
|
{ name = ".local", text = "" },
|
||||||
{ name = "Games", text = "" },
|
{ name = "Games", text = "" },
|
||||||
{ name = "git", text = "" },
|
{ name = "git", text = "" },
|
||||||
{ name = "Templates", text = "" },
|
{ name = "Templates", text = "" },
|
||||||
{ name = "VMs", text = "" },
|
{ name = "VMs", text = "" },
|
||||||
|
@@ -12,8 +12,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ ./options.nix ];
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
|
18
hosts/common/configs/user/default.nix
Normal file
18
hosts/common/configs/user/default.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${user}.imports = [
|
||||||
|
./console/zsh/options.nix
|
||||||
|
./gui/clipbook/options.nix
|
||||||
|
./gui/hyprland/options.nix
|
||||||
|
(import ./gui/theme/options.nix { inherit user home; })
|
||||||
|
./gui/vscode/options.nix
|
||||||
|
];
|
||||||
|
}
|
@@ -13,8 +13,6 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ ./options.nix ];
|
|
||||||
|
|
||||||
programs.clipbook.enable = true;
|
programs.clipbook.enable = true;
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.bind =
|
wayland.windowManager.hyprland.settings.bind =
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ ./options.nix ];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = false;
|
systemd.enable = false;
|
||||||
|
@@ -17,8 +17,6 @@ in
|
|||||||
environment.persistence."/persist/state"."${home}/.config/theme" = { };
|
environment.persistence."/persist/state"."${home}/.config/theme" = { };
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ (import ./options.nix { inherit user home; }) ];
|
|
||||||
|
|
||||||
theme.enable = true;
|
theme.enable = true;
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
wayland.windowManager.hyprland.settings.bind = [
|
||||||
|
@@ -68,7 +68,7 @@ in
|
|||||||
|
|
||||||
configDir = mkOption {
|
configDir = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "${config.xdg.configHome}/theme";
|
default = "${home}/.config/theme";
|
||||||
description = "The path to the theme config directory.";
|
description = "The path to the theme config directory.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -17,8 +17,6 @@ in
|
|||||||
environment.persistence."/persist/state"."${home}/.config/Code" = { };
|
environment.persistence."/persist/state"."${home}/.config/Code" = { };
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
imports = [ ./options.nix ];
|
|
||||||
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mutableExtensionsDir = false;
|
mutableExtensionsDir = false;
|
||||||
|
@@ -5,16 +5,16 @@
|
|||||||
|
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/bluetooth
|
../common/configs/system/bluetooth
|
||||||
../common/configs/system/boot
|
../common/configs/system/boot
|
||||||
../common/configs/system/brightnessctl
|
../common/configs/system/brightnessctl
|
||||||
../common/configs/system/btrbk
|
../common/configs/system/btrbk
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
../common/configs/system/cloudflared
|
../common/configs/system/cloudflared
|
||||||
../common/configs/system/cpu
|
|
||||||
../common/configs/system/dnsmasq
|
../common/configs/system/dnsmasq
|
||||||
../common/configs/system/documentation
|
../common/configs/system/documentation
|
||||||
../common/configs/system/getty
|
../common/configs/system/getty
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/configs/user/options.nix
|
(import ../../../common/configs/user { inherit user home; })
|
||||||
|
|
||||||
(import ../../../common/configs/user/console/android { inherit user home; })
|
(import ../../../common/configs/user/console/android { inherit user home; })
|
||||||
(import ../../../common/configs/user/console/brightnessctl { inherit user home; })
|
(import ../../../common/configs/user/console/brightnessctl { inherit user home; })
|
||||||
|
@@ -3,15 +3,15 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/bluetooth
|
../common/configs/system/bluetooth
|
||||||
../common/configs/system/boot
|
../common/configs/system/boot
|
||||||
../common/configs/system/brightnessctl
|
../common/configs/system/brightnessctl
|
||||||
../common/configs/system/btrbk
|
../common/configs/system/btrbk
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
../common/configs/system/cpu
|
|
||||||
../common/configs/system/documentation
|
../common/configs/system/documentation
|
||||||
../common/configs/system/getty
|
../common/configs/system/getty
|
||||||
../common/configs/system/git
|
../common/configs/system/git
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/configs/user/options.nix
|
(import ../../../common/configs/user { inherit user home; })
|
||||||
|
|
||||||
(import ../../../common/configs/user/console/android { inherit user home; })
|
(import ../../../common/configs/user/console/android { inherit user home; })
|
||||||
(import ../../../common/configs/user/console/brightnessctl { inherit user home; })
|
(import ../../../common/configs/user/console/brightnessctl { inherit user home; })
|
||||||
|
@@ -3,9 +3,10 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/boot
|
../common/configs/system/boot
|
||||||
../common/configs/system/brightnessctl
|
../common/configs/system/brightnessctl
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/configs/user/options.nix
|
(import ../../../common/configs/user { inherit user home; })
|
||||||
|
|
||||||
(import ../../../common/configs/user/console/btop { inherit user home; })
|
(import ../../../common/configs/user/console/btop { inherit user home; })
|
||||||
(import ../../../common/configs/user/console/fastfetch { inherit user home; })
|
(import ../../../common/configs/user/console/fastfetch { inherit user home; })
|
||||||
|
@@ -3,9 +3,10 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
../common/configs/system/impermanence
|
../common/configs/system/impermanence
|
||||||
../common/configs/system/neovim
|
../common/configs/system/neovim
|
||||||
|
@@ -3,14 +3,14 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/boot
|
../common/configs/system/boot
|
||||||
../common/configs/system/brightnessctl
|
../common/configs/system/brightnessctl
|
||||||
../common/configs/system/btrbk
|
../common/configs/system/btrbk
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
../common/configs/system/cpu
|
|
||||||
../common/configs/system/documentation
|
../common/configs/system/documentation
|
||||||
../common/configs/system/git
|
../common/configs/system/git
|
||||||
../common/configs/system/impermanence
|
../common/configs/system/impermanence
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/configs/user/options.nix
|
(import ../../../common/configs/user { inherit user home; })
|
||||||
|
|
||||||
(import ../../../common/configs/user/console/btop { inherit user home; })
|
(import ../../../common/configs/user/console/btop { inherit user home; })
|
||||||
(import ../../../common/configs/user/console/dive { inherit user home; })
|
(import ../../../common/configs/user/console/dive { inherit user home; })
|
||||||
|
@@ -7,7 +7,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/configs/user/options.nix
|
(import ../../../common/configs/user { inherit user home; })
|
||||||
|
|
||||||
(import ../../../common/configs/user/console/home-manager { inherit user home; })
|
(import ../../../common/configs/user/console/home-manager { inherit user home; })
|
||||||
(import ../../../common/configs/user/console/neovim { inherit user home; })
|
(import ../../../common/configs/user/console/neovim { inherit user home; })
|
||||||
|
@@ -165,9 +165,10 @@ cat <<EOF > "./hosts/$host/default.nix"
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./format.nix
|
./format.nix
|
||||||
|
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
|
../common/configs/system
|
||||||
|
|
||||||
../common/configs/system/boot
|
../common/configs/system/boot
|
||||||
../common/configs/system/btrfs
|
../common/configs/system/btrfs
|
||||||
../common/configs/system/documentation
|
../common/configs/system/documentation
|
||||||
|
@@ -34,8 +34,6 @@
|
|||||||
docker-whoami = import ./docker/whoami { inherit pkgs; };
|
docker-whoami = import ./docker/whoami { inherit pkgs; };
|
||||||
docker-yq = import ./docker/yq { inherit pkgs; };
|
docker-yq = import ./docker/yq { inherit pkgs; };
|
||||||
|
|
||||||
go-mmproxy = import ./go-mmproxy { inherit pkgs; };
|
|
||||||
|
|
||||||
obsidian-plugin-better-word-count = import ./obsidian/plugins/better-word-count { inherit pkgs; };
|
obsidian-plugin-better-word-count = import ./obsidian/plugins/better-word-count { inherit pkgs; };
|
||||||
obsidian-plugin-dataview = import ./obsidian/plugins/dataview { inherit pkgs; };
|
obsidian-plugin-dataview = import ./obsidian/plugins/dataview { inherit pkgs; };
|
||||||
obsidian-plugin-excalidraw = import ./obsidian/plugins/excalidraw { inherit pkgs; };
|
obsidian-plugin-excalidraw = import ./obsidian/plugins/excalidraw { inherit pkgs; };
|
||||||
|
@@ -9,11 +9,12 @@ pkgs.dockerTools.buildImage {
|
|||||||
dockerTools.binSh
|
dockerTools.binSh
|
||||||
dockerTools.caCertificates
|
dockerTools.caCertificates
|
||||||
bashInteractive
|
bashInteractive
|
||||||
|
ncurses
|
||||||
coreutils
|
coreutils
|
||||||
gnugrep
|
gnugrep
|
||||||
findutils
|
findutils
|
||||||
|
iputils
|
||||||
curl
|
curl
|
||||||
ncurses
|
|
||||||
];
|
];
|
||||||
pathsToLink = [
|
pathsToLink = [
|
||||||
"/bin"
|
"/bin"
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
# AUTO-UPDATE: nix-update --flake --version=branch=master go-mmproxy
|
|
||||||
pkgs.buildGoModule rec {
|
|
||||||
pname = "go-mmproxy";
|
|
||||||
version = "2.1-unstable-2023-11-20";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "path-network";
|
|
||||||
repo = "go-mmproxy";
|
|
||||||
rev = "006247ca7ec618d2aff02052bac839ca769991a1";
|
|
||||||
hash = "sha256-sU0OYpJ0b/Fq5CzCA0TtC368LOyYCUkXt0pS4IEv8Ak=";
|
|
||||||
};
|
|
||||||
|
|
||||||
vendorHash = null;
|
|
||||||
}
|
|
Reference in New Issue
Block a user