From c1dc0469d06bbe383d2d124a83115c04bc5b7a0c Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sun, 4 Dec 2022 23:16:02 +0100 Subject: [PATCH] chore: add more dotfiles, install clickup --- TODO.md | 15 ----- desktops/anubis/boot.nix | 18 ++++- flake.lock | 24 +++---- overlays/clickup/default.nix | 19 ++++++ overlays/default.nix | 2 + profiles/programs/clickup.nix | 26 ++++++++ profiles/programs/default.nix | 1 + profiles/thomas/default.nix | 18 ++--- profiles/thomas/desktop/gnome.nix | 1 + profiles/thomas/desktop/i3.nix | 15 +++-- profiles/thomas/programs/alacritty.nix | 91 -------------------------- profiles/thomas/programs/default.nix | 3 +- profiles/thomas/programs/ghtoken.nix | 38 +++++++++++ profiles/thomas/programs/netrc.nix | 38 +++++++++++ secrets/secrets.nix | 2 + secrets/users/thomas/ghtoken.age | 20 ++++++ secrets/users/thomas/netrc.age | 19 ++++++ shared/services/desktop/default.nix | 3 +- 18 files changed, 219 insertions(+), 134 deletions(-) delete mode 100644 TODO.md create mode 100644 overlays/clickup/default.nix create mode 100644 profiles/programs/clickup.nix delete mode 100644 profiles/thomas/programs/alacritty.nix create mode 100644 profiles/thomas/programs/ghtoken.nix create mode 100644 profiles/thomas/programs/netrc.nix create mode 100644 secrets/users/thomas/ghtoken.age create mode 100644 secrets/users/thomas/netrc.age diff --git a/TODO.md b/TODO.md deleted file mode 100644 index aa966a8..0000000 --- a/TODO.md +++ /dev/null @@ -1,15 +0,0 @@ -# Todo - -## desktop - -* clickup (package https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools) -* curseforge (package) -* gnupg copy -* kubectl plugins: neat, oidc_login, realname_diff, whoami -* mc config -* netrc config -* github token - -## server - -* coredns for private domain names diff --git a/desktops/anubis/boot.nix b/desktops/anubis/boot.nix index 4445b3c..324ed4a 100644 --- a/desktops/anubis/boot.nix +++ b/desktops/anubis/boot.nix @@ -24,7 +24,7 @@ }; }; - kernelModules = [ ]; + kernelModules = [ "coretemp" "thinkpad_acpi" ]; extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; initrd = { @@ -32,4 +32,20 @@ kernelModules = [ "dm-snapshot" ]; }; }; + + services = { + thinkfan = { + enable = true; + }; + }; + + systemd = { + services = { + thinkfan = { + preStart = " + /run/current-system/sw/bin/modprobe -r thinkpad_acpi && /run/current-system/sw/bin/modprobe thinkpad_acpi + "; + }; + }; + }; } diff --git a/flake.lock b/flake.lock index 0f2f3f3..caca69e 100644 --- a/flake.lock +++ b/flake.lock @@ -80,11 +80,11 @@ }, "hardware": { "locked": { - "lastModified": 1669146234, - "narHash": "sha256-HEby7EG1yaq1oT2Ze6Cvok9CFju1XHkSvVHmkptLW9U=", + "lastModified": 1669650994, + "narHash": "sha256-uwASLUfedIQ5q01TtMwZDEV2HCZr5nVPZjzVgCG+D5I=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "0099253ad0b5283f06ffe31cf010af3f9ad7837d", + "rev": "7883883d135ce5b7eae5dce4bfa12262b85c1c46", "type": "github" }, "original": { @@ -101,11 +101,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1669071065, - "narHash": "sha256-KBpgj3JkvlPsJ3duOZqFJe6tgr+wc75t8sFmgRbBSbw=", + "lastModified": 1669825171, + "narHash": "sha256-HxlZHSiRGXnWAFbIJMeujqBe2KgACYx5XDRY0EA9P+4=", "owner": "nix-community", "repo": "home-manager", - "rev": "f7641a3ff398ccce952e19a199d775934e518c1d", + "rev": "478610aa37c8339eacabfa03f07dacf5574edd47", "type": "github" }, "original": { @@ -116,11 +116,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669052418, - "narHash": "sha256-M1I4BKXBQm2gey1tScemEh5TpHHE3gKptL7BpWUvL8s=", + "lastModified": 1669791787, + "narHash": "sha256-KBfoA2fOI5+wCrm7PR+j7jHqXeTkVRPQ0m5fcKchyuU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8", + "rev": "e76c78d20685a043d23f5f9e0ccd2203997f1fb1", "type": "github" }, "original": { @@ -132,11 +132,11 @@ }, "nur": { "locked": { - "lastModified": 1669182177, - "narHash": "sha256-U3Bp+pZN58lEqlk1hoTyCGUckFpZfXW2b14p1NGymyY=", + "lastModified": 1669805596, + "narHash": "sha256-g1CPQZ+1jGhY4bsjppk+gH5jfzzqmPlqGHg0zSYS3Hw=", "owner": "nix-community", "repo": "NUR", - "rev": "6ccbe180fc646a7672cede9fa008fd30d744d0c8", + "rev": "c81b1e527f3a220abfa9bf8096153d52784c5007", "type": "github" }, "original": { diff --git a/overlays/clickup/default.nix b/overlays/clickup/default.nix new file mode 100644 index 0000000..ceac170 --- /dev/null +++ b/overlays/clickup/default.nix @@ -0,0 +1,19 @@ +{ lib, fetchurl, appimageTools }: + +appimageTools.wrapType2 rec { + pname = "clickup"; + version = "3.1.2"; + + src = fetchurl { + url = "https://desktop.clickup.com/linux"; + sha256 = "sha256-Qkvs01L9qfvZ5E9BnLdw2oWYaL5tYR3faFjlv6pAY2Y="; + }; + + meta = with lib; { + description = "All of your work in one place: Tasks, Docs, Chat, Goals, & more."; + homepage = "https://clickup.com/"; + license = licenses.unfree; + maintainers = with maintainers; [ tboerger ]; + platforms = platforms.linux; + }; +} diff --git a/overlays/default.nix b/overlays/default.nix index 6cc3bdc..085839e 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -26,5 +26,7 @@ self: super: kubectl-resource-versions = super.callPackage ./kubectl-resource-versions { }; kubectl-view-secret = super.callPackage ./kubectl-view-secret { }; kubectl-whoami = super.callPackage ./kubectl-whoami { }; + + clickup = super.callPackage ./clickup { }; tailscale-systray = super.callPackage ./tailscale-systray { }; } diff --git a/profiles/programs/clickup.nix b/profiles/programs/clickup.nix new file mode 100644 index 0000000..2b56279 --- /dev/null +++ b/profiles/programs/clickup.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, config, options, ... }: +with lib; + +let + cfg = config.profile.programs.clickup; + +in +{ + options = { + profile = { + programs = { + clickup = { + enable = mkEnableOption "ClickUp"; + }; + }; + }; + }; + + config = mkIf cfg.enable { + environment = { + systemPackages = with pkgs; [ + clickup + ]; + }; + }; +} diff --git a/profiles/programs/default.nix b/profiles/programs/default.nix index fa79c03..6d019ea 100644 --- a/profiles/programs/default.nix +++ b/profiles/programs/default.nix @@ -4,6 +4,7 @@ imports = [ ./authy.nix ./browser.nix + ./clickup.nix ./clockify.nix ./develop.nix ./direnv.nix diff --git a/profiles/thomas/default.nix b/profiles/thomas/default.nix index 742fb55..8c9049f 100644 --- a/profiles/thomas/default.nix +++ b/profiles/thomas/default.nix @@ -35,6 +35,9 @@ in browser = { enable = desktop; }; + clickup = { + enable = desktop; + }; clockify = { enable = desktop; }; @@ -120,21 +123,24 @@ in enable = desktop; }; - alacritty = { - enable = desktop; - }; autorandr = { enable = desktop; }; hacking = { enable = desktop; }; + ghtoken = { + enable = desktop; + }; kustomize = { enable = desktop; }; minio = { enable = desktop; }; + netrc = { + enable = desktop; + }; ssh = { enable = desktop; }; @@ -144,18 +150,12 @@ in }; services = { - blueman = { - enable = desktop; - }; mopidy = { enable = desktop; }; nextcloud = { enable = desktop; }; - nmapplet = { - enable = desktop; - }; udiskie = { enable = desktop; }; diff --git a/profiles/thomas/desktop/gnome.nix b/profiles/thomas/desktop/gnome.nix index d7dd9f2..d7e36c6 100644 --- a/profiles/thomas/desktop/gnome.nix +++ b/profiles/thomas/desktop/gnome.nix @@ -75,6 +75,7 @@ in systemPackages = with pkgs; [ gnome.adwaita-icon-theme gnome.gnome-tweaks + xclip gnomeExtensions.app-icons-taskbar gnomeExtensions.appindicator diff --git a/profiles/thomas/desktop/i3.nix b/profiles/thomas/desktop/i3.nix index 2f01f45..81e99da 100644 --- a/profiles/thomas/desktop/i3.nix +++ b/profiles/thomas/desktop/i3.nix @@ -7,8 +7,8 @@ let programs = { term = [ { - exec = "Alacritty"; - class = "Alacritty"; + exec = "wezterm"; + class = "WezTerm"; } ]; @@ -94,12 +94,18 @@ in config = mkIf cfg.enable { profile = { services = { + blueman = { + enable = true; + }; caffeine = { enable = true; }; flameshot = { enable = true; }; + nmapplet = { + enable = true; + }; }; }; @@ -126,6 +132,7 @@ in lxappearance playerctl scrot + xclip ]; }; @@ -134,7 +141,7 @@ in enable = true; font = "DejaVu Sans Mono 14"; - terminal = "alacritty"; + terminal = "wezterm"; theme = "solarized"; plugins = with pkgs; [ @@ -575,7 +582,7 @@ in "--release Ctrl+Print" = "exec --no-startup-id scrot -s"; "Mod4+d" = "exec --no-startup-id rofi -show drun"; - "Mod4+Return" = "exec alacritty"; + "Mod4+Return" = "exec wezterm"; "Mod4+Shift+q" = "kill"; "Mod4+Left" = "focus left"; diff --git a/profiles/thomas/programs/alacritty.nix b/profiles/thomas/programs/alacritty.nix deleted file mode 100644 index d04f9f5..0000000 --- a/profiles/thomas/programs/alacritty.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ pkgs, lib, config, options, ... }: -with lib; - -let - cfg = config.profile.programs.alacritty; - -in -{ - options = { - profile = { - programs = { - alacritty = { - enable = mkEnableOption "Alacritty"; - }; - }; - }; - }; - - config = mkIf cfg.enable { - home-manager.users."${config.profile.username}" = { config, ... }: { - programs = { - alacritty = { - enable = true; - - settings = { - env = { - TERM = "xterm-256color"; - WINIT_X11_SCALE_FACTOR = "1"; - }; - - window = { - padding = { - x = 5; - y = 5; - }; - }; - - scrolling = { - history = 100000; - }; - - font = { - size = 14.0; - - normal = { - family = "DejaVu Sans Mono"; - }; - }; - - # key_bindings = [ - # { - # key = "K"; - # mods = "Control"; - # action = "ClearHistory"; - # } - # ]; - - colors = { - primary = { - background = "0x002b36"; - foreground = "0x839496"; - }; - - normal = { - black = "0x073642"; - red = "0xdc322f"; - green = "0x859900"; - yellow = "0xb58900"; - blue = "0x268bd2"; - magenta = "0xd33682"; - cyan = "0x2aa198"; - white = "0xeee8d5"; - }; - - bright = { - black = "0x002b36"; - red = "0xcb4b16"; - green = "0x586e75"; - yellow = "0x657b83"; - blue = "0x839496"; - magenta = "0x6c71c4"; - cyan = "0x93a1a1"; - white = "0xfdf6e3"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/profiles/thomas/programs/default.nix b/profiles/thomas/programs/default.nix index aa29d2c..e41dde8 100644 --- a/profiles/thomas/programs/default.nix +++ b/profiles/thomas/programs/default.nix @@ -2,13 +2,14 @@ { imports = [ - ./alacritty.nix ./autorandr.nix ./dircolors.nix + ./ghtoken.nix ./git.nix ./hacking.nix ./kustomize.nix ./minio.nix + ./netrc.nix ./ssh.nix ./starship.nix ./vscode.nix diff --git a/profiles/thomas/programs/ghtoken.nix b/profiles/thomas/programs/ghtoken.nix new file mode 100644 index 0000000..4dd28d7 --- /dev/null +++ b/profiles/thomas/programs/ghtoken.nix @@ -0,0 +1,38 @@ +{ pkgs, lib, config, options, ... }: +with lib; + +let + cfg = config.profile.programs.ghtoken; + +in +{ + options = { + profile = { + programs = { + ghtoken = { + enable = mkEnableOption "GHToken"; + }; + }; + }; + }; + + config = mkIf cfg.enable { + # home-manager.users."${config.profile.username}" = let + # ghtokenPath = config.age.secrets."users/thomas/ghtoken".path; + # in { config, ... }: { + # home = { + # file = { + # ".ghtoken" = { + # source = ghtokenPath; + # }; + # }; + # }; + # }; + + # age.secrets."users/thomas/ghtoken" = { + # file = ../../../secrets/users/thomas/ghtoken.age; + # owner = "thomas"; + # group = "users"; + # }; + }; +} diff --git a/profiles/thomas/programs/netrc.nix b/profiles/thomas/programs/netrc.nix new file mode 100644 index 0000000..85729e1 --- /dev/null +++ b/profiles/thomas/programs/netrc.nix @@ -0,0 +1,38 @@ +{ pkgs, lib, config, options, ... }: +with lib; + +let + cfg = config.profile.programs.netrc; + +in +{ + options = { + profile = { + programs = { + netrc = { + enable = mkEnableOption "Netrc"; + }; + }; + }; + }; + + config = mkIf cfg.enable { + # home-manager.users."${config.profile.username}" = let + # netrcPath = config.age.secrets."users/thomas/netrc".path; + # in { config, ... }: { + # home = { + # file = { + # "..netrc" = { + # source = netrcPath; + # }; + # }; + # }; + # }; + + # age.secrets."users/thomas/netrc" = { + # file = ../../../secrets/users/thomas/netrc.age; + # owner = "thomas"; + # group = "users"; + # }; + }; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index a15f661..328efc9 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -30,6 +30,8 @@ in "users/adrian/password.age".publicKeys = users ++ systems; "users/tabea/password.age".publicKeys = users ++ systems; + "users/thomas/ghtoken.age".publicKeys = users ++ systems; "users/thomas/hackthebox.age".publicKeys = users ++ systems; "users/thomas/minio.age".publicKeys = users ++ systems; + "users/thomas/netrc.age".publicKeys = users ++ systems; } diff --git a/secrets/users/thomas/ghtoken.age b/secrets/users/thomas/ghtoken.age new file mode 100644 index 0000000..aabd33d --- /dev/null +++ b/secrets/users/thomas/ghtoken.age @@ -0,0 +1,20 @@ +age-encryption.org/v1 +-> ssh-ed25519 ptT1OQ N0SG4hZITJc34D4tZFgg82TEzXCK+8nfro8BFjGi4DU +TiGnvKTAZOXCHVF+YNWvkj2FnSWk1X5k7ioy3bShl6I +-> ssh-ed25519 dHPgHQ Eqwtjxmu71huTkIrV1ECdfdXvabIB+pO0e+kewikf1g +x8/sdBsOTJEuu/s8etMM20ukhOgIwKLqeYcbeGlxY4I +-> ssh-ed25519 RlXbCA yNS0bi6+meWIzRj+tFtCUuHwmjkeWPwXlArmOjWebXw +E/tbdq0n705YnMIdo3mX7Sta+OF8ibmHqo7badxl6rA +-> ssh-ed25519 g6Zebw z2shLxfe/twM4VD1XGabmJ7xsE4VZrl7dRAV62b6CTA +Cf7LbuvEWbZRxaZziipkARYT4t1qBkZELSC4PPjfIIE +-> ssh-ed25519 vDK6kA Kw8XEw6AJeKWNUY1lQFE6hEVvmZ9U8oClBxRVU64egU +WGArD8Q2MZmAvHN/3KDXJp3OEZ/AeAfra+ug7J7PIr0 +-> ssh-ed25519 mO4+dg 0Vx3LWwUO+NfZmy6j7VMcbsk2iYoYZ7ovmq/1yU+vlw +T9Rn9bTGthOupqe7OFFdsDXP8d7FN7Bsh7LIpY0J3BA +-> ssh-ed25519 IYHv1g gPCj2vrGJclvnc40nRFVCQYCuT3avEn4H9NDQJ/rF1M +g/FWvUilBo9dxns0+m9yhxsUK0/GdhlSJyo1oC8+crE +-> O+Z[-grease xb$/z9 '^A ":,Z d` +h/rc0Q18HlagH6fS/2trvPnPNxTnnw70jGXvCi5VgaOVebRRMkD7QFxm3MTZN/r/ +EapZsw +--- IM2U+WrG4+RnabE8m237GquAHwo7pecEpTnDTX5nxsg +?)f wz,^$JtmE[fA^V&''J B6Jj \ No newline at end of file diff --git a/secrets/users/thomas/netrc.age b/secrets/users/thomas/netrc.age new file mode 100644 index 0000000..8973b7d --- /dev/null +++ b/secrets/users/thomas/netrc.age @@ -0,0 +1,19 @@ +age-encryption.org/v1 +-> ssh-ed25519 ptT1OQ YbyC+DC6FgqrAC95SCw8jAo8DLaGkbyLJI0hxxhGWQ8 +Nbd2l3saoGYlxQ9o3W8asjs8K8yP5yO0y71vunaZQ4I +-> ssh-ed25519 dHPgHQ PnlCMhZY8roW1DizJTD4XQpGY1HU8Y4a/zDXibsj1nI +prkGRLDO+IEeSjzlL9avFBa3NqWixUMhgKY3Q3clKlQ +-> ssh-ed25519 RlXbCA gBistiXVEPBzyl0LhYHTjYM+9MMRWAZeAkvvY2eao2w +wVneBdA33vpiYVfI8QUFvL+Sl3ieqWpci9JJtduiWOE +-> ssh-ed25519 g6Zebw wfOZjdT1xlBFSku+H/I9eh42GlcP+645Oso8MV4d+xI +GZUGUc+Hdc7/xIhHyUFTq7JjaIA8LV9eNVAykYWzSHY +-> ssh-ed25519 vDK6kA rDCnqNANoQ+Ly+RsModfCGpkWVceSa6YmBTdmhvbMGM +Lc9qv4ut5McGbMwYzbDWNqudIulfUgiSQKU4HOKm/ww +-> ssh-ed25519 mO4+dg ll5EjiAOBSLT6roZmpk2xBBANQVB5d1aLK/rZBIG7zA +L4WRFMloBb80V9wFMor1szmZnoI6IAGFDM78wpmdRCw +-> ssh-ed25519 IYHv1g serS7TzHDJNmR2q5T6bkA2+VMFLCv/2/TX21RkMltQg +jlDFwEfeJVlXPkZrZXaik/g7CHU+8DDNPtBRWfBr+Is +-> NmPzG*^B-grease 1 {K +grGuTEaLNqXOePkwLd/1fuwwbb3YyJzjxA +--- ZQEO/5MNTOHQUyYeeE6GisRA96U1bw7+xxCJQJwmxRQ +kXRg+* *=]r[ߓ{Ҵt!Kwaa5^|HZq+"'GqzԂt bNmLro'.} Ti2ԏDnz(gMt<\c+׀sfŘ-Bo\@ .._WY ;ȟ0P?9R6>avLj 0A}#ALg5}Ƒ1c@GWtWH&owA{HrK| =1hd]eNoG,(4%[X}DyqrdBJf.|ђѕ/uٯ|u,bktSg2lџ ")Ẅ́qa0&: