From b5d14a8b64cff10e703897d08543c0b9b0975a89 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 14 Dec 2023 18:09:34 +0100 Subject: [PATCH] alt --- alt/default.nix | 58 +++++++++++++++++++++++++++++++++++ alt/desktop/default.nix | 18 +++++++++++ alt/desktop/run-or-raise.conf | 42 +++++++++++++++++++++++++ flake.nix | 15 +++++++++ home/alias.nix | 33 ++++++++++++++++++++ home/castget/castget.conf | 4 +++ home/default.nix | 10 +----- home/fish.nix | 22 ------------- home/foot.nix | 5 ++- 9 files changed, 173 insertions(+), 34 deletions(-) create mode 100644 alt/default.nix create mode 100644 alt/desktop/default.nix create mode 100644 alt/desktop/run-or-raise.conf create mode 100644 home/alias.nix diff --git a/alt/default.nix b/alt/default.nix new file mode 100644 index 0000000..88c57dc --- /dev/null +++ b/alt/default.nix @@ -0,0 +1,58 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.username = "alt"; + home.homeDirectory = "/home/alt"; + home.stateVersion = "22.11"; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + programs.home-manager.enable = true; + + xdg.userDirs = { + enable = true; + createDirectories = true; + download = "${config.home.homeDirectory}/tmp"; + music = "${config.home.homeDirectory}/media/music"; + pictures = "${config.home.homeDirectory}/media/img"; + videos = "${config.home.homeDirectory}/media/vid"; + documents = "${config.home.homeDirectory}/misc"; + templates = "${config.xdg.dataHome}/templates"; + }; + + home.file.".npmrc".text = '' + prefix = ${config.xdg.dataHome}/npm/packages + ''; + + home.packages = with pkgs; [ + + # commandline + fzf + nnn + jq + progress + silver-searcher + tmux + wl-clipboard + + firefox + qbittorrent + vlc + + ]; + + imports = [ + ./desktop + ]; + + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + +} diff --git a/alt/desktop/default.nix b/alt/desktop/default.nix new file mode 100644 index 0000000..3c48b8a --- /dev/null +++ b/alt/desktop/default.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + home.pointerCursor = { + name = "Adwaita"; + package = pkgs.gnome.adwaita-icon-theme; + size = 32; + }; + + dconf.settings = { + "org/gnome-shell" = { + enabled-extensions = [ + "run-or-raise@edvard.cz" + ]; + }; + }; + xdg.configFile."run-or-raise/shortcuts.conf".source = ./run-or-raise.conf; +} diff --git a/alt/desktop/run-or-raise.conf b/alt/desktop/run-or-raise.conf new file mode 100644 index 0000000..2361354 --- /dev/null +++ b/alt/desktop/run-or-raise.conf @@ -0,0 +1,42 @@ +# Here you list all the shortcuts. +# +# The shortcuts may be defined in two ways: +# +# 1. Run-or-raise form: shortcut,launch-command,[wm_class],[title] +# * wm_class and title are optional and case sensitive +# * if none is set, lowercased launch-command is compared with lowercased windows wm_classes and titles +# +# 2. Run only form: shortcut,calculate +# +# ================= +# Run or raise form +# ================= +# +# This line cycles any open gnome-terminal (matched by wm_class = Gnome-terminal on Ubuntu 17.10) OR if not found, launches new one. +# If you're using Arch, you may want to match by wm_class = gnome-terminal-server , just check yourself by Alt+F2/lg/Windows +t,gnome-terminal,gnome-terminal-server, +n,nautilus,, +f,firefox,, +return,foot,, +x,keepassxc,,, +q,qutebrowser,, + +# You may use regular expression in title or wm_class. +# Just put the regular expression between slashes. +# E.g. to jump to pidgin conversation window you may use this line +# (that means any windows of wm_class Pidgin, not containing the title Buddy List)" +# KP_1,pidgin,Pidgin,/^((?!Buddy List).)*$/ + +# Have the mail always at numpad-click. +# KP_2,chromium-browser --app=https://mail.google.com/mail/u/0/#inbox + +# ============= +# Run only form +# ============= +# +# This line will launch notify-send command. +# h,notify-send Hello world + +# Blank lines are allowed. Line starting with "#" means a comment. +# Now delete these shortcuts and put here yours. +# How to know wm_class? Alt+f2, lg, "windows" tab (at least on Ubuntu 17.10) diff --git a/flake.nix b/flake.nix index dea2736..98ab65b 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,14 @@ ./system/btrbk.nix ./system/hardware-nova.nix ]; + users.users.alt = { + isNormalUser = true; + description = "Alt"; + extraGroups = [ + "networkmanager" + ]; + shell = pkgs.fish; + }; }; romulus = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; @@ -48,6 +56,13 @@ ./home ]; }; + alt = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlay; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./alt + ]; + }; }; }; } diff --git a/home/alias.nix b/home/alias.nix new file mode 100644 index 0000000..d4a57eb --- /dev/null +++ b/home/alias.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: + +{ + home.shellAliases = { + htop = "btm -b"; + linkbox = "ln -s (pwd) ~/box/"; + rloft = "tmux source-file ~/.config/tmux/rloft.conf"; + liftbox = "rsync -vaL --delete ~/box/ tstraube@login.server.uni-frankfurt.de:box/"; + ktiubox = "rsync -vaL --delete ~/box/ root@ktiu.net:/var/www/html/box/"; + ymd = "date +'%Y-%m-%d'"; + pulluni = "ssh tstraube@login.server.uni-frankfurt.de \"cd uni-tstraube && git pull\""; + pullstat = "ssh tstraube@login.server.uni-frankfurt.de \"cd statistik && git pull\""; + pullds = "ssh tstraube@login.server.uni-frankfurt.de \"cd ds23 && git pull\""; + pullmla = "ssh tstraube@login.server.uni-frankfurt.de \"cd malta23 && git pull\""; + pulldkg = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp && git pull\""; + pullgrid = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/grid && git pull\""; + pullsneak = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp_prev && git pull\""; + pullkhole = "ssh root@ktiu.net \"cd /var/www/karaoke && git pull\""; + buildfk = "curl -X POST -d '{}' https://api.netlify.com/build_hooks/61669ddfeaa3cccc44e752ea"; + showbox = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/box"; + showc = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/c/"; + castget = "castget -prvC ~/.config/castget/castget.conf"; + castsync = "mv -v ~/.local/share/podcasts/* /run/media/till/CLIP\\ JAM/Podcasts/"; + cb = "cd $(sed 's|^file://||' /home/till/.config/gtk-3.0/bookmarks | fzf --height 10% --reverse)"; + univpn = "secret-tool lookup server uni-frankfurt.de account tstraube | sudo openconnect --config=/home/till/.config/openconnect/config --passwd-on-stdin"; + v = "nvim"; + r = "R --no-save --no-restore"; + R = "R --no-save --no-restore"; + cdg = "cd \$(git rev-parse --show-toplevel)"; + map = "telnet mapscii.me"; + weather = "curl wttr.in/frankfurt"; + }; +} diff --git a/home/castget/castget.conf b/home/castget/castget.conf index 747c104..26e11a6 100644 --- a/home/castget/castget.conf +++ b/home/castget/castget.conf @@ -21,6 +21,10 @@ id3album=Wettbrötchen [efpodcast] url=https://www.eintracht-podcast.de/feed/mp3 +[edeltalk] +url=https://cdn.julephosting.de/podcasts/573-edeltalk-mit-dominik-kevin/feed.rss +id3album=Edeltalk + [*] id3contenttype=Podcast spool=/home/till/.local/share/podcasts diff --git a/home/default.nix b/home/default.nix index 2deb5ab..5a47701 100644 --- a/home/default.nix +++ b/home/default.nix @@ -118,6 +118,7 @@ imports = [ ./desktop + ./alias.nix ./nvim ./foot.nix ./fish.nix @@ -129,15 +130,6 @@ ./R.nix ]; - home.shellAliases = { - v = "nvim"; - r = "R --no-save --no-restore"; - R = "R --no-save --no-restore"; - cdg = "cd \$(git rev-parse --show-toplevel)"; - map = "telnet mapscii.me"; - weather = "curl wttr.in/frankfurt"; - }; - programs.nix-index = { enable = true; enableFishIntegration = true; diff --git a/home/fish.nix b/home/fish.nix index 7d8d82f..454e41a 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -3,28 +3,6 @@ programs.fish = { enable = true; interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin"; - shellAliases = { - htop = "btm -b"; - linkbox = "ln -s (pwd) ~/box/"; - rloft = "tmux source-file ~/.config/tmux/rloft.conf"; - liftbox = "rsync -vaL --delete ~/box/ tstraube@login.server.uni-frankfurt.de:box/"; - ktiubox = "rsync -vaL --delete ~/box/ root@ktiu.net:/var/www/html/box/"; - ymd = "date +'%Y-%m-%d'"; - pulluni = "ssh tstraube@login.server.uni-frankfurt.de \"cd uni-tstraube && git pull\""; - pullstat = "ssh tstraube@login.server.uni-frankfurt.de \"cd statistik && git pull\""; - pullds = "ssh tstraube@login.server.uni-frankfurt.de \"cd ds23 && git pull\""; - pullmla = "ssh tstraube@login.server.uni-frankfurt.de \"cd malta23 && git pull\""; - pulldkg = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp && git pull\""; - pullgrid = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/grid && git pull\""; - pullsneak = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp_prev && git pull\""; - pullkhole = "ssh root@ktiu.net \"cd /var/www/karaoke && git pull\""; - buildfk = "curl -X POST -d '{}' https://api.netlify.com/build_hooks/61669ddfeaa3cccc44e752ea"; - showbox = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/box"; - showc = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/c/"; - castget = "castget -pvC ~/.config/castget/castget.conf"; - castsync = "mv -v ~/.local/share/podcasts/* /run/media/till/CLIP\\ JAM/Podcasts/"; - univpn = "secret-tool lookup server uni-frankfurt.de account tstraube | sudo openconnect --config=/home/till/.config/openconnect/config --passwd-on-stdin"; - }; shellAbbrs = { openconnect = "openconnect --config=/home/till/.config/openconnect/config"; }; diff --git a/home/foot.nix b/home/foot.nix index 17b732a..e1f6551 100644 --- a/home/foot.nix +++ b/home/foot.nix @@ -6,11 +6,10 @@ settings = { main = { shell = "/home/till/.nix-profile/bin/fish -c 'tmux attach || tmux'"; - pad = "20x20"; - font = "JetBrains Mono:size=15"; + pad = "22x22"; + font = "JetBrains Mono:size=14"; initial-window-mode = "maximized"; line-height = "19"; - # dpi-aware = "yes"; }; mouse.hide-when-typing = "yes"; cursor = {