init for better maintainable versions and defaults
This commit is contained in:
parent
94cf4c2005
commit
0733f4d2d1
6 changed files with 52 additions and 24 deletions
|
@ -15,6 +15,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
email = {
|
email = {
|
||||||
|
enable = true;
|
||||||
domain = email-domain;
|
domain = email-domain;
|
||||||
ports = {
|
ports = {
|
||||||
smtp = 25;
|
smtp = 25;
|
||||||
|
@ -25,6 +26,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
website = {
|
website = {
|
||||||
|
enable = true;
|
||||||
domain = {
|
domain = {
|
||||||
full = web-domain;
|
full = web-domain;
|
||||||
base = web-domain;
|
base = web-domain;
|
||||||
|
@ -32,15 +34,16 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
fedi = {
|
fedi = {
|
||||||
|
enable = true;
|
||||||
domain = {
|
domain = {
|
||||||
full = "fedi.${web-domain}";
|
full = "fedi.${web-domain}";
|
||||||
base = web-domain;
|
base = web-domain;
|
||||||
};
|
};
|
||||||
email = "akkoma@${email-domain}";
|
email = "akkoma@${email-domain}";
|
||||||
# iceshrimp.enable = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
matrix = {
|
matrix = {
|
||||||
|
enable = true;
|
||||||
domain = {
|
domain = {
|
||||||
full = "matrix.${web-domain}";
|
full = "matrix.${web-domain}";
|
||||||
base = web-domain;
|
base = web-domain;
|
||||||
|
@ -50,6 +53,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
|
enable = true;
|
||||||
domain = {
|
domain = {
|
||||||
full = "git.${web-domain}";
|
full = "git.${web-domain}";
|
||||||
base = web-domain;
|
base = web-domain;
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{pkgs, ...}: let
|
{
|
||||||
getFrom = url: hash: name: {
|
runCommand,
|
||||||
gtk.enable = true;
|
fetchzip,
|
||||||
x11.enable = true;
|
name ? "BreezX-Rosepine-Cursor",
|
||||||
name = name;
|
version,
|
||||||
size = 24;
|
...
|
||||||
package = pkgs.runCommand "moveUp" {} ''
|
}:
|
||||||
mkdir -p $out/share/icons
|
runCommand "rosepine-cursor" {} ''
|
||||||
ln -s ${pkgs.fetchzip {
|
mkdir -p $out/share/icons
|
||||||
url = url;
|
ln -s ${fetchzip {
|
||||||
hash = hash;
|
url = "https://github.com/rose-pine/cursor/releases/download/${version.version}/BreezeX-RosePine-Linux.tar.xz";
|
||||||
}} $out/share/icons/${name}
|
hash = version.hash;
|
||||||
'';
|
}} $out/share/icons/${name}
|
||||||
};
|
''
|
||||||
in
|
|
||||||
getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux"
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf mkForce;
|
inherit (lib) mkIf mkForce;
|
||||||
inherit (config) conf;
|
inherit (config) conf versions;
|
||||||
time = pkgs.makeDesktopItem {
|
time = pkgs.makeDesktopItem {
|
||||||
name = "peaclock-desktop";
|
name = "peaclock-desktop";
|
||||||
desktopName = "Time";
|
desktopName = "Time";
|
||||||
|
@ -115,7 +115,16 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pointerCursor = import ./cursor.nix pkgs;
|
pointerCursor = rec {
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
name = "BreezX-RosePine-Linux";
|
||||||
|
size = 24;
|
||||||
|
package = pkgs.callPackage ./cursor.nix {
|
||||||
|
name = name;
|
||||||
|
version = versions.rosepine-cursor;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
|
|
10
options.nix
10
options.nix
|
@ -107,7 +107,7 @@ in {
|
||||||
email = {
|
email = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = conf.host == "server";
|
default = false;
|
||||||
};
|
};
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
|
@ -136,7 +136,7 @@ in {
|
||||||
website = {
|
website = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = conf.host == "server";
|
default = false;
|
||||||
};
|
};
|
||||||
domain = {
|
domain = {
|
||||||
full = mkOption {
|
full = mkOption {
|
||||||
|
@ -153,7 +153,7 @@ in {
|
||||||
fedi = {
|
fedi = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = conf.host == "server";
|
default = false;
|
||||||
};
|
};
|
||||||
iceshrimp = {
|
iceshrimp = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -180,7 +180,7 @@ in {
|
||||||
matrix = {
|
matrix = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = conf.host == "server";
|
default = false;
|
||||||
};
|
};
|
||||||
domain = {
|
domain = {
|
||||||
full = mkOption {
|
full = mkOption {
|
||||||
|
@ -201,7 +201,7 @@ in {
|
||||||
git = {
|
git = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = conf.host == "server";
|
default = false;
|
||||||
};
|
};
|
||||||
domain = {
|
domain = {
|
||||||
full = mkOption {
|
full = mkOption {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
modules = [
|
modules = [
|
||||||
./options.nix
|
./options.nix
|
||||||
|
./versions.nix
|
||||||
./modules
|
./modules
|
||||||
lix.nixosModules.default
|
lix.nixosModules.default
|
||||||
niri.nixosModules.niri
|
niri.nixosModules.niri
|
||||||
|
|
16
versions.nix
Normal file
16
versions.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
mkVersion = version:
|
||||||
|
lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = version;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
versions = {
|
||||||
|
rosepine-cursor = {
|
||||||
|
version = mkVersion "v1.0.1";
|
||||||
|
hash = mkVersion "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue