diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-01-07 23:57:45 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-01-07 23:57:45 +0300 |
commit | 5a4e7e22a6975ebc3de70e68446ff53109c64170 (patch) | |
tree | 0004db42ea38a75bf9dc413f6b77e501f2270fad | |
parent | 2024-01-05 (diff) |
2024-01-07
Diffstat (limited to '')
-rw-r--r-- | checks.nix | 2 | ||||
-rw-r--r-- | flake.lock | 223 | ||||
-rw-r--r-- | flake.nix | 198 | ||||
-rw-r--r-- | modules/common/default.nix | 2 | ||||
-rw-r--r-- | modules/common/editorconfig.nix | 129 | ||||
-rw-r--r-- | modules/common/neovim/default.nix | 27 | ||||
-rw-r--r-- | modules/common/profiles/dev/default.nix | 18 | ||||
-rw-r--r-- | modules/common/profiles/dev/editorconfig.ini | 96 | ||||
-rw-r--r-- | modules/common/profiles/headful.nix | 1 | ||||
-rw-r--r-- | modules/common/vscode.nix | 2 | ||||
-rw-r--r-- | modules/nixos/firefox/default.nix | 2 | ||||
-rw-r--r-- | modules/nixos/games/minecraft.nix | 4 | ||||
-rw-r--r-- | modules/nixos/nsd.nix | 2 | ||||
-rw-r--r-- | modules/nixos/vim/default.nix | 8 | ||||
-rw-r--r-- | nixosConfigurations/manwe/mailserver/default.nix | 2 |
15 files changed, 284 insertions, 432 deletions
diff --git a/checks.nix b/checks.nix index 89df268..142ad1d 100644 --- a/checks.nix +++ b/checks.nix @@ -4,7 +4,7 @@ }: let pkgs = inputs.self.legacyPackages.${system}; in { - preCommit = inputs.pre-commit-hooks.lib.${system}.run { + preCommit = inputs.pre-commit.lib.${system}.run { src = builtins.path { name = "nixfiles"; path = ./.; diff --git a/flake.lock b/flake.lock index 9bf0455..9da87d4 100644 --- a/flake.lock +++ b/flake.lock @@ -11,7 +11,9 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1703433843, @@ -23,7 +25,6 @@ }, "original": { "owner": "ryantm", - "ref": "main", "repo": "agenix", "type": "github" } @@ -50,12 +51,11 @@ }, "original": { "owner": "pinpox", - "ref": "main", "repo": "alertmanager-ntfy", "type": "github" } }, - "arkenfox-nixos": { + "arkenfox": { "inputs": { "flake-compat": [ "flake-compat" @@ -67,7 +67,7 @@ "nixpkgs" ], "pre-commit": [ - "pre-commit-hooks" + "pre-commit" ] }, "locked": { @@ -80,7 +80,6 @@ }, "original": { "owner": "dwarfmaster", - "ref": "main", "repo": "arkenfox-nixos", "type": "github" } @@ -125,21 +124,20 @@ ] }, "locked": { - "lastModified": 1703990467, - "narHash": "sha256-LItEeQVwDfLnavNskwdfRnonbEdq8DYiJlWRtF+bwng=", + "lastModified": 1704277720, + "narHash": "sha256-meAKNgmh3goankLGWqqpw73pm9IvXjEENJloF0coskE=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "1a41453cba42a3a1af2fff003be455ddbd75386c", + "rev": "0dd382b70c351f528561f71a0a7df82c9d2be9a4", "type": "github" }, "original": { "owner": "LnL7", - "ref": "master", "repo": "nix-darwin", "type": "github" } }, - "dns-nix": { + "dns": { "inputs": { "flake-utils": [ "flake-utils" @@ -158,7 +156,6 @@ }, "original": { "owner": "kirelagin", - "ref": "master", "repo": "dns.nix", "type": "github" } @@ -191,14 +188,15 @@ }, "original": { "owner": "NixOS", - "ref": "master", "repo": "flake-registry", "type": "github" } }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1701680307, @@ -210,7 +208,6 @@ }, "original": { "owner": "numtide", - "ref": "main", "repo": "flake-utils", "type": "github" } @@ -218,7 +215,7 @@ "gitignore": { "inputs": { "nixpkgs": [ - "pre-commit-hooks", + "pre-commit", "nixpkgs" ] }, @@ -243,16 +240,15 @@ ] }, "locked": { - "lastModified": 1704100519, - "narHash": "sha256-SgZC3cxquvwTN07vrYYT9ZkfvuhS5Y1k1F4+AMsuflc=", + "lastModified": 1704498488, + "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e91c5df192395753d8e6d55a0352109cb559790", + "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", "type": "github" }, "original": { "owner": "nix-community", - "ref": "master", "repo": "home-manager", "type": "github" } @@ -268,39 +264,44 @@ }, "original": { "owner": "nix-community", - "ref": "master", "repo": "impermanence", "type": "github" } }, - "nix-minecraft": { + "mailserver": { "inputs": { + "blobs": "blobs", "flake-compat": [ "flake-compat" ], - "flake-utils": [ - "flake-utils" - ], "nixpkgs": [ "nixpkgs" + ], + "nixpkgs-22_11": [ + "nixpkgs-stable" + ], + "nixpkgs-23_05": [ + "nixpkgs-stable" + ], + "utils": [ + "flake-utils" ] }, "locked": { - "lastModified": 1703985842, - "narHash": "sha256-LvkAqCSywX16fJuhNh78Q5ORkNguKCR3D6olPywAGx4=", - "owner": "Infinidoge", - "repo": "nix-minecraft", - "rev": "17e2b168bed12c444afe9a217708c2c1f62ae461", - "type": "github" + "lastModified": 1703666786, + "narHash": "sha256-SLPNpM/rI8XPyVJAxMYAe+n6NiYSpuXvdwPILHP4yZI=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "b5023b36a1f6628865cb42b4353bd2ddde0ea9f4", + "type": "gitlab" }, "original": { - "owner": "Infinidoge", - "ref": "master", - "repo": "nix-minecraft", - "type": "github" + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "type": "gitlab" } }, - "nix-vscode-extensions": { + "minecraft": { "inputs": { "flake-compat": [ "flake-compat" @@ -313,43 +314,41 @@ ] }, "locked": { - "lastModified": 1704072273, - "narHash": "sha256-F+QdZ9ipGQD3I1GoSIiFC3wp5TYO1BvtzJYz5I0kWQo=", - "owner": "nix-community", - "repo": "nix-vscode-extensions", - "rev": "4e5d21ea8223e59d5402183817a70c6426caf115", + "lastModified": 1704590773, + "narHash": "sha256-cCsynLrSud8BwWEgf8W2/uq5gbNhFSEV4CxtkrM1Bik=", + "owner": "Infinidoge", + "repo": "nix-minecraft", + "rev": "0520418311974adf427b917b972f97d92d3043c2", "type": "github" }, "original": { - "owner": "nix-community", - "ref": "master", - "repo": "nix-vscode-extensions", + "owner": "Infinidoge", + "repo": "nix-minecraft", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1704124233, - "narHash": "sha256-lBHs/yUtkcGgapHRS31oOb5NqvnVrikvktGOW8rK+sE=", + "lastModified": 1704632650, + "narHash": "sha256-83J/nd/NoLqo3vj0S0Ppqe8L+ijIFiGL6HNDfCCUD/Q=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "f752581d6723a10da7dfe843e917a3b5e4d8115a", + "rev": "c478b3d56969006e015e55aaece4931f3600c1b2", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", "repo": "nixos-hardware", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1704008649, - "narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=", + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", "type": "github" }, "original": { @@ -361,11 +360,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1704127928, - "narHash": "sha256-c8wWU4o3ktbnemVPSdQad1XmmcbgrBwzve2xCrXlxpg=", + "lastModified": 1704633295, + "narHash": "sha256-QYadssozKgm2xzLpBDn3Xw9PfaQudCvl9qyI19HbF2s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e827ca679d9cfb1e3304c22ed06bc2ded63567e2", + "rev": "d6b045fcc3d2eb036e16b04b1127f1457eb242d7", "type": "github" }, "original": { @@ -377,11 +376,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1704128343, - "narHash": "sha256-caC2c+iwY3gF4T/pEnLFGwuElA9PB1Sd905sjngoBUQ=", + "lastModified": 1704617685, + "narHash": "sha256-E6XALyIia7tAvE2QEr9PrrD9mhw6Up45SNmE9utVfqQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ba7e238c89b363f30c7e2127d5b2023f8bc6182", + "rev": "207b14c6bd1065255e6ecffcfe0c36a7b54f8e48", "type": "github" }, "original": { @@ -391,30 +390,19 @@ "type": "github" } }, - "nixvim": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks": [ - "pre-commit-hooks" - ] - }, + "nixpkgs-stable_2": { "locked": { - "lastModified": 1704074057, - "narHash": "sha256-A8kZLLVTOtgU9aQvQf7v3UxvrEBc0KXKNh6GJnFEYCg=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "f2e808a519d9526cf7df9047f20f71c323c21ac9", + "lastModified": 1704290814, + "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", "type": "github" }, "original": { - "owner": "nix-community", - "ref": "main", - "repo": "nixvim", + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", "type": "github" } }, @@ -452,7 +440,7 @@ "type": "github" } }, - "pre-commit-hooks": { + "pre-commit": { "inputs": { "flake-compat": [ "flake-compat" @@ -464,9 +452,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": [ - "nixpkgs-stable" - ] + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1703939133, @@ -487,63 +473,29 @@ "inputs": { "agenix": "agenix", "alertmanager-ntfy": "alertmanager-ntfy", - "arkenfox-nixos": "arkenfox-nixos", + "arkenfox": "arkenfox", "azahi-cc": "azahi-cc", "darwin": "darwin", - "dns-nix": "dns-nix", + "dns": "dns", "flake-compat": "flake-compat", "flake-registry": "flake-registry", "flake-utils": "flake-utils", "home-manager": "home-manager", "impermanence": "impermanence", - "nix-minecraft": "nix-minecraft", - "nix-vscode-extensions": "nix-vscode-extensions", + "mailserver": "mailserver", + "minecraft": "minecraft", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable", - "nixvim": "nixvim", "nmap-vulners": "nmap-vulners", "nmap-vulscan": "nmap-vulscan", - "pre-commit-hooks": "pre-commit-hooks", - "simple-nixos-mailserver": "simple-nixos-mailserver", + "pre-commit": "pre-commit", + "systems": "systems", + "vscode-extensions": "vscode-extensions", "xmonad-ng": "xmonad-ng" } }, - "simple-nixos-mailserver": { - "inputs": { - "blobs": "blobs", - "flake-compat": [ - "flake-compat" - ], - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-22_11": [ - "nixpkgs-stable" - ], - "nixpkgs-23_05": [ - "nixpkgs-stable" - ], - "utils": [ - "flake-utils" - ] - }, - "locked": { - "lastModified": 1703666786, - "narHash": "sha256-SLPNpM/rI8XPyVJAxMYAe+n6NiYSpuXvdwPILHP4yZI=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "b5023b36a1f6628865cb42b4353bd2ddde0ea9f4", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "ref": "master", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -559,18 +511,29 @@ "type": "github" } }, - "systems_2": { + "vscode-extensions": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "lastModified": 1704590722, + "narHash": "sha256-exh2bDwYYkdJgm5wLvpWht5bRuPigk8v4Z7l4RegX3Q=", + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "rev": "7d0eace387cf4fd2812d0791684f4befa0865512", "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", + "owner": "nix-community", + "repo": "nix-vscode-extensions", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 04ce52b..f41d90f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,113 +1,60 @@ { - description = "azahi's NixOS/nix-darwin/home-manager den"; + description = "Hi!"; # The `flake.lock` generation is not computable[1]. So far it's impossible to # add helper functions to manage inputs. # # [1]: https://github.com/NixOS/nix/issues/5373 inputs = { - nixpkgs = { - # type = "path"; - # path = "/home/azahi/src/nixpkgs"; - type = "github"; - owner = "NixOS"; - repo = "nixpkgs"; - ref = "nixpkgs-unstable"; - }; - - # nixpkgs-local = { - # type = "path"; - # path = "/home/azahi/src/nixpkgs"; - # }; - - nixpkgs-master = { - type = "github"; - owner = "NixOS"; - repo = "nixpkgs"; - ref = "master"; - }; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/release-23.11"; - nixpkgs-stable = { - type = "github"; - owner = "NixOS"; - repo = "nixpkgs"; - ref = "release-23.11"; - }; - - nixos-hardware = { - type = "github"; - owner = "NixOS"; - repo = "nixos-hardware"; - ref = "master"; - }; + nixos-hardware.url = "github:NixOS/nixos-hardware"; darwin = { - type = "github"; - owner = "LnL7"; - repo = "nix-darwin"; - ref = "master"; + url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { - # type = "path"; - # path = "/home/azahi/src/home-manager"; - type = "github"; - owner = "nix-community"; - repo = "home-manager"; - ref = "master"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - impermanence = { - type = "github"; - owner = "nix-community"; - repo = "impermanence"; - ref = "master"; - }; + impermanence.url = "github:nix-community/impermanence"; - nixvim = { - type = "github"; - owner = "nix-community"; - repo = "nixvim"; - ref = "main"; + agenix = { + url = "github:ryantm/agenix"; inputs = { - flake-utils.follows = "flake-utils"; + darwin.follows = "darwin"; + home-manager.follows = "home-manager"; nixpkgs.follows = "nixpkgs"; - pre-commit-hooks.follows = "pre-commit-hooks"; + systems.follows = "systems"; }; }; - nix-vscode-extensions = { - type = "github"; - owner = "nix-community"; - repo = "nix-vscode-extensions"; - ref = "master"; + dns = { + url = "github:kirelagin/dns.nix"; inputs = { - flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; }; }; - arkenfox-nixos = { - type = "github"; - owner = "dwarfmaster"; - repo = "arkenfox-nixos"; - ref = "main"; + mailserver = { + url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; inputs = { flake-compat.follows = "flake-compat"; - flake-utils.follows = "flake-utils"; + nixpkgs-22_11.follows = "nixpkgs-stable"; + nixpkgs-23_05.follows = "nixpkgs-stable"; nixpkgs.follows = "nixpkgs"; - pre-commit.follows = "pre-commit-hooks"; + utils.follows = "flake-utils"; }; }; - nix-minecraft = { - type = "github"; - owner = "Infinidoge"; - repo = "nix-minecraft"; - ref = "master"; + alertmanager-ntfy = { + url = "github:pinpox/alertmanager-ntfy"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; @@ -115,86 +62,35 @@ }; }; - dns-nix = { - type = "github"; - owner = "kirelagin"; - repo = "dns.nix"; - ref = "master"; - inputs = { - flake-utils.follows = "flake-utils"; - nixpkgs.follows = "nixpkgs"; - }; - }; - - simple-nixos-mailserver = { - type = "gitlab"; - owner = "simple-nixos-mailserver"; - repo = "nixos-mailserver"; - ref = "master"; + vscode-extensions = { + url = "github:nix-community/nix-vscode-extensions"; inputs = { flake-compat.follows = "flake-compat"; - nixpkgs-22_11.follows = "nixpkgs-stable"; - nixpkgs-23_05.follows = "nixpkgs-stable"; + flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; - utils.follows = "flake-utils"; }; }; - alertmanager-ntfy = { - type = "github"; - owner = "pinpox"; - repo = "alertmanager-ntfy"; - ref = "main"; + arkenfox = { + url = "github:dwarfmaster/arkenfox-nixos"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; + pre-commit.follows = "pre-commit"; }; }; - flake-utils = { - type = "github"; - owner = "numtide"; - repo = "flake-utils"; - ref = "main"; - }; - - flake-registry = { - type = "github"; - owner = "NixOS"; - repo = "flake-registry"; - ref = "master"; - flake = false; - }; - - agenix = { - type = "github"; - owner = "ryantm"; - repo = "agenix"; - ref = "main"; - inputs = { - darwin.follows = "darwin"; - home-manager.follows = "home-manager"; - nixpkgs.follows = "nixpkgs"; - }; - }; - - pre-commit-hooks = { - type = "github"; - owner = "cachix"; - repo = "pre-commit-hooks.nix"; - ref = "master"; + minecraft = { + url = "github:Infinidoge/nix-minecraft"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; - nixpkgs-stable.follows = "nixpkgs-stable"; nixpkgs.follows = "nixpkgs"; }; }; xmonad-ng = { - # type = "path"; - # path = "/home/azahi/src/xmonad-ng"; url = "git+https://git.azahi.cc/xmonad-ng?ref=master"; inputs = { flake-utils.follows = "flake-utils"; @@ -208,27 +104,33 @@ }; nmap-vulners = { - type = "github"; - owner = "vulnersCom"; - repo = "nmap-vulners"; - ref = "master"; + url = "github:vulnersCom/nmap-vulners/master"; flake = false; }; - nmap-vulscan = { - type = "github"; - owner = "scipag"; - repo = "vulscan"; - ref = "master"; + url = "github:scipag/vulscan/master"; flake = false; }; - flake-compat = { - type = "github"; - owner = "edolstra"; - repo = "flake-compat"; - ref = "master"; + pre-commit = { + url = "github:cachix/pre-commit-hooks.nix/master"; + inputs = { + flake-compat.follows = "flake-compat"; + flake-utils.follows = "flake-utils"; + nixpkgs.follows = "nixpkgs"; + }; + }; + + systems.url = "github:nix-systems/default"; + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + flake-registry = { + url = "github:NixOS/flake-registry"; + flake = false; }; + flake-compat.url = "github:edolstra/flake-compat/master"; }; outputs = inputs: diff --git a/modules/common/default.nix b/modules/common/default.nix index 3b42031..c6c7c81 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -6,6 +6,7 @@ _: { ./common ./curl.nix ./direnv.nix + ./editorconfig.nix ./emacs ./eza.nix ./fonts.nix @@ -13,7 +14,6 @@ _: { ./gnupg.nix ./htop.nix ./mpv.nix - ./neovim ./nmap.nix ./openssh.nix ./password-store.nix diff --git a/modules/common/editorconfig.nix b/modules/common/editorconfig.nix new file mode 100644 index 0000000..822acf6 --- /dev/null +++ b/modules/common/editorconfig.nix @@ -0,0 +1,129 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.nixfiles.modules.editorconfig; +in { + options.nixfiles.modules.editorconfig.enable = mkEnableOption "Editorconfig"; + + config = mkIf cfg.enable { + hm.editorconfig = { + enable = true; + settings = { + "*" = { + charset = "utf-8"; + end_of_line = "lf"; + indent_size = 2; + indent_style = "space"; + insert_final_newline = true; + max_line_length = 80; + trim_trailing_whitespace = true; + }; + + # https://google.github.io/styleguide/cppguide.html#Spaces_vs._Tabs + "*.{c,cc,cpp,cxx,h,hh,hpp,hxx}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://go.dev/doc/effective_go#formatting + "*.go" = { + indent_size = 2; + indent_style = "tab"; + }; + + # https://google.github.io/styleguide/pyguide.html#s3.4-indentation + # https://peps.python.org/pep-0008/#indentation + "*.py" = { + indent_size = 4; + indent_style = "space"; + }; + + # https://google.github.io/styleguide/shellguide.html#s5-formatting + "*.{sh,bash}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17800010.3 + # https://en.wikibooks.org/wiki/Haskell/Indentation + "*.hs" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://google.github.io/styleguide/lispguide.xml#Formatting + "*.{lisp,cl,rkt,scm,el}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://github.com/ziglang/zig/wiki/FAQ#why-does-zig-fmt-use-spaces-instead-of-tabs + "*.zig" = { + indent_size = 4; + indent_style = "space"; + }; + + "*.{asm,s}" = { + indent_size = 4; + indent_style = "spaces"; + }; + + # https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html + "{Makefile*,*.mk}" = { + indent_size = 4; + indent_style = "tab"; + }; + + # https://cmake-format.readthedocs.io/en/latest/configopts.html#tab-size + # https://cmake-format.readthedocs.io/en/latest/configopts.html#use-tabchars + "{CMakeLists.txt,*.cmake}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://github.com/NixOS/rfcs/pull/166 + "*.nix" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://developer.hashicorp.com/terraform/language/syntax/style + "*.{tf,hcl}" = { + indent_size = 2; + indent_style = "space"; + }; + + "*.{json,jsn}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://yaml.org/spec/1.2.2/#61-indentation-spaces + "*.{yaml,yml}" = { + indent_size = 2; + indent_style = "space"; + }; + + "*.{toml,tml}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://google.github.io/styleguide/htmlcssguide.html#Indentation + "*.{html,css}" = { + indent_size = 2; + indent_style = "space"; + }; + + # https://latexindentpl.readthedocs.io/en/latest/sec-default-user-local.html + "*.{tex,cls}" = { + indent_size = 4; + indent_style = "tab"; + }; + }; + }; + }; +} diff --git a/modules/common/neovim/default.nix b/modules/common/neovim/default.nix deleted file mode 100644 index 1e5f103..0000000 --- a/modules/common/neovim/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - config, - inputs, - lib, - ... -}: -with lib; let - cfg = config.nixfiles.modules.neovim; -in { - options.nixfiles.modules.neovim.enable = mkEnableOption "NeoVim"; - - config = mkIf cfg.enable { - hm = { - imports = [inputs.nixvim.homeManagerModules.nixvim]; - - programs.nixvim = { - enable = true; - - plugins = { - lsp.enable = true; - nix.enable = true; - surround.enable = true; - }; - }; - }; - }; -} diff --git a/modules/common/profiles/dev/default.nix b/modules/common/profiles/dev/default.nix index 2d0c0f6..ecd586a 100644 --- a/modules/common/profiles/dev/default.nix +++ b/modules/common/profiles/dev/default.nix @@ -20,6 +20,7 @@ in { bat.enable = true; curl.enable = true; direnv.enable = true; + editorconfig.enable = true; git.client.enable = true; gnupg.enable = true; nmap.enable = true; @@ -28,25 +29,9 @@ in { hm.home = { file = { - ".editorconfig".source = ./editorconfig.ini; - ".gdbinit".source = ./gdbinit; ".ghc/ghci.conf".source = ./ghci.conf; - - ".stack/config.yaml".text = generators.toYAML {} { - templates.params = rec { - author-name = my.fullname; - author-email = my.email; - copyright = "Copyright (c) 2023 ${author-name} <${author-email}>"; - github-username = my.username; - }; - }; - - ".stack/global-project/stack.yaml".text = generators.toYAML {} { - packages = []; - resolver = "lts-21.20"; - }; }; sessionVariables = rec { @@ -74,6 +59,7 @@ in { CARGO_HOME = "${config.my.home}/.cargo"; GOPATH = "${config.my.home}/.go"; + GORE_HOME = "${config.my.home}/.gore"; PYTHONSTARTUP = ./pystartup.py; }; diff --git a/modules/common/profiles/dev/editorconfig.ini b/modules/common/profiles/dev/editorconfig.ini deleted file mode 100644 index 87f47eb..0000000 --- a/modules/common/profiles/dev/editorconfig.ini +++ /dev/null @@ -1,96 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -max_line_length = 80 -trim_trailing_whitespace = true - -# C/C++ -[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,ixx}] -indent_size = 4 -indent_style = tab - -# Go -[*.go] -indent_size = 4 -indent_style = tab - -# Python -[*.py] -indent_size = 4 -indent_style = space -max_line_length = 72 - -# Haskell -[*.hs] -indent_size = 2 -indent_style = space - -# Lisp(s) -[*.{lisp,cl,rkt,scm,el}] -indent_size = 2 -indent_style = space - -# Zig -[*.zig] -indent_size = 4 -indent_style = tab - -# Assembly -[*.{asm,s}] -indent_size = 4 -indent_style = tab - -# GNU Cringetools -[configure.ac] -indent_size = 4 -indent_style = tab - -# Make -[{Makefile*,*.mk}] -indent_size = 4 -indent_style = tab - -# CMake -[{CMakeLists.txt,*.cmake}] -indent_size = 8 -indent_style = tab - -# Nix -[*.nix] -indent_size = 2 -indent_style = space - -# HCL -[*.{tf,hcl}] -indent_size = 2 -indent_style = space - -# JSON -[*.json] -indent_size = 2 -indent_style = space - -# YAML -[*.{yaml,yml}] -indent_size = 2 -indent_style = space - -# TOML -[*.{toml,tml}] -indent_size = 4 -indent_style = space - -# Markup -[*.{html,xml}] -indent_size = 4 -indent_style = tab - -# (La)TeX -[*.{tex,cls}] -indent_size = 4 -indent_style = tab diff --git a/modules/common/profiles/headful.nix b/modules/common/profiles/headful.nix index 094d5dd..dc8e1d6 100644 --- a/modules/common/profiles/headful.nix +++ b/modules/common/profiles/headful.nix @@ -19,7 +19,6 @@ in { aria2.enable = true; emacs.enable = true; mpv.enable = true; - neovim.enable = true; openssh.client.enable = true; password-store.enable = true; vscode.enable = true; diff --git a/modules/common/vscode.nix b/modules/common/vscode.nix index 62abcf8..074f6f2 100644 --- a/modules/common/vscode.nix +++ b/modules/common/vscode.nix @@ -241,6 +241,6 @@ in { }; }; - nixpkgs.overlays = [inputs.nix-vscode-extensions.overlays.default]; + nixpkgs.overlays = [inputs.vscode-extensions.overlays.default]; }; } diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix index 10d5e98..4c9437c 100644 --- a/modules/nixos/firefox/default.nix +++ b/modules/nixos/firefox/default.nix @@ -18,7 +18,7 @@ in { ]; hm = { - imports = [inputs.arkenfox-nixos.hmModules.arkenfox]; + imports = [inputs.arkenfox.hmModules.arkenfox]; home.packages = with pkgs; [profile-cleaner]; diff --git a/modules/nixos/games/minecraft.nix b/modules/nixos/games/minecraft.nix index e5cee32..8a1a0b5 100644 --- a/modules/nixos/games/minecraft.nix +++ b/modules/nixos/games/minecraft.nix @@ -8,7 +8,7 @@ with lib; let cfg = config.nixfiles.modules.games.minecraft; in { - imports = [inputs.nix-minecraft.nixosModules.minecraft-servers]; + imports = [inputs.minecraft.nixosModules.minecraft-servers]; options.nixfiles.modules.games.minecraft = { client.enable = mkEnableOption "Minecraft client"; @@ -78,7 +78,7 @@ in { }; }; - nixpkgs.overlays = [inputs.nix-minecraft.overlay]; + nixpkgs.overlays = [inputs.minecraft.overlay]; my.extraGroups = [config.services.minecraft-servers.group]; }) diff --git a/modules/nixos/nsd.nix b/modules/nixos/nsd.nix index 2266ea5..ae72f1d 100644 --- a/modules/nixos/nsd.nix +++ b/modules/nixos/nsd.nix @@ -48,7 +48,7 @@ in { ratelimit.enable = true; zones = let - dns = inputs.dns-nix.lib; + dns = inputs.dns.lib; in with dns.combinators; let ips = hostname: diff --git a/modules/nixos/vim/default.nix b/modules/nixos/vim/default.nix index 16e2d51..2fdf064 100644 --- a/modules/nixos/vim/default.nix +++ b/modules/nixos/vim/default.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - this, ... }: with lib; let @@ -11,13 +10,10 @@ in { config = mkIf cfg.enable { programs.vim.package = (pkgs.vim-full.override { - features = "normal"; cscopeSupport = false; darwinSupport = false; - guiSupport = - if this.isHeadful - then "gtk3" - else false; + features = "normal"; + guiSupport = "gtk3"; luaSupport = false; multibyteSupport = false; netbeansSupport = false; diff --git a/nixosConfigurations/manwe/mailserver/default.nix b/nixosConfigurations/manwe/mailserver/default.nix index 88edf25..cb6b3dd 100644 --- a/nixosConfigurations/manwe/mailserver/default.nix +++ b/nixosConfigurations/manwe/mailserver/default.nix @@ -5,7 +5,7 @@ ... }: with lib; { - imports = [inputs.simple-nixos-mailserver.nixosModule]; + imports = [inputs.mailserver.nixosModule]; # Redis? ark.directories = with config.mailserver; [ |