From d559ce2f1c970201d143ec9d21bb0816c0f99009 Mon Sep 17 00:00:00 2001 From: joy Date: Fri, 4 Oct 2024 22:32:42 +0200 Subject: [PATCH] lol home --- hosts/phone/default.nix | 2 +- hosts/phone/home/default.nix | 7 ------- hosts/phone/home/git/default.nix | 7 ------- hosts/phone/home/helix/default.nix | 14 -------------- hosts/phone/home/zsh/default.nix | 20 -------------------- hosts/phone/home/zsh/push.sh | 25 ------------------------- modules/apps/default.nix | 10 ++++++++-- modules/apps/home/alacritty/default.nix | 2 +- modules/apps/home/code/default.nix | 2 +- modules/apps/home/firefox/default.nix | 10 +++------- modules/apps/home/git/default.nix | 2 +- modules/apps/home/helix/default.nix | 4 ++-- modules/apps/home/mpv/default.nix | 2 +- modules/apps/home/newsboat/default.nix | 2 +- modules/apps/home/rofi/default.nix | 2 +- modules/apps/home/zsh/default.nix | 4 +--- modules/system/misc/default.nix | 3 +++ 17 files changed, 24 insertions(+), 94 deletions(-) delete mode 100644 hosts/phone/home/default.nix delete mode 100644 hosts/phone/home/git/default.nix delete mode 100644 hosts/phone/home/helix/default.nix delete mode 100644 hosts/phone/home/zsh/default.nix delete mode 100755 hosts/phone/home/zsh/push.sh diff --git a/hosts/phone/default.nix b/hosts/phone/default.nix index e028d41..01928f3 100644 --- a/hosts/phone/default.nix +++ b/hosts/phone/default.nix @@ -44,7 +44,7 @@ home.stateVersion = "24.05"; imports = [ - ./home + ../../modules/apps/home ]; }; diff --git a/hosts/phone/home/default.nix b/hosts/phone/home/default.nix deleted file mode 100644 index 21085b1..0000000 --- a/hosts/phone/home/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./zsh - ./git - ./helix - ]; -} diff --git a/hosts/phone/home/git/default.nix b/hosts/phone/home/git/default.nix deleted file mode 100644 index 72006fd..0000000 --- a/hosts/phone/home/git/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - programs.git = { - enable = true; - userEmail = "mail@joygnu.org"; - userName = "joy"; - }; -} diff --git a/hosts/phone/home/helix/default.nix b/hosts/phone/home/helix/default.nix deleted file mode 100644 index b6c5898..0000000 --- a/hosts/phone/home/helix/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - programs.helix = { - enable = true; - defaultEditor = true; - settings = { - theme = "gruvbox"; - keys.normal = { - space.space = "file_picker"; - Z.Z = ":wq"; - Z.Q = ":q!"; - }; - }; - }; -} diff --git a/hosts/phone/home/zsh/default.nix b/hosts/phone/home/zsh/default.nix deleted file mode 100644 index b4841bb..0000000 --- a/hosts/phone/home/zsh/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - programs.zsh = { - enable = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - historySubstringSearch.enable = true; - dotDir = ".config/zsh"; - initExtra = "PROMPT='%F{green}%~%f '"; - - shellAliases = { - v = "hx"; - ser = "ssh root@joygnu.org"; - rb = "nix-on-droid switch --flake ~/nix"; - ep = "hx ~/.config/nix-on-droid/nix-on-droid.nix"; - }; - - history.size = 1000000; - history.path = ".config/zsh/history"; - }; -} diff --git a/hosts/phone/home/zsh/push.sh b/hosts/phone/home/zsh/push.sh deleted file mode 100755 index 49d581c..0000000 --- a/hosts/phone/home/zsh/push.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Function to push to all remotes -push_to_all_remotes() { - # Get a list of all remotes - remotes=$(git remote) - - # Check if there are no remotes - if [ -z "$remotes" ]; then - echo "No remotes found." - exit 1 - fi - - # Loop through each remote and push - for remote in $remotes; do - echo "Pushing to remote '$remote'..." - git push "$remote" --all - git push "$remote" --tags - echo "Push to remote '$remote' completed." - done -} - -# Execute the function -push_to_all_remotes - diff --git a/modules/apps/default.nix b/modules/apps/default.nix index c450b23..7de5b20 100644 --- a/modules/apps/default.nix +++ b/modules/apps/default.nix @@ -1,6 +1,12 @@ -{ +{inputs, ...}: { + home-manager = { + extraSpecialArgs = {inherit inputs;}; + users = { + "joy" = import ./home; + }; + }; + imports = [ - ./home ./norm ]; } diff --git a/modules/apps/home/alacritty/default.nix b/modules/apps/home/alacritty/default.nix index 5623a4a..3324190 100644 --- a/modules/apps/home/alacritty/default.nix +++ b/modules/apps/home/alacritty/default.nix @@ -1,5 +1,5 @@ {lib, ...}: { - home-manager.users.joy.programs.alacritty = { + programs.alacritty = { enable = true; settings = { window = { diff --git a/modules/apps/home/code/default.nix b/modules/apps/home/code/default.nix index 3c4b086..98f13b3 100644 --- a/modules/apps/home/code/default.nix +++ b/modules/apps/home/code/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - home-manager.users.joy.programs.vscode = { + programs.vscode = { enable = true; package = pkgs.vscodium; extensions = with pkgs.vscode-extensions; [ diff --git a/modules/apps/home/firefox/default.nix b/modules/apps/home/firefox/default.nix index bdaf11f..4beb14d 100644 --- a/modules/apps/home/firefox/default.nix +++ b/modules/apps/home/firefox/default.nix @@ -1,13 +1,10 @@ -{inputs,...}: -let +{inputs, ...}: let userChrome = builtins.readFile (./. + "/userChrome"); -in -{ - home-manager.users.joy = { +in { programs.firefox = { enable = true; profiles.joy = { - userChrome = userChrome; + userChrome = userChrome; extensions = with inputs.firefox-addons.packages."x86_64-linux"; [ ublock-origin darkreader @@ -158,5 +155,4 @@ in }; }; }; - }; } diff --git a/modules/apps/home/git/default.nix b/modules/apps/home/git/default.nix index fb6985b..fa4d578 100644 --- a/modules/apps/home/git/default.nix +++ b/modules/apps/home/git/default.nix @@ -1,5 +1,5 @@ { - home-manager.users.joy.programs.git = { + programs.git = { enable = true; userEmail = "mail@joygnu.org"; userName = "joygnu"; diff --git a/modules/apps/home/helix/default.nix b/modules/apps/home/helix/default.nix index 37dbe20..64878d8 100644 --- a/modules/apps/home/helix/default.nix +++ b/modules/apps/home/helix/default.nix @@ -3,7 +3,7 @@ lib, ... }: { - home-manager.users.joy.programs.helix = { + programs.helix = { enable = true; defaultEditor = true; settings = { @@ -21,7 +21,7 @@ }; }; - home-manager.users.joy.home.packages = with pkgs; [ + home.packages = with pkgs; [ texlab nil clang-tools diff --git a/modules/apps/home/mpv/default.nix b/modules/apps/home/mpv/default.nix index 65d5037..5357abf 100644 --- a/modules/apps/home/mpv/default.nix +++ b/modules/apps/home/mpv/default.nix @@ -1,5 +1,5 @@ { - home-manager.users.joy.programs.mpv = { + programs.mpv = { enable = true; bindings = { x = "add speed 0.1"; diff --git a/modules/apps/home/newsboat/default.nix b/modules/apps/home/newsboat/default.nix index 5cf3569..660a67b 100644 --- a/modules/apps/home/newsboat/default.nix +++ b/modules/apps/home/newsboat/default.nix @@ -1,5 +1,5 @@ { - home-manager.users.joy.programs.newsboat = { + programs.newsboat = { enable = true; browser = "firefox"; urls = [ diff --git a/modules/apps/home/rofi/default.nix b/modules/apps/home/rofi/default.nix index 63630b1..31e1ad8 100644 --- a/modules/apps/home/rofi/default.nix +++ b/modules/apps/home/rofi/default.nix @@ -3,7 +3,7 @@ lib, ... }: { - home-manager.users.joy.programs.rofi = { + programs.rofi = { enable = true; package = pkgs.rofi-wayland; theme = lib.mkForce "~/nix/modules/apps/gui/rofi/gruvbox-material.rasi"; diff --git a/modules/apps/home/zsh/default.nix b/modules/apps/home/zsh/default.nix index 2d2a035..5b37cb7 100644 --- a/modules/apps/home/zsh/default.nix +++ b/modules/apps/home/zsh/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - home-manager.users.joy.programs.zsh = { + programs.zsh = { enable = true; syntaxHighlighting.enable = true; enableCompletion = true; @@ -27,6 +27,4 @@ history.size = 1000000; history.path = ".config/zsh/history"; }; - programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; } diff --git a/modules/system/misc/default.nix b/modules/system/misc/default.nix index 1d42dfd..ce52724 100644 --- a/modules/system/misc/default.nix +++ b/modules/system/misc/default.nix @@ -1,5 +1,8 @@ +{pkgs,...}: { nix.settings.experimental-features = ["nix-command" "flakes"]; time.timeZone = "Europe/Zurich"; system.stateVersion = "23.11"; + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; }