summaryrefslogtreecommitdiff
path: root/modules/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-03-11 12:51:58 +0300
committerAzat Bahawi <azat@bahawi.net>2023-03-11 12:51:58 +0300
commit0ef23d4501592a192ba020a2ac34abb1a3d8fc5e (patch)
tree17f0377d71f7c645acf8502c769a0ade76cbc901 /modules/common
parente40f7d991353ad70984afdf67b25c049190c56bd (diff)
2023-03-11
Diffstat (limited to 'modules/common')
-rw-r--r--modules/common/beets.nix73
-rw-r--r--modules/common/common/nix/default.nix1
-rw-r--r--modules/common/default.nix1
-rw-r--r--modules/common/emacs/default.nix5
-rw-r--r--modules/common/git.nix2
-rw-r--r--modules/common/openconnect.nix83
6 files changed, 6 insertions, 159 deletions
diff --git a/modules/common/beets.nix b/modules/common/beets.nix
deleted file mode 100644
index 83cbff1..0000000
--- a/modules/common/beets.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- config,
- lib,
- ...
-}:
-with lib; let
- cfg = config.nixfiles.modules.beets;
-in {
- options.nixfiles.modules.beets.enable =
- mkEnableOption "beets";
-
- config = mkIf cfg.enable {
- hm = let
- beetsdir = "${config.dirs.data}/beets";
- in {
- home.sessionVariables.BEETSDIR = beetsdir;
-
- programs = {
- beets = {
- enable = true;
-
- settings = {
- library = "${beetsdir}/library.db";
- directory = config.userDirs.music;
- plugins = "badfiles edit fetchart info mbsync scrub";
- original_date = true;
- import = {
- write = true;
- copy = true;
- move = false;
- bell = true;
- from_scratch = true;
- };
- match = {
- preferred = {
- countries = [
- "JP"
- "KR"
- "TW"
- "HK"
- "CN"
- "RU"
- "NL"
- "DE"
- "AT"
- "GB|UK"
- "CA"
- "AU"
- "NZ"
- "US"
- ];
- original_year = true;
- };
- };
- edit = {
- albumfields = "album artist albumartist";
- itemfields = "track title album artist albumartist day month year genre";
- };
- fetchart = {
- auto = true;
- cautious = true;
- cover_names = "cover Cover folder Folder art Art album Album front Front";
- sources = "filesystem coverart itunes amazon albumart wikipedia";
- };
- scrub.auto = true;
- };
- };
-
- bash.shellAliases.beet = "${config.hm.programs.beets.package}/bin/beet --config ${config.dirs.config}/beets/config.yaml";
- };
- };
- };
-}
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index 378cd36..9f80838 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -130,7 +130,6 @@ with lib; {
tor-browser = tor-browser-bundle-bin;
}))
agenix.overlays.default
- emacs-overlay.overlay
nur.overlay
];
diff --git a/modules/common/default.nix b/modules/common/default.nix
index e6040cd..b722cae 100644
--- a/modules/common/default.nix
+++ b/modules/common/default.nix
@@ -3,7 +3,6 @@ _: {
./alacritty.nix
./aria2.nix
./bat.nix
- ./beets.nix
./chromium.nix
./common
./curl.nix
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index 268d77d..2dbe53f 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -46,6 +46,7 @@ in {
asmfmt # :editor format
bash-language-server # :lang (sh +lsp)
clang-tools # :lang (cc +lsp) :editor format
+ cmake # :term vterm
cmake-format # :lang cc :editor format
cmigemo # :lang japanese
css-language-server # :lang (web +lsp)
@@ -53,6 +54,7 @@ in {
dockerfile-language-server # :tools (docker +lsp)
editorconfig # :tools editorconfig
fd # doom!
+ gcc # :tools magit :term vterm
gnuplot # :lang (org +gnuplot)
gnutls # doom!
go-language-server # :lang (go +lsp)
@@ -65,6 +67,7 @@ in {
html-tidy # :lang web
jre # :lang plantuml
json-language-server # :lang (json +lsp)
+ libtool # :term vterm
nix-language-server # :lang (nix +lsp)
nixfmt # :lang nix :editor format
nodePackages.eslint # :lang (json +lsp)
@@ -73,6 +76,7 @@ in {
nodePackages.stylelint # :lang web
nodejs # :tools debugger
pandoc # :lang org markdown latex
+ perl # term vterm
pinentry-emacs # doom!
pre-commit # :tools magit
ripgrep # doom!
@@ -175,7 +179,6 @@ in {
programs.emacs = {
enable = true;
package = pkgs.emacs28; # Pin to avoid surprises.
- extraPackages = p: with p; [vterm];
};
};
};
diff --git a/modules/common/git.nix b/modules/common/git.nix
index c3ebafc..ce4e505 100644
--- a/modules/common/git.nix
+++ b/modules/common/git.nix
@@ -68,6 +68,8 @@ in {
};
init.defaultBranch = "master";
status.submoduleSummary = true;
+ github.user = my.username;
+ gitlab.user = my.username;
}
// mapAttrs'
(n: v: nameValuePair ''url "git@${v}:"'' {insteadOf = "${n}:";}) {
diff --git a/modules/common/openconnect.nix b/modules/common/openconnect.nix
deleted file mode 100644
index 936c9d1..0000000
--- a/modules/common/openconnect.nix
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-with lib; let
- cfg = config.nixfiles.modules.openconnect;
-in {
- options.nixfiles.modules.openconnect.enable =
- mkEnableOption "OpenConnect VPN";
-
- config = mkIf cfg.enable {
- assertions = [
- {
- assertion = config.networking.networkmanager.enable;
- message = "NetworkManager is required";
- }
- ];
-
- # Spent three days trying to make this work but still getting "No SSO
- # handler" even on the HEAD version that 100% has SSO support baked in.
- # It's all so tiresome[1]... aaand KDE is not supported[2].
- #
- # I fucking hate AnyConnect, truly an example of how shit is is non-free
- # software. SAML also sucks balls. I also hate my company for using this
- # shit, guess I have no other choice but to use the absolute dogshit laptop
- # they gave me.
- #
- # [1]: https://gitlab.gnome.org/GNOME/NetworkManager-openconnect
- # [1]: https://gitlab.com/openconnect/openconnect/-/issues/424
- # [2]: https://groups.google.com/g/linux.debian.bugs.dist/c/lK8u-LMY7n4
- # [2]: https://bugs.kde.org/show_bug.cgi?id=448153
-
- networking.networkmanager.plugins = with pkgs; [
- ((networkmanager-openconnect.override {
- withGnome = false;
- openconnect = openconnect.overrideAttrs (_: _: {
- version = "unstable-2022-10-23";
- src = fetchFromGitLab {
- owner = "openconnect";
- repo = "openconnect";
- rev = "acdfc753f7885b2a539f99036ac41ba1b78cc7ae";
- hash = "sha256-ub+Z4WFD77h5YMQTb+TLc7EyY2KjBWglF1QVTirCHJM=";
- };
- });
- })
- .overrideAttrs (_: super: {
- version = "unstable-2022-09-10";
- src = fetchFromGitLab {
- domain = "gitlab.gnome.org";
- owner = "GNOME";
- repo = "NetworkManager-openconnect";
- rev = "3c1590786518e9acca33c250660ad21cae565acd";
- hash = "sha256-YTUN46QHsHkXPAhImPG/MMLMqjlSRknapVO8u43nnWk=";
- };
- buildInputs =
- super.buildInputs
- ++ [
- (webkitgtk_4_1.override {
- inherit (gnome) libsoup;
- })
- ];
- nativeBuildInputs =
- super.nativeBuildInputs
- ++ [
- autoreconfHook
- ];
- postPatch = ''
- substituteInPlace configure.ac \
- --replace "PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= 0.18)" ""
- '';
- preAutoreconf = ''
- autoupdate
- '';
- preConfigure = ''
- NOCONFIGURE=x ./autogen.sh
- touch gtk4/nm-openconnect-dialog.ui
- '';
- }))
- ];
- };
-}