From 12647a2e7725c347a11e9b5e0ae60cbfc605a163 Mon Sep 17 00:00:00 2001 From: Joakim Repomaa Date: Thu, 30 Jan 2025 20:47:28 +0200 Subject: [PATCH] move home configs to root --- {radish/home => home}/Makefile | 0 .../assets/profile-pictures/jokke.png | Bin .../assets/profile-pictures/moco.png | Bin {radish/home => home}/common/default.nix | 0 .../common/dotfiles/tmux/tmux.conf | 0 .../common/dotfiles/zsh/.zcompdump | 0 .../common/dotfiles/zsh/completion | 0 .../common/dotfiles/zsh/functions | 0 .../home => home}/common/dotfiles/zsh/init | 0 .../home => home}/common/neovim/default.nix | 0 .../common/neovim/formatters.lua | 0 .../neovim/luasnippets/typescriptreact.lua | 0 .../common/neovim/snippets/ruby.snippets | 0 .../neovim/snippets/typescriptreact.snippets | 0 .../home => home}/custom-programs/default.nix | 0 .../custom-programs/fb-client/default.nix | 0 {radish/home => home}/default.nix | 1 + {radish/home => home}/gnome/default.nix | 0 .../gnome/extensions/default.nix | 0 .../gnome/extensions/freon/default.nix | 0 .../gnome/extensions/paperwm/default.nix | 0 {radish/home => home}/jokke/default.nix | 4 +- home/moco/default.nix | 201 +++++++++++++++++ .../home => home}/modules/neovim/default.nix | 0 .../modules/neovim/lsp-config.lua | 0 radish/default.nix | 2 +- radish/home/moco/default.nix | 206 ------------------ 27 files changed, 204 insertions(+), 210 deletions(-) rename {radish/home => home}/Makefile (100%) rename {radish/home => home}/assets/profile-pictures/jokke.png (100%) rename {radish/home => home}/assets/profile-pictures/moco.png (100%) rename {radish/home => home}/common/default.nix (100%) rename {radish/home => home}/common/dotfiles/tmux/tmux.conf (100%) rename {radish/home => home}/common/dotfiles/zsh/.zcompdump (100%) rename {radish/home => home}/common/dotfiles/zsh/completion (100%) rename {radish/home => home}/common/dotfiles/zsh/functions (100%) rename {radish/home => home}/common/dotfiles/zsh/init (100%) rename {radish/home => home}/common/neovim/default.nix (100%) rename {radish/home => home}/common/neovim/formatters.lua (100%) rename {radish/home => home}/common/neovim/luasnippets/typescriptreact.lua (100%) rename {radish/home => home}/common/neovim/snippets/ruby.snippets (100%) rename {radish/home => home}/common/neovim/snippets/typescriptreact.snippets (100%) rename {radish/home => home}/custom-programs/default.nix (100%) rename {radish/home => home}/custom-programs/fb-client/default.nix (100%) rename {radish/home => home}/default.nix (85%) rename {radish/home => home}/gnome/default.nix (100%) rename {radish/home => home}/gnome/extensions/default.nix (100%) rename {radish/home => home}/gnome/extensions/freon/default.nix (100%) rename {radish/home => home}/gnome/extensions/paperwm/default.nix (100%) rename {radish/home => home}/jokke/default.nix (96%) create mode 100644 home/moco/default.nix rename {radish/home => home}/modules/neovim/default.nix (100%) rename {radish/home => home}/modules/neovim/lsp-config.lua (100%) delete mode 100644 radish/home/moco/default.nix diff --git a/radish/home/Makefile b/home/Makefile similarity index 100% rename from radish/home/Makefile rename to home/Makefile diff --git a/radish/home/assets/profile-pictures/jokke.png b/home/assets/profile-pictures/jokke.png similarity index 100% rename from radish/home/assets/profile-pictures/jokke.png rename to home/assets/profile-pictures/jokke.png diff --git a/radish/home/assets/profile-pictures/moco.png b/home/assets/profile-pictures/moco.png similarity index 100% rename from radish/home/assets/profile-pictures/moco.png rename to home/assets/profile-pictures/moco.png diff --git a/radish/home/common/default.nix b/home/common/default.nix similarity index 100% rename from radish/home/common/default.nix rename to home/common/default.nix diff --git a/radish/home/common/dotfiles/tmux/tmux.conf b/home/common/dotfiles/tmux/tmux.conf similarity index 100% rename from radish/home/common/dotfiles/tmux/tmux.conf rename to home/common/dotfiles/tmux/tmux.conf diff --git a/radish/home/common/dotfiles/zsh/.zcompdump b/home/common/dotfiles/zsh/.zcompdump similarity index 100% rename from radish/home/common/dotfiles/zsh/.zcompdump rename to home/common/dotfiles/zsh/.zcompdump diff --git a/radish/home/common/dotfiles/zsh/completion b/home/common/dotfiles/zsh/completion similarity index 100% rename from radish/home/common/dotfiles/zsh/completion rename to home/common/dotfiles/zsh/completion diff --git a/radish/home/common/dotfiles/zsh/functions b/home/common/dotfiles/zsh/functions similarity index 100% rename from radish/home/common/dotfiles/zsh/functions rename to home/common/dotfiles/zsh/functions diff --git a/radish/home/common/dotfiles/zsh/init b/home/common/dotfiles/zsh/init similarity index 100% rename from radish/home/common/dotfiles/zsh/init rename to home/common/dotfiles/zsh/init diff --git a/radish/home/common/neovim/default.nix b/home/common/neovim/default.nix similarity index 100% rename from radish/home/common/neovim/default.nix rename to home/common/neovim/default.nix diff --git a/radish/home/common/neovim/formatters.lua b/home/common/neovim/formatters.lua similarity index 100% rename from radish/home/common/neovim/formatters.lua rename to home/common/neovim/formatters.lua diff --git a/radish/home/common/neovim/luasnippets/typescriptreact.lua b/home/common/neovim/luasnippets/typescriptreact.lua similarity index 100% rename from radish/home/common/neovim/luasnippets/typescriptreact.lua rename to home/common/neovim/luasnippets/typescriptreact.lua diff --git a/radish/home/common/neovim/snippets/ruby.snippets b/home/common/neovim/snippets/ruby.snippets similarity index 100% rename from radish/home/common/neovim/snippets/ruby.snippets rename to home/common/neovim/snippets/ruby.snippets diff --git a/radish/home/common/neovim/snippets/typescriptreact.snippets b/home/common/neovim/snippets/typescriptreact.snippets similarity index 100% rename from radish/home/common/neovim/snippets/typescriptreact.snippets rename to home/common/neovim/snippets/typescriptreact.snippets diff --git a/radish/home/custom-programs/default.nix b/home/custom-programs/default.nix similarity index 100% rename from radish/home/custom-programs/default.nix rename to home/custom-programs/default.nix diff --git a/radish/home/custom-programs/fb-client/default.nix b/home/custom-programs/fb-client/default.nix similarity index 100% rename from radish/home/custom-programs/fb-client/default.nix rename to home/custom-programs/fb-client/default.nix diff --git a/radish/home/default.nix b/home/default.nix similarity index 85% rename from radish/home/default.nix rename to home/default.nix index 41610a3..df233cf 100644 --- a/radish/home/default.nix +++ b/home/default.nix @@ -6,6 +6,7 @@ moco = import ./moco; }; extraSpecialArgs = { inherit ksoloti-pr inputs; }; + sharedModules = [ (import ./common) ]; useUserPackages = true; useGlobalPkgs = true; }; diff --git a/radish/home/gnome/default.nix b/home/gnome/default.nix similarity index 100% rename from radish/home/gnome/default.nix rename to home/gnome/default.nix diff --git a/radish/home/gnome/extensions/default.nix b/home/gnome/extensions/default.nix similarity index 100% rename from radish/home/gnome/extensions/default.nix rename to home/gnome/extensions/default.nix diff --git a/radish/home/gnome/extensions/freon/default.nix b/home/gnome/extensions/freon/default.nix similarity index 100% rename from radish/home/gnome/extensions/freon/default.nix rename to home/gnome/extensions/freon/default.nix diff --git a/radish/home/gnome/extensions/paperwm/default.nix b/home/gnome/extensions/paperwm/default.nix similarity index 100% rename from radish/home/gnome/extensions/paperwm/default.nix rename to home/gnome/extensions/paperwm/default.nix diff --git a/radish/home/jokke/default.nix b/home/jokke/default.nix similarity index 96% rename from radish/home/jokke/default.nix rename to home/jokke/default.nix index 5a99b20..3dfd039 100644 --- a/radish/home/jokke/default.nix +++ b/home/jokke/default.nix @@ -1,8 +1,6 @@ -{ pkgs, ksoloti-pr, inputs, ... }: +{ pkgs, ksoloti-pr, ... }: { - imports = [ ../common ]; config = { - _module.args.inputs = inputs; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "jokke"; diff --git a/home/moco/default.nix b/home/moco/default.nix new file mode 100644 index 0000000..2e219de --- /dev/null +++ b/home/moco/default.nix @@ -0,0 +1,201 @@ +{ pkgs, ... }: +let + homeDirectory = "/home/moco"; +in +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home = { + username = "moco"; + inherit homeDirectory; + packages = with pkgs; [ + (slack.overrideAttrs (oldAttrs: { + fixupPhase = '' + sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' $out/lib/slack/resources/app.asar + + rm $out/bin/slack + makeWrapper $out/lib/slack/slack $out/bin/slack \ + --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \ + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \ + --add-flags "--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer" + ''; + })) + kooha + gnome-pomodoro + mitmproxy + (writeShellScriptBin "moco-admin-pw" '' + password=$(op item get fkj74ou6jfex7a6gcinac6o5oe --reveal --fields label=Kennwort) + otp=$(ykman oath accounts code -s 'MOCO:Admin') + echo "''${password}''${otp}" | wl-copy -n + '') + (writeShellScriptBin "moco-reto-otp" '' + ykman oath accounts code -s 'MOCO Reto' | wl-copy -n + '') + ]; + }; + + gnome = { + profilePicture = ../assets/profile-pictures/moco.png; + calendar.showWeekNumbers = true; + extensions.paperwm.winprops = [ + { wm_class = "gnome-pomodoro"; scratch_layer = true; } + ]; + }; + + programs.poetry = { + enable = true; + settings = { + virtualenvs = { + create = true; + inProject = true; + }; + }; + }; + + programs.zsh = { + cdpath = [ + "${homeDirectory}/Code/mocoapp" + "${homeDirectory}/Code/mocoapp-promo" + "${homeDirectory}/Code/mocoapp-llama" + ]; + dirHashes = { + moco = "${homeDirectory}/Code/mocoapp"; + promo = "${homeDirectory}/Code/mocoapp-promo"; + llama = "${homeDirectory}/Code/mocoapp-llama"; + }; + }; + + programs.git.extraConfig.user.email = "joakim.repomaa@mocoapp.com"; + + programs.neovim = { + withTreesitterPlugins = p: [ + p.ruby + p.javascript + p.typescript + p.graphql + ]; + formatters = [ + { + filetypes = [ "ruby" ]; + globs = [ "*.rb" "Gemfile" "*.rake" ]; + exe = "bundle"; + args = file: [ "exec" "rufo" "-x" "--filename" file ]; + stdin = true; + } + { + filetypes = [ "javascript" "typescript" "javascriptreact" "typescriptreact" ]; + globs = [ "*.js" "*.jsx" "*.ts" "*.tsx" ]; + exe = "npx"; + args = file: [ "prettier" "--stdin-filepath" file ]; + stdin = true; + } + ]; + lsp.servers = with pkgs; [ + { + name = "ruby_lsp"; + config = { + init_options = { + formatter = "auto"; + }; + }; + package = ruby-lsp; + } + { + name = "graphql"; + package = nodePackages.graphql-language-service-cli; + } + ]; + }; + + programs.ssh.matchBlocks = + let + aliases = [ "moco" "mocoapp" "mocoapp.com" ]; + matcher = subdomains: + builtins.concatStringsSep " " ( + map + (alias: builtins.concatStringsSep " " ( + map (subdomain: "*.${subdomain}.${alias} ${subdomain}.${alias}") subdomains + )) + aliases); + in + { + "console.*.moco" = { + extraOptions = { + RequestTTY = "force"; + RemoteCommand = "./rails-console.sh"; + }; + }; + + "${matcher ["reto" "reto.intern"]}" = { + hostname = "reto.intern.mocoapp.com"; + user = "jokke"; + }; + + "${matcher ["web"]}" = { + hostname = "mocoapp.com"; + }; + "${matcher ["prod-inc"]}" = { + hostname = "prod-inc.mocoapp.com"; + }; + "${matcher ["prod"]}" = { + hostname = "web02.mocoapp"; + }; + "${matcher ["pfg" "primeforcegroup"]}" = { + hostname = "primeforcegroup.mocoapp.com"; + }; + "${matcher ["crafft"]}" = { + hostname = "crafft.mocoapp.com"; + }; + "${matcher ["bd" "businessdecision"]}" = { + hostname = "businessdecision.mocoapp.com"; + }; + "${matcher ["festland"]}" = { + hostname = "festland.mocoapp.com"; + }; + "${matcher ["oi" "one-inside"]}" = { + hostname = "one-inside.mocoapp.com"; + }; + "${matcher ["se" "scope-engineering"]}" = { + hostname = "scope-engineering.mocoapp.com"; + }; + "${matcher ["cpc" "cpc-ag"]}" = { + hostname = "cpc-ag.mocoapp.com"; + }; + "${matcher ["weareact3"]}" = { + hostname = "weareact3.mocoapp.com"; + }; + "${matcher ["avenit"]}" = { + hostname = "avenit.mocoapp.com"; + }; + "${matcher ["staging"]}" = { + hostname = "staging.mocoapp.com"; + }; + "${matcher ["staging-v2"]}" = { + hostname = "staging-v2.mocoapp.com"; + }; + "${matcher ["staging-v3"]}" = { + hostname = "staging-v3.mocoapp.com"; + }; + "${matcher ["staging-v4"]}" = { + hostname = "staging-v4.mocoapp.com"; + }; + "${matcher ["staging-v5"]}" = { + hostname = "staging-v5.mocoapp.com"; + }; + "${matcher ["staging-v6"]}" = { + hostname = "staging-v6.mocoapp.com"; + }; + "${matcher ["prod-db" "production-db"]}" = { + hostname = "production-db.mocoapp"; + }; + "${matcher ["pdf-renderer"]}" = { + hostname = "mocoapp-pdf-renderer01.mocoapp.com"; + }; + "*.moco *.mocoapp *.mocoapp.com" = { + forwardAgent = true; + }; + "*.moco !reto.moco *.mocoapp.com !reto.mocoapp.com" = { + user = "butler"; + }; + }; +} diff --git a/radish/home/modules/neovim/default.nix b/home/modules/neovim/default.nix similarity index 100% rename from radish/home/modules/neovim/default.nix rename to home/modules/neovim/default.nix diff --git a/radish/home/modules/neovim/lsp-config.lua b/home/modules/neovim/lsp-config.lua similarity index 100% rename from radish/home/modules/neovim/lsp-config.lua rename to home/modules/neovim/lsp-config.lua diff --git a/radish/default.nix b/radish/default.nix index 5140c84..e19db2c 100644 --- a/radish/default.nix +++ b/radish/default.nix @@ -9,6 +9,6 @@ ./containers.nix ./desktop.nix ./users.nix - ./home + ../home ]; } diff --git a/radish/home/moco/default.nix b/radish/home/moco/default.nix deleted file mode 100644 index 995e9c2..0000000 --- a/radish/home/moco/default.nix +++ /dev/null @@ -1,206 +0,0 @@ -{ pkgs, inputs, ... }: -{ - imports = [ ../common ]; - config = - let - homeDirectory = "/home/moco"; - in - { - _module.args.inputs = inputs; - # Home Manager needs a bit of information about you and the paths it should - # manage. - home = { - username = "moco"; - inherit homeDirectory; - packages = with pkgs; [ - (slack.overrideAttrs (oldAttrs: { - fixupPhase = '' - sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' $out/lib/slack/resources/app.asar - - rm $out/bin/slack - makeWrapper $out/lib/slack/slack $out/bin/slack \ - --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \ - --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \ - --add-flags "--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer" - ''; - })) - kooha - gnome-pomodoro - mitmproxy - (writeShellScriptBin "moco-admin-pw" '' - password=$(op item get fkj74ou6jfex7a6gcinac6o5oe --reveal --fields label=Kennwort) - otp=$(ykman oath accounts code -s 'MOCO:Admin') - echo "''${password}''${otp}" | wl-copy -n - '') - (writeShellScriptBin "moco-reto-otp" '' - ykman oath accounts code -s 'MOCO Reto' | wl-copy -n - '') - ]; - }; - - gnome = { - profilePicture = ../assets/profile-pictures/moco.png; - calendar.showWeekNumbers = true; - extensions.paperwm.winprops = [ - { wm_class = "gnome-pomodoro"; scratch_layer = true; } - ]; - }; - - programs.poetry = { - enable = true; - settings = { - virtualenvs = { - create = true; - inProject = true; - }; - }; - }; - - programs.zsh = { - cdpath = [ - "${homeDirectory}/Code/mocoapp" - "${homeDirectory}/Code/mocoapp-promo" - "${homeDirectory}/Code/mocoapp-llama" - ]; - dirHashes = { - moco = "${homeDirectory}/Code/mocoapp"; - promo = "${homeDirectory}/Code/mocoapp-promo"; - llama = "${homeDirectory}/Code/mocoapp-llama"; - }; - }; - - programs.git.extraConfig.user.email = "joakim.repomaa@mocoapp.com"; - - programs.neovim = { - withTreesitterPlugins = p: [ - p.ruby - p.javascript - p.typescript - p.graphql - ]; - formatters = [ - { - filetypes = [ "ruby" ]; - globs = [ "*.rb" "Gemfile" "*.rake" ]; - exe = "bundle"; - args = file: [ "exec" "rufo" "-x" "--filename" file ]; - stdin = true; - } - { - filetypes = [ "javascript" "typescript" "javascriptreact" "typescriptreact" ]; - globs = [ "*.js" "*.jsx" "*.ts" "*.tsx" ]; - exe = "npx"; - args = file: [ "prettier" "--stdin-filepath" file ]; - stdin = true; - } - ]; - lsp.servers = with pkgs; [ - { - name = "ruby_lsp"; - config = { - init_options = { - formatter = "auto"; - }; - }; - package = ruby-lsp; - } - { - name = "graphql"; - package = nodePackages.graphql-language-service-cli; - } - ]; - }; - - programs.ssh.matchBlocks = - let - aliases = [ "moco" "mocoapp" "mocoapp.com" ]; - matcher = subdomains: - builtins.concatStringsSep " " ( - map - (alias: builtins.concatStringsSep " " ( - map (subdomain: "*.${subdomain}.${alias} ${subdomain}.${alias}") subdomains - )) - aliases); - in - { - "console.*.moco" = { - extraOptions = { - RequestTTY = "force"; - RemoteCommand = "./rails-console.sh"; - }; - }; - - "${matcher ["reto" "reto.intern"]}" = { - hostname = "reto.intern.mocoapp.com"; - user = "jokke"; - }; - - "${matcher ["web"]}" = { - hostname = "mocoapp.com"; - }; - "${matcher ["prod-inc"]}" = { - hostname = "prod-inc.mocoapp.com"; - }; - "${matcher ["prod"]}" = { - hostname = "web02.mocoapp"; - }; - "${matcher ["pfg" "primeforcegroup"]}" = { - hostname = "primeforcegroup.mocoapp.com"; - }; - "${matcher ["crafft"]}" = { - hostname = "crafft.mocoapp.com"; - }; - "${matcher ["bd" "businessdecision"]}" = { - hostname = "businessdecision.mocoapp.com"; - }; - "${matcher ["festland"]}" = { - hostname = "festland.mocoapp.com"; - }; - "${matcher ["oi" "one-inside"]}" = { - hostname = "one-inside.mocoapp.com"; - }; - "${matcher ["se" "scope-engineering"]}" = { - hostname = "scope-engineering.mocoapp.com"; - }; - "${matcher ["cpc" "cpc-ag"]}" = { - hostname = "cpc-ag.mocoapp.com"; - }; - "${matcher ["weareact3"]}" = { - hostname = "weareact3.mocoapp.com"; - }; - "${matcher ["avenit"]}" = { - hostname = "avenit.mocoapp.com"; - }; - "${matcher ["staging"]}" = { - hostname = "staging.mocoapp.com"; - }; - "${matcher ["staging-v2"]}" = { - hostname = "staging-v2.mocoapp.com"; - }; - "${matcher ["staging-v3"]}" = { - hostname = "staging-v3.mocoapp.com"; - }; - "${matcher ["staging-v4"]}" = { - hostname = "staging-v4.mocoapp.com"; - }; - "${matcher ["staging-v5"]}" = { - hostname = "staging-v5.mocoapp.com"; - }; - "${matcher ["staging-v6"]}" = { - hostname = "staging-v6.mocoapp.com"; - }; - "${matcher ["prod-db" "production-db"]}" = { - hostname = "production-db.mocoapp"; - }; - "${matcher ["pdf-renderer"]}" = { - hostname = "mocoapp-pdf-renderer01.mocoapp.com"; - }; - "*.moco *.mocoapp *.mocoapp.com" = { - forwardAgent = true; - }; - "*.moco !reto.moco *.mocoapp.com !reto.mocoapp.com" = { - user = "butler"; - }; - }; - }; -}