specialArgs

This commit is contained in:
joy 2024-11-08 18:23:40 +01:00
parent 7339260277
commit 6a88546f24
34 changed files with 403 additions and 347 deletions

View file

@ -1,5 +1,5 @@
{ {
outputs = { outputs = inputs @ {
self, self,
nixpkgs, nixpkgs,
nix-on-droid, nix-on-droid,
@ -8,10 +8,18 @@
home-manager, home-manager,
sops-nix, sops-nix,
... ...
} @ inputs: let }: let
username = "joy";
domain = "joygnu.org";
mail = "contact@joygnu.org";
systemConfig = {modules}: systemConfig = {modules}:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = {
inherit inputs;
inherit username;
inherit domain;
inherit mail;
};
modules = modules ++ [home-manager.nixosModules.default sops-nix.nixosModules.sops]; modules = modules ++ [home-manager.nixosModules.default sops-nix.nixosModules.sops];
}; };
in { in {

View file

@ -1,10 +1,12 @@
{ {username, ...}: {
networking.hostName = "laptop"; networking.hostName = "laptop";
led.enable = true; led.enable = true;
gnome.enable = true; gnome.enable = true;
home-manager.users.joy.code.enable = true; home-manager.users.${username} = {
home-manager.users.joy.hypridle.enable = true; code.enable = true;
hypridle.enable = true;
};
imports = [ imports = [
./hardware.nix ./hardware.nix

View file

@ -2,6 +2,7 @@
pkgs, pkgs,
lib, lib,
config, config,
username,
... ...
}: let }: let
customPkgs = customPkgs =
@ -24,7 +25,7 @@ in {
customPkgs.suyu customPkgs.suyu
]; ];
home-manager.users.joy.xdg = { home-manager.users.${username}.xdg = {
desktopEntries = { desktopEntries = {
suyu = { suyu = {
name = "Suyu"; name = "Suyu";

View file

@ -2,6 +2,7 @@
lib, lib,
config, config,
pkgs, pkgs,
username,
... ...
}: let }: let
customPkgs = customPkgs =
@ -25,7 +26,7 @@ in {
customPkgs.noriskclient customPkgs.noriskclient
]; ];
home-manager.users.joy.xdg = { home-manager.users.${username}.xdg = {
desktopEntries = { desktopEntries = {
NoRiskClient = { NoRiskClient = {
name = "NoRisk Client"; name = "NoRisk Client";

View file

@ -1,8 +1,24 @@
{inputs, ...}: { {
inputs,
username,
domain,
...
}: let
mail = {
a = "contact";
b = "mail";
c = "spyware";
};
in {
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {
inherit inputs;
inherit username;
inherit mail;
inherit domain;
};
users = { users = {
"joy" = import ./home.nix; "${username}" = import ./home.nix;
"root" = import ./root.nix; "root" = import ./root.nix;
}; };
}; };

View file

@ -1,8 +1,12 @@
{ {
mail,
username,
...
}: {
programs.git = { programs.git = {
enable = true; enable = true;
userEmail = "contact@joygnu.org"; userEmail = "${mail.a}";
userName = "joygnu"; userName = "${username}";
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";
}; };

View file

@ -1,33 +0,0 @@
{
accounts.email = {
maildirBasePath = ".local/share/mail";
accounts = {
"mail@joygnu.org" = {
primary = true;
address = "mail@joygnu.org";
userName = "mail";
realName = "Joy";
passwordCommand = "cat /run/secrets/mail";
imap.host = "mail.joygnu.org";
smtp.host = "mail.joygnu.org";
};
"spyware@joygnu.org" = {
address = "spyware@joygnu.org";
userName = "spyware";
realName = "Joy";
passwordCommand = "cat /run/secrets/spyware";
imap.host = "mail.joygnu.org";
smtp.host = "mail.joygnu.org";
};
"contact@joygnu.org" = {
address = "contact@joygnu.org";
userName = "contact";
realName = "Joy";
passwordCommand = "cat /run/secrets/contact";
imap.host = "mail.joygnu.org";
smtp.host = "mail.joygnu.org";
};
};
};
}

View file

@ -1,59 +1,207 @@
let {
muttrc = builtins.readFile (./. + "/muttrc"); username,
in { mail,
accounts.email.accounts = { domain,
"mail@joygnu.org" = { ...
imap.port = 993; }: {
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
"spyware@joygnu.org" = {
imap.port = 993;
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
"contact@joygnu.org" = {
imap.port = 993;
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
};
programs.mbsync = { programs.mbsync = {
enable = true; enable = true;
}; };
accounts.email = {
maildirBasePath = ".local/share/mail";
accounts = {
"${mail.a}@${domain}" = {
address = "${mail.a}@${domain}";
userName = "${mail.a}";
realName = "${username}";
passwordCommand = "cat /run/secrets/contact";
imap.host = "mail.${domain}";
smtp.host = "mail.${domain}";
imap.port = 993;
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
"${mail.b}@${domain}" = {
primary = true;
address = "${mail.b}@${domain}";
userName = "${mail.b}";
realName = "${username}";
passwordCommand = "cat /run/secrets/mail";
imap.host = "mail.${domain}";
smtp.host = "mail.${domain}";
imap.port = 993;
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
"${mail.c}@${domain}" = {
address = "${mail.c}@${domain}";
userName = "${mail.c}";
realName = "${username}";
passwordCommand = "cat /run/secrets/spyware";
imap.host = "mail.${domain}";
smtp.host = "mail.${domain}";
imap.port = 993;
mbsync.enable = true;
mbsync.create = "both";
neomutt = {
enable = true;
extraMailboxes = [
{mailbox = "Sent";}
{mailbox = "Junk";}
{mailbox = "Trash";}
{mailbox = "Drafts";}
];
};
};
};
};
programs.neomutt = { programs.neomutt = {
enable = true; enable = true;
editor = "hx"; editor = "hx";
extraConfig = muttrc; extraConfig = '' bind index i noop
}; bind pager i noop
macro index,pager i1 '<sync-mailbox><enter-command>source /home/${username}/.config/neomutt/${mail.a}@${domain}<enter><change-folder>!<enter>;<check-stats>' "switch to ${mail.a}@${domain}"
macro index,pager i2 '<sync-mailbox><enter-command>source /home/${username}/.config/neomutt/${mail.b}@${domain}<enter><change-folder>!<enter>;<check-stats>' "switch to ${mail.b}@${domain}"
macro index,pager i3 '<sync-mailbox><enter-command>source /home/${username}/.config/neomutt/${mail.c}@${domain}<enter><change-folder>!<enter>;<check-stats>' "switch to ${mail.c}@${domain}"
imports = [./accounts.nix]; # Sidebar mappings
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats
set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
color normal white black
color error brightwhite default
color status white brightblack
color sidebar_highlight blue default
# Default index colors
color index white black '.*'
color index_author blue default '.*'
color index_number blue default
color index_subject white default '.*'
# New mail
color index brightwhite brightblack "~N"
color index_author brightblue brightblack "~N"
color index_subject brightwhite brightblack "~N"
# Tagged mail
color index brightwhite blue "~T"
color index_author brightblue blue "~T"
color index_subject brightwhite blue "~T"
# Other colors and aesthetic settings
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color indicator brightblack white
color sidebar_divider brightblack black
color sidebar_flagged blue black
color sidebar_new white black
color normal white default
color message cyan default
color markers brightwhite white
color attachment white default
color search cyan default
color hdrdefault brightgreen default
# Quoted text
color quoted white default
color quoted1 blue default
color quoted2 cyan default
color quoted3 brightwhite default
color quoted4 brightblue default
color quoted5 brightcyan default
# Signature
color signature brightgreen default
# Bold and Underline
color bold black default
color underline black default
bind index,pager g noop
bind index \Cf noop
bind index,pager M noop
bind index,pager C noop
# General rebindings
bind index gg first-entry
bind index j next-entry
bind index k previous-entry
bind attach <return> view-mailcap
bind attach l view-mailcap
bind index G last-entry
bind index gg first-entry
bind pager,attach h exit
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
bind index D delete-message
bind index U undelete-message
bind index L limit
bind index h noop
bind index l display-message
bind index,query <space> tag-entry
#bind browser h goto-parent
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
bind index,pager H view-raw-message
bind browser l select-entry
bind pager,browser gg top-page
bind pager,browser G bottom-page
bind index,pager,browser d half-down
bind index,pager,browser u half-up
bind index,pager S sync-mailbox
bind index,pager R group-reply
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
macro index,pager Mi ";<save-message>=Inbox<enter>" "move mail to inbox"
macro index,pager Ci ";<copy-message>=Inbox<enter>" "copy mail to inbox"
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive"
macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive"'';
};
} }

View file

@ -1,125 +0,0 @@
bind index i noop
bind pager i noop
macro index,pager i1 '<sync-mailbox><enter-command>source /home/joy/.config/neomutt/contact@joygnu.org<enter><change-folder>!<enter>;<check-stats>' "switch to contact@joygnu.org"
macro index,pager i2 '<sync-mailbox><enter-command>source /home/joy/.config/neomutt/mail@joygnu.org<enter><change-folder>!<enter>;<check-stats>' "switch to mail@joygnu.org"
macro index,pager i3 '<sync-mailbox><enter-command>source /home/joy/.config/neomutt/spyware@joygnu.org<enter><change-folder>!<enter>;<check-stats>' "switch to spyware@joygnu.org"
# Sidebar mappings
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats
set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?'
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
color normal white black
color error brightwhite default
color status white brightblack
color sidebar_highlight blue default
# Default index colors
color index white black '.*'
color index_author blue default '.*'
color index_number blue default
color index_subject white default '.*'
# New mail
color index brightwhite brightblack "~N"
color index_author brightblue brightblack "~N"
color index_subject brightwhite brightblack "~N"
# Tagged mail
color index brightwhite blue "~T"
color index_author brightblue blue "~T"
color index_subject brightwhite blue "~T"
# Other colors and aesthetic settings
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color indicator brightblack white
color sidebar_divider brightblack black
color sidebar_flagged blue black
color sidebar_new white black
color normal white default
color message cyan default
color markers brightwhite white
color attachment white default
color search cyan default
color hdrdefault brightgreen default
# Quoted text
color quoted white default
color quoted1 blue default
color quoted2 cyan default
color quoted3 brightwhite default
color quoted4 brightblue default
color quoted5 brightcyan default
# Signature
color signature brightgreen default
# Bold and Underline
color bold black default
color underline black default
bind index,pager g noop
bind index \Cf noop
bind index,pager M noop
bind index,pager C noop
# General rebindings
bind index gg first-entry
bind index j next-entry
bind index k previous-entry
bind attach <return> view-mailcap
bind attach l view-mailcap
bind index G last-entry
bind index gg first-entry
bind pager,attach h exit
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
bind index D delete-message
bind index U undelete-message
bind index L limit
bind index h noop
bind index l display-message
bind index,query <space> tag-entry
#bind browser h goto-parent
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
bind index,pager H view-raw-message
bind browser l select-entry
bind pager,browser gg top-page
bind pager,browser G bottom-page
bind index,pager,browser d half-down
bind index,pager,browser u half-up
bind index,pager S sync-mailbox
bind index,pager R group-reply
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
macro index,pager Mi ";<save-message>=Inbox<enter>" "move mail to inbox"
macro index,pager Ci ";<copy-message>=Inbox<enter>" "copy mail to inbox"
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive"
macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive"

View file

@ -1,127 +1,127 @@
{ {domain, ...}: {
programs.newsboat = { programs.newsboat = {
enable = true; enable = true;
browser = "firefox"; browser = "firefox";
urls = [ urls = [
{ {
url = "https://yt.joygnu.org/feed/channel/UCOSqzSTg4QZXdi7jvV-9rUg"; url = "https://yt.${domain}/feed/channel/UCOSqzSTg4QZXdi7jvV-9rUg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ"; url = "https://yt.${domain}/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCYAg4bYdyqENxEyHUX7t1FA"; url = "https://yt.${domain}/feed/channel/UCYAg4bYdyqENxEyHUX7t1FA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCVls1GmFKf6WlTraIb_IaJg"; url = "https://yt.${domain}/feed/channel/UCVls1GmFKf6WlTraIb_IaJg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC5KDiSAFxrDWhmysBcNqtMA"; url = "https://yt.${domain}/feed/channel/UC5KDiSAFxrDWhmysBcNqtMA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCcBhwZNKqmPaw3Zk7mh6eBg"; url = "https://yt.${domain}/feed/channel/UCcBhwZNKqmPaw3Zk7mh6eBg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCwnqDLYzLGPbghL9uIOwMnQ"; url = "https://yt.${domain}/feed/channel/UCwnqDLYzLGPbghL9uIOwMnQ";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCRSxdcWjoye7ohD_ibxzYhg"; url = "https://yt.${domain}/feed/channel/UCRSxdcWjoye7ohD_ibxzYhg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UChIs72whgZI9w6d6FhwGGHA"; url = "https://yt.${domain}/feed/channel/UChIs72whgZI9w6d6FhwGGHA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCxdZ7XCQVMRMipj3gGemQfw"; url = "https://yt.${domain}/feed/channel/UCxdZ7XCQVMRMipj3gGemQfw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC0L2SuL6AK_xtmx82hbqcTw"; url = "https://yt.${domain}/feed/channel/UC0L2SuL6AK_xtmx82hbqcTw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCE_K_gW6ReBi4H3Gp0gi-hg"; url = "https://yt.${domain}/feed/channel/UCE_K_gW6ReBi4H3Gp0gi-hg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCWRHrWUsjdF86dt7NKK2Ixw"; url = "https://yt.${domain}/feed/channel/UCWRHrWUsjdF86dt7NKK2Ixw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCfeNmPbGRF6dkPt04HIl25A"; url = "https://yt.${domain}/feed/channel/UCfeNmPbGRF6dkPt04HIl25A";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCFzUEe9XUlkDLp6AmtNzmOA"; url = "https://yt.${domain}/feed/channel/UCFzUEe9XUlkDLp6AmtNzmOA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCxBfQGaMuiMyw1dgW-tpZbg"; url = "https://yt.${domain}/feed/channel/UCxBfQGaMuiMyw1dgW-tpZbg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCpes6DXY4XCSA8s9Q1G9ocg"; url = "https://yt.${domain}/feed/channel/UCpes6DXY4XCSA8s9Q1G9ocg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCR42P1Uub9py2H5RkdcTnWA"; url = "https://yt.${domain}/feed/channel/UCR42P1Uub9py2H5RkdcTnWA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCtwjD3551TskyUxnfaUw7Rg"; url = "https://yt.${domain}/feed/channel/UCtwjD3551TskyUxnfaUw7Rg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCZpKTYOk5WAdCyMal3J1KHg"; url = "https://yt.${domain}/feed/channel/UCZpKTYOk5WAdCyMal3J1KHg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w"; url = "https://yt.${domain}/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC2eYFnH61tmytImy1mTYvhA"; url = "https://yt.${domain}/feed/channel/UC2eYFnH61tmytImy1mTYvhA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA"; url = "https://yt.${domain}/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC0sUzmZ0CHvVCVrpRfGKZfw"; url = "https://yt.${domain}/feed/channel/UC0sUzmZ0CHvVCVrpRfGKZfw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCFFfGA991VRR4U8FNNs72Qg"; url = "https://yt.${domain}/feed/channel/UCFFfGA991VRR4U8FNNs72Qg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCIS-e4W5wK2xG6NbI5Tdm_g"; url = "https://yt.${domain}/feed/channel/UCIS-e4W5wK2xG6NbI5Tdm_g";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCKmEAsezQ0kUQ6EC-BtBNbg"; url = "https://yt.${domain}/feed/channel/UCKmEAsezQ0kUQ6EC-BtBNbg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCgj6MvuVmp0JVanAZkFQM5A"; url = "https://yt.${domain}/feed/channel/UCgj6MvuVmp0JVanAZkFQM5A";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCXQZRyhGN-1F8zwD0a8QuWA"; url = "https://yt.${domain}/feed/channel/UCXQZRyhGN-1F8zwD0a8QuWA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCohllq0Pk5lQuuNANabHKcg"; url = "https://yt.${domain}/feed/channel/UCohllq0Pk5lQuuNANabHKcg";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCUKU3fl8z2rcK7GBdocd7Ww"; url = "https://yt.${domain}/feed/channel/UCUKU3fl8z2rcK7GBdocd7Ww";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCO57urWt8_T63SPFCA_QmNw"; url = "https://yt.${domain}/feed/channel/UCO57urWt8_T63SPFCA_QmNw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCE972BOwKeCHsgfKV3NxEZA"; url = "https://yt.${domain}/feed/channel/UCE972BOwKeCHsgfKV3NxEZA";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ"; url = "https://yt.${domain}/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC8ENHE5xdFSwx71u3fDH5Xw"; url = "https://yt.${domain}/feed/channel/UC8ENHE5xdFSwx71u3fDH5Xw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCMXLdjrQi4JzY0NNvCdUEUQ"; url = "https://yt.${domain}/feed/channel/UCMXLdjrQi4JzY0NNvCdUEUQ";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UCEKtvLc3EIS0T7shmgPbVrw"; url = "https://yt.${domain}/feed/channel/UCEKtvLc3EIS0T7shmgPbVrw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UC_zBdZ0_H_jn41FDRG7q4Tw"; url = "https://yt.${domain}/feed/channel/UC_zBdZ0_H_jn41FDRG7q4Tw";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UChuDUAo3Hfr_0dn54GpwdUQ"; url = "https://yt.${domain}/feed/channel/UChuDUAo3Hfr_0dn54GpwdUQ";
} }
{ {
url = "https://yt.joygnu.org/feed/channel/UClonyx8pReBvkjropmrS6jQ"; url = "https://yt.${domain}/feed/channel/UClonyx8pReBvkjropmrS6jQ";
} }
]; ];
extraConfig = '' extraConfig = ''

View file

@ -1,4 +1,9 @@
{pkgs, ...}: { {
pkgs,
domain,
username,
...
}: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
@ -15,7 +20,7 @@
cat = "bat"; cat = "bat";
lg = "${pkgs.lazygit}/bin/lazygit"; lg = "${pkgs.lazygit}/bin/lazygit";
rs = "z ~ && ssh root@45.145.42.193"; rs = "z ~ && ssh root@45.145.42.193";
hs = "z ~ && ssh joy@joygnu.org"; hs = "z ~ && ssh ${username}@${domain}";
su = "z ~ && su"; su = "z ~ && su";
ip = "sh ~/nix/modules/programs/zsh/scripts/ip.sh"; ip = "sh ~/nix/modules/programs/zsh/scripts/ip.sh";
rb = "sh ~/nix/modules/programs/zsh/scripts/rebuild.sh"; rb = "sh ~/nix/modules/programs/zsh/scripts/rebuild.sh";

View file

@ -1,16 +1,16 @@
{ {username, ...}: {
sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFile = ./secrets.yaml;
sops.defaultSopsFormat = "yaml"; sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/joy/.config/age/keys.txt"; sops.age.keyFile = "/home/${username}/.config/age/keys.txt";
sops.secrets.mail = { sops.secrets.mail = {
owner = "joy"; owner = username;
}; };
sops.secrets.spyware = { sops.secrets.spyware = {
owner = "joy"; owner = username;
}; };
sops.secrets.contact = { sops.secrets.contact = {
owner = "joy"; owner = username;
}; };
} }

View file

@ -1,5 +1,5 @@
{ {username, ...}: {
virtualisation.docker.rootless.enable = true; virtualisation.docker.rootless.enable = true;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.users.joy.extraGroups = ["docker"]; users.users.${username}.extraGroups = ["docker"];
} }

View file

@ -1,4 +1,8 @@
{config, ...}: let {
config,
domain,
...
}: let
cfg = config.services.forgejo; cfg = config.services.forgejo;
srv = cfg.settings.server; srv = cfg.settings.server;
in { in {
@ -18,7 +22,7 @@ in {
lfs.enable = true; lfs.enable = true;
settings = { settings = {
server = { server = {
DOMAIN = "git.joygnu.org"; DOMAIN = "git.${domain}";
ROOT_URL = "https://${srv.DOMAIN}/"; ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 2000; HTTP_PORT = 2000;
}; };

View file

@ -1,6 +1,6 @@
{ {domain, ...}: {
services.nginx = { services.nginx = {
virtualHosts."immich.joygnu.org" = { virtualHosts."immich.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
extraConfig = '' extraConfig = ''

View file

@ -1,4 +1,8 @@
{ {
domain,
mail,
...
}: {
services.invidious = { services.invidious = {
enable = true; enable = true;
settings = { settings = {
@ -8,8 +12,8 @@
}; };
}; };
}; };
services.invidious.domain = "yt.joygnu.org"; services.invidious.domain = "yt.${domain}";
services.invidious.nginx.enable = true; services.invidious.nginx.enable = true;
security.acme.defaults.email = "contact@joygnu.org"; security.acme.defaults.email = "${mail}";
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
} }

View file

@ -1,42 +1,39 @@
{ {domain, ...}: {
services.nginx = { services.nginx = {
virtualHosts."xn--xck.xyz" = { virtualHosts."xn--xck.xyz" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "/var/www/www.joygnu.org"; root = "/var/www/${domain}";
}; };
virtualHosts."joygnu.org" = { virtualHosts."${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "/var/www/www.joygnu.org"; root = "/var/www/www.${domain}";
}; };
virtualHosts."www.joygnu.org" = { virtualHosts."www.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "/var/www/www.joygnu.org"; root = "/var/www/${domain}";
}; };
virtualHosts."4get.joygnu.org" = { virtualHosts."4get.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".proxyPass = "http://localhost:8080"; locations."/".proxyPass = "http://localhost:8080";
}; };
virtualHosts."pin.joygnu.org" = { virtualHosts."pin.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".proxyPass = "http://localhost:6060"; locations."/".proxyPass = "http://localhost:6060";
}; };
virtualHosts."trans.joygnu.org" = { virtualHosts."trans.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".proxyPass = "http://localhost:5000"; locations."/".proxyPass = "http://localhost:5000";
}; };
virtualHosts."wallpapers.joygnu.org" = { virtualHosts."wallpapers.${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "/var/www/wallpapers.joygnu.org"; root = "/var/www/${domain}";
}; };
}; };
security.acme.certs = {
"www.joygnu.org".email = "contact@joygnu.org";
};
} }

View file

@ -1,4 +1,4 @@
{ {username, ...}: {
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
@ -7,7 +7,7 @@
}; };
}; };
users.users.joy = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8FnfVKPbbzPmZ3L0KuSMc8GD42rkIoIMay3c/r9zGkMBwRyluwP7OBR7SaTlp/w7iPHom3YwhGYa37HOXp/icSEMvFlYsCQOXWPkf7cNqyhEnycRsMojpKP2a6qxvcnuuCLY+xMwtlsX1h4nJFpsWHb2A62qBgdaOVrBlbVGd2ZuVCgiB+eenVagW3EFAO9jK5r6rSFciND7EMxBKfi6DbRma6UCejwGjpU0AHCZDikw5XKFhLUDbhdb9e02gyQxD5cs4Q2CuZ1PVt+Jb1GwHVnfh3wdEz5v7TWF+RUv85JXlRLrIYd2SEDpA6yvQIIT4YR2Bb1Tc/aC+zTdUdP+HMiBI32GGyplMfrE1dbj3quTfGN6cJ0TfPFOx7K+0N108fM7mehPtGT/uyB9nnMyYeLO45cgA1wMZZcT4egSvnnqe+6NO7j+zR0whl8+SbIru7HUK2Oa67SzxotQ7D8F27rx02Ie4UJqwbPsZGrxL7TlvNKUXQ4mOINkyE79tIshWncO71O6vJWzaoeYiye0mxc0AP3vYozdV3MgN34+5zscb/o4pwOQtthin8Nf1Y6o6H0poUz5YXYBdEKK/O0Wz3kxT6i/oZWZG7a18xCCKYnF1Jgdr7mfxkizLMkRqYsgM9CS0e0KoVJhu78TmMz8Eip9za1ncvGg3w1ZW6VG/6w==" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8FnfVKPbbzPmZ3L0KuSMc8GD42rkIoIMay3c/r9zGkMBwRyluwP7OBR7SaTlp/w7iPHom3YwhGYa37HOXp/icSEMvFlYsCQOXWPkf7cNqyhEnycRsMojpKP2a6qxvcnuuCLY+xMwtlsX1h4nJFpsWHb2A62qBgdaOVrBlbVGd2ZuVCgiB+eenVagW3EFAO9jK5r6rSFciND7EMxBKfi6DbRma6UCejwGjpU0AHCZDikw5XKFhLUDbhdb9e02gyQxD5cs4Q2CuZ1PVt+Jb1GwHVnfh3wdEz5v7TWF+RUv85JXlRLrIYd2SEDpA6yvQIIT4YR2Bb1Tc/aC+zTdUdP+HMiBI32GGyplMfrE1dbj3quTfGN6cJ0TfPFOx7K+0N108fM7mehPtGT/uyB9nnMyYeLO45cgA1wMZZcT4egSvnnqe+6NO7j+zR0whl8+SbIru7HUK2Oa67SzxotQ7D8F27rx02Ie4UJqwbPsZGrxL7TlvNKUXQ4mOINkyE79tIshWncO71O6vJWzaoeYiye0mxc0AP3vYozdV3MgN34+5zscb/o4pwOQtthin8Nf1Y6o6H0poUz5YXYBdEKK/O0Wz3kxT6i/oZWZG7a18xCCKYnF1Jgdr7mfxkizLMkRqYsgM9CS0e0KoVJhu78TmMz8Eip9za1ncvGg3w1ZW6VG/6w=="

View file

@ -1,10 +1,14 @@
{ {
username,
domain,
...
}: {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
dataDir = "/home/joy"; dataDir = "/home/${username}";
openDefaultPorts = true; openDefaultPorts = true;
configDir = "/home/joy/.config/syncthing"; configDir = "/home/${username}/.config/syncthing";
user = "joy"; user = username;
group = "users"; group = "users";
guiAddress = "0.0.0.0:8384"; guiAddress = "0.0.0.0:8384";
}; };
@ -12,7 +16,7 @@
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts."sync.joygnu.org" = { virtualHosts."sync.${domain}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -1,7 +1,11 @@
{pkgs, ...}: { {
pkgs,
username,
...
}: {
programs.dconf.enable = true; programs.dconf.enable = true;
users.users.joy.extraGroups = ["libvirtd"]; users.users.${username}.extraGroups = ["libvirtd"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
virt-manager virt-manager

View file

@ -1,9 +1,9 @@
{ {username, ...}: {
security.doas.enable = true; security.doas.enable = true;
security.sudo.enable = false; security.sudo.enable = false;
security.doas.extraRules = [ security.doas.extraRules = [
{ {
users = ["joy"]; users = [username];
keepEnv = true; keepEnv = true;
persist = true; persist = true;
} }

View file

@ -1,11 +1,11 @@
{ {username, ...}: {
home-manager = { home-manager = {
backupFileExtension = "bkp"; backupFileExtension = "bkp";
users.joy = { users.${username} = {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home = { home = {
username = "joy"; username = username;
homeDirectory = "/home/joy"; homeDirectory = "/home/" + username;
stateVersion = "23.11"; stateVersion = "23.11";
}; };
}; };

View file

@ -1,7 +1,7 @@
{ {username, ...}: {
users.users.joy = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
description = "joy"; description = username;
extraGroups = ["wheel" "networkmanager"]; extraGroups = ["wheel" "networkmanager"];
}; };
} }

View file

@ -1,16 +1,25 @@
{inputs, ...}: { {
inputs,
username,
domain,
...
}: {
imports = [ imports = [
./hyprland
./theme
./gnome
./polkit
./syncthing
./gdm ./gdm
./gnome
./hyprland
./polkit
./stylix
./syncthing
]; ];
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {
inherit inputs;
inherit username;
inherit domain;
};
users = { users = {
"joy" = import ./home; "${username}" = import ./home;
}; };
}; };
} }

View file

@ -1,9 +1,9 @@
{ {username, ...}: {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "joy"; services.displayManager.autoLogin.user = username;
systemd.services."getty@tty1".enable = false; systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false; systemd.services."autovt@tty1".enable = false;

View file

@ -11,5 +11,7 @@
./hypridle ./hypridle
./dunst ./dunst
./misc ./misc
./qt
./gtk
]; ];
} }

View file

@ -1,9 +1,14 @@
{inputs, ...}: let {
inputs,
username,
domain,
...
}: let
userChrome = builtins.readFile (./. + "/userChrome"); userChrome = builtins.readFile (./. + "/userChrome");
in { in {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.joy = { profiles.${username} = {
userChrome = userChrome; userChrome = userChrome;
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [ extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
ublock-origin ublock-origin
@ -19,7 +24,7 @@ in {
"4get" = { "4get" = {
urls = [ urls = [
{ {
template = "https://4get.joygnu.org/web"; template = "https://4get.${domain}/web";
params = [ params = [
{ {
name = "s"; name = "s";
@ -57,19 +62,23 @@ in {
} }
{ {
name = "Git"; name = "Git";
url = "https://git.joygnu.org/"; url = "https://git.${domain}/";
} }
{ {
name = "Syncserver"; name = "Syncserver";
url = "https://sync.joygnu.org/"; url = "https://sync.${domain}/";
} }
{ {
name = "Photos"; name = "Photos";
url = "https://immich.joygnu.org/"; url = "https://immich.${domain}/";
} }
{ {
name = "Translate"; name = "Translate";
url = "https://trans.joygnu.org/"; url = "https://trans.${domain}/";
}
{
name = "invidious";
url = "https://yt.${domain}/";
} }
{ {
name = "Server"; name = "Server";
@ -107,10 +116,6 @@ in {
name = "Syncthing"; name = "Syncthing";
url = "http://localhost:8384/"; url = "http://localhost:8384/";
} }
{
name = "invidious";
url = "https://yt.joygnu.org/";
}
]; ];
} }
]; ];

View file

@ -1,11 +1,11 @@
{pkgs, ...}: let {pkgs, ...}: let
gruvboxPlus = import ./gruvbox-plus.nix {inherit pkgs;}; gruvboxPlus = import ./gruvbox-plus.nix {inherit pkgs;};
in { in {
home-manager.users.joy.home.file = { home.file = {
".local/share/icons/GruvboxPlus".source = "${gruvboxPlus}"; ".local/share/icons/GruvboxPlus".source = "${gruvboxPlus}";
}; };
home-manager.users.joy.gtk = { gtk = {
enable = true; enable = true;
iconTheme.package = gruvboxPlus; iconTheme.package = gruvboxPlus;
iconTheme.name = "GruvboxPlus"; iconTheme.name = "GruvboxPlus";

View file

@ -1,5 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
home-manager.users.joy.qt = { qt = {
enable = true; enable = true;
style.name = "adwaita-dark"; style.name = "adwaita-dark";
style.package = pkgs.adwaita-qt; style.package = pkgs.adwaita-qt;

View file

@ -1,9 +1,13 @@
{pkgs, ...}: { {
pkgs,
username,
...
}: {
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
}; };
home-manager.users.joy = { home-manager.users.${username} = {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
inputs, inputs,
username,
... ...
}: let }: let
backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png";
@ -55,6 +56,8 @@ in {
}; };
}; };
}; };
home-manager.users.joy.stylix.targets.foot.enable = false; home-manager.users.${username}.stylix.targets = {
home-manager.users.joy.stylix.targets.hyprland.enable = false; foot.enable = false;
hyprland.enable = false;
};
} }

View file

@ -1,10 +1,10 @@
{ {username, ...}: {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
dataDir = "/home/joy"; dataDir = "/home/${username}";
openDefaultPorts = true; openDefaultPorts = true;
configDir = "/home/joy/.config/syncthing"; configDir = "/home/${username}/.config/syncthing";
user = "joy"; user = username;
group = "users"; group = "users";
}; };
} }

View file

@ -1,7 +0,0 @@
{
imports = [
./stylix
./gtk
./qt
];
}