diff --git a/docs/TODO.md b/docs/TODO.md index 0c6e3c3..d1cc3b8 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -3,21 +3,16 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Nixy - - [ ] Nixy script v2 (with nixosConfiguration's name variable) - - [ ] Installation script - - [ ] Themes - - [ ] Upload new wallpapers - - [ ] MacOS theme + - [ ] Installation script + - [ ] Themes + - [ ] Upload new wallpapers + - [ ] MacOS theme - [ ] Hyprland - [ ] Make hyprcursor work - - [ ] Animations based on app name - -- [ ] Homepage (web) v2 - - [ ] Manifest & favicon + - [ ] Animations based on app name (Is it possible?) - [ ] Nixvim - - [ ] Nerdfont pluggins to search and paste in the code - [ ] Telescope shortcut for file content - [ ] Markdown snippets - [ ] Make whichkey better @@ -25,8 +20,6 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Backup system for some folders ($home/dev, $home/pictures, ...) - [ ] Exclude file pattern (nodes modules, ...) -- [ ] Nextcloud exclude file pattern (nodes modules, ...) - - [ ] Automount USB Key (And notify-send when it's done) - [ ] Usb security for laptop & server, variable in variables.nix, disable for guest diff --git a/home/programs/qutebrowser/default.nix b/home/programs/qutebrowser/default.nix index 662084c..065a4cd 100644 --- a/home/programs/qutebrowser/default.nix +++ b/home/programs/qutebrowser/default.nix @@ -1,6 +1,78 @@ -{ config, ... }: { +{ pkgs, config, ... }: +let + settings = '' + { + "config": { + "title" : "Welcome Home", + "openLinksInNewTab": false, + "locale": "fr-FR", + "colors": { + "primary": "#${config.var.theme.colors.accent}", + "background": "#${config.var.theme.colors.bg}", + "foreground": "#${config.var.theme.colors.fg}", + "muted": "#${config.var.theme.colors.c8}" + }, + "folders": [ + { + "name": "Bookmarks", + "links": [ + {"title": "Github", "url": "https://github.com", "icon": ""}, + {"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""}, + {"title": "Cloudflare One", "url": "https://one.dash.cloudflare.com/", "icon": ""}, + {"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": ""}, + {"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""}, + {"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": ""}, + {"title": "Nerdfont", "url": "https://www.nerdfonts.com/cheat-sheet", "icon": ""}, + {"title": "Youtube", "url": "https://youtube.com", "icon": ""}, + {"title": "Server", "url": "https://home.anotherhadi.com", "icon": ""} + ] + }, + { + "name": "Work", + "links": [ + {"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": ""}, + {"title": "Office", "url": "https://www.office.com/?auth=2", "icon": ""}, + {"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": ""} + ] + } + ] + } + } + ''; - imports = [ ./duckduckgo-colorscheme.nix ./homepage ]; + homepage = pkgs.buildNpmPackage { + pname = "homepage"; + version = "0.0.0"; + + src = pkgs.fetchFromGitHub { + owner = "anotherhadi"; + repo = "homepage"; + rev = "19f56771ae7ac04e2710cbde763f70bb097eb250"; + hash = "sha256-8IzXcQ/hm2ZDzFKUL4B3501PoWoEOiKIN7rP2UrvG84="; + }; + + # npmDepsHash = lib.fakeHash; + npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4="; + + buildPhase = '' + npm install + cp ${ + pkgs.writeText "src/routes/config.json" settings + } src/routes/config.json + npm run build + mkdir $out + mv build $out + ''; + + meta = { + description = "homepage"; + homepage = "https://github.com/anotherhadi/homepage"; + }; + }; + +in { + + imports = [ ./duckduckgo-colorscheme.nix ]; programs.qutebrowser = { enable = true; @@ -18,8 +90,9 @@ }; quickmarks = { - home = "${config.var.homeDirectory}/.config/startpage/index.html"; - server = "${config.var.homeDirectory}/.config/serverpage/index.html"; + home = "${homepage}/build/index.html"; + server = "https://home.anotherhadi.com"; + jack = "https://home.anotherhadi.com"; mynixos = "https://mynixos.com"; github = "https://github.com"; outlook = "https://outlook.office.com/mail/"; @@ -38,10 +111,8 @@ settings = { url = { - default_page = - "${config.var.homeDirectory}/.config/startpage/index.html"; - start_pages = - [ "${config.var.homeDirectory}/.config/startpage/index.html" ]; + default_page = "${homepage}/build/index.html"; + start_pages = [ "${homepage}/build/index.html" ]; }; colors = { @@ -184,8 +255,8 @@ keyBindings = { normal = { - "gh" = "open ${config.var.homeDirectory}/.config/startpage/index.html"; - "gs" = "open ${config.var.homeDirectory}/.config/serverpage/index.html"; + "gh" = "open ${homepage}/build/index.html"; + "gs" = "open https://home.anotherhadi.com"; " p" = "tab-move -"; " n" = "tab-move +"; diff --git a/home/programs/qutebrowser/homepage/default.nix b/home/programs/qutebrowser/homepage/default.nix deleted file mode 100644 index ad35042..0000000 --- a/home/programs/qutebrowser/homepage/default.nix +++ /dev/null @@ -1,297 +0,0 @@ -{ config, ... }: -let - bookmarks = '' - Bookmarks: [ - {text: "MyNixOs", url: "https://mynixos.com", icon: ""}, - {text: "Github", url: "https://github.com", icon: ""}, - {text: "Proton", url: "https://mail.proton.me/u/0/inbox", icon: ""}, - {text: "Cloudflare One", url: "https://one.dash.cloudflare.com/", icon: ""}, - {text: "Chat GPT", url: "https://chat.openai.com/", icon: ""}, - {text: "Nixvim", url: "https://nix-community.github.io/nixvim/", icon: ""}, - {text: "Hyprland Wiki", url: "https://wiki.hyprland.org/", icon: ""}, - {text: "Nerdfont", url: "https://www.nerdfonts.com/cheat-sheet", icon: ""}, - {text: "Youtube", url: "https://youtube.com", icon: ""}, - ], - Home: [ - {text: "Casa", url: "http://192.168.2.16:8081/#/", icon: ""}, - {text: "Plex", url: "http://192.168.2.16:32400", icon: ""}, - {text: "Nextcloud", url: "http://192.168.2.16:10081", icon: ""}, - ], - Work: [ - {text: "Outlook", url: "https://outlook.office.com/mail/", icon: ""}, - {text: "Office", url: "https://www.office.com/?auth=2", icon: ""}, - {text: "Teams", url: "https://teams.microsoft.com/_", icon: ""}, - ], - ''; -in { - - xdg.configFile."startpage/index.html".text = '' - - - -
- - -