diff --git a/home-manager/machines.nix b/home-manager/machines.nix index fb7c5a30..82975dde 100644 --- a/home-manager/machines.nix +++ b/home-manager/machines.nix @@ -157,13 +157,13 @@ in { (import ./roles/state.nix "default") ]; hera.default = makeConfig "hera" (on-my-machines - ++ [ - ./roles/fetch-banking-timer.nix - ./roles/weechat - ./roles/mail-sort.nix - ./roles/mail2rss.nix - ./roles/headless-mpd.nix - ./roles/headless.nix - ./roles/create-plans.nix - ]); + ++ [ + ./roles/fetch-banking-timer.nix + ./roles/weechat + ./roles/mail-sort.nix + ./roles/mail2rss.nix + ./roles/headless-mpd.nix + ./roles/headless.nix + ./roles/create-plans.nix + ]); } diff --git a/home-manager/roles/daily-driver-programs.nix b/home-manager/roles/daily-driver-programs.nix index 0425d244..4ed74224 100644 --- a/home-manager/roles/daily-driver-programs.nix +++ b/home-manager/roles/daily-driver-programs.nix @@ -20,14 +20,12 @@ inherit (pkgs) # web - chromium mumble upower speedtest-cli acpi # tools & office - feh gimp imagemagick @@ -40,7 +38,6 @@ beets zbar # media - ncpamixer pavucontrol playerctl diff --git a/home-manager/roles/neovim/default.nix b/home-manager/roles/neovim/default.nix index cb869ff8..9bf2021b 100644 --- a/home-manager/roles/neovim/default.nix +++ b/home-manager/roles/neovim/default.nix @@ -33,9 +33,12 @@ inherit (pkgs) rust-analyzer - taplo # toml - nil # nix - texlab # latex + taplo + # toml + nil + # nix + texlab + # latex lean yaml-language-server ; @@ -97,88 +100,61 @@ in { inherit (pkgs.vimPlugins) # coc-tabnine (TODO: Why doesn‘t it work?) - # TODO: tabnine config in home-manager - # TODO: tabnine lsp: nix, rust, pandoc/latex lsp? was noch? - # === - # Basic IDE plugins - coc-nvim airline # same word highlighting when not supported by language - coc-highlight coc-explorer # searches - coc-fzf fzf-vim # general whitespace - vim-trailing-whitespace vim-autoformat # Git - coc-git # statusline, numberline and explorer infos - fugitive # various git commands - # Commenting and Uncommenting - nerdcommenter # Theme - papercolor-theme vim-airline-themes LanguageTool-nvim vim-css-color vista-vim # === - # Languages - # haskell syntax highlighting - haskell-vim vim-hoogle # nix syntax highlighting - vim-nix vim-markdown # latex - vimtex coc-vimtex # not sure if I need two - # ledger - vim-ledger # rust - coc-rls # python - coc-python # css - coc-css # yaml - coc-yaml # json - coc-json # html - coc-html # dhall - dhall-vim ; }; diff --git a/home-manager/roles/weechat/default.nix b/home-manager/roles/weechat/default.nix index 2b23e1cc..b0af1b17 100644 --- a/home-manager/roles/weechat/default.nix +++ b/home-manager/roles/weechat/default.nix @@ -8,11 +8,11 @@ with lib; let weechat = pkgs.wrapWeechat pkgs.weechat-unwrapped { configure = {availablePlugins, ...}: { plugins = builtins.attrValues (availablePlugins - // { - python = - availablePlugins.python.withPackages - (_: [pkgs.weechatScripts.weechat-matrix]); - }); + // { + python = + availablePlugins.python.withPackages + (_: [pkgs.weechatScripts.weechat-matrix]); + }); scripts = [pkgs.weechatScripts.weechat-matrix]; }; }; @@ -74,12 +74,12 @@ in { [server] ${ lib.concatStringsSep "\n" (lib.mapAttrsToList - (server: serverConfig: '' - ${server}.address = "${serverConfig.address}" - ${server}.autoconnect = on - ${server}.username = "${serverConfig.user}" - ${server}.password = "${serverConfig.password}" - '') (pkgs.privateValue {} "weechat/matrix")) + (server: serverConfig: '' + ${server}.address = "${serverConfig.address}" + ${server}.autoconnect = on + ${server}.username = "${serverConfig.user}" + ${server}.password = "${serverConfig.password}" + '') (pkgs.privateValue {} "weechat/matrix")) } ''; }; diff --git a/home-manager/roles/zettelkasten.nix b/home-manager/roles/zettelkasten.nix index 821b160b..5e818d5e 100644 --- a/home-manager/roles/zettelkasten.nix +++ b/home-manager/roles/zettelkasten.nix @@ -2,10 +2,7 @@ config, pkgs, ... -}: let - emanote_commit = (builtins.fromJSON (builtins.readFile ../../nix/sources.json)).emanote.rev; - emanote = builtins.getFlake "github:srid/emanote/${emanote_commit}"; -in { +}: { imports = [emanote.homeManagerModule]; services.emanote = { enable = true; @@ -14,6 +11,6 @@ in { notes = [ "${config.home.homeDirectory}/git/notes" # add as many layers as you like ]; - package = emanote.packages."${builtins.currentSystem}".default; + package = pkgs.emanote; }; } diff --git a/home.nix b/home.nix index 951bf665..dca2b17f 100644 --- a/home.nix +++ b/home.nix @@ -3,12 +3,12 @@ let modes = import home-manager/machines.nix; in lib.listToAttrs (lib.flatten (lib.mapAttrsToList - ( - host: - lib.mapAttrsToList - (mode: config: { - name = "${host}-${mode}"; - value = config; - }) - ) - modes)) + ( + host: + lib.mapAttrsToList + (mode: config: { + name = "${host}-${mode}"; + value = config; + }) + ) + modes)) diff --git a/nix/sources.json b/nix/sources.json index 67a37cb5..4be414a5 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,4 +1,16 @@ { + "emanote": { + "branch": "master", + "description": "Spiritual successor to neuron, based on Ema.", + "homepage": "https://emanote.srid.ca", + "owner": "srid", + "repo": "emanote", + "rev": "3300092d40c9092e33a6b22e53a30a2a82796138", + "sha256": "0zfr6lcab9cy5qrympyrqga2z1v2fs7dqcfb2jfr5vmm3mlfywdj", + "type": "tarball", + "url": "https://github.com/srid/emanote/archive/3300092d40c9092e33a6b22e53a30a2a82796138.tar.gz", + "url_template": "https://github.com///archive/.tar.gz" + }, "hexa-nur-packages": { "branch": "master", "description": "My personal NUR repository: [maintainer=@mweinelt] ", diff --git a/nixos/machines/hera/configuration.nix b/nixos/machines/hera/configuration.nix index 212a2008..55c413e2 100644 --- a/nixos/machines/hera/configuration.nix +++ b/nixos/machines/hera/configuration.nix @@ -96,10 +96,10 @@ in { }; } // lib.listToAttrs (map (name: { - inherit name; - value = {serviceConfig.Type = "oneshot";}; - }) - backupJobNames); + inherit name; + value = {serviceConfig.Type = "oneshot";}; + }) + backupJobNames); services = { postgresql = { enable = true; diff --git a/nixos/roles/coturn.nix b/nixos/roles/coturn.nix index d2ca40c9..a7d2156f 100644 --- a/nixos/roles/coturn.nix +++ b/nixos/roles/coturn.nix @@ -45,7 +45,7 @@ in { cert = "${key_dir}/fullchain.pem"; static-auth-secret = (pkgs.privateValue {turn_shared_secret = "";} - "matrix/server-secrets") + "matrix/server-secrets") .turn_shared_secret; realm = fqdn; listening-ips = [config.m-0.hosts.hera config.m-0.hosts.hera-v4]; diff --git a/nixos/roles/email2matrix.nix b/nixos/roles/email2matrix.nix index 11bf833d..40ba5407 100644 --- a/nixos/roles/email2matrix.nix +++ b/nixos/roles/email2matrix.nix @@ -20,21 +20,21 @@ Matrix = { Mappings = [ (default_mailbox - // { - MailboxName = "notify"; - MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de"; - }) + // { + MailboxName = "notify"; + MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de"; + }) (default_mailbox - // { - MailboxName = "subjects"; - MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de"; - IgnoreBody = true; - }) + // { + MailboxName = "subjects"; + MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de"; + IgnoreBody = true; + }) (default_mailbox - // { - MailboxName = "weather"; - MatrixRoomId = "!ELeFcSrHXgMqOmwnxg:maralorn.de"; - }) + // { + MailboxName = "weather"; + MatrixRoomId = "!ELeFcSrHXgMqOmwnxg:maralorn.de"; + }) ]; }; Misc = {Debug = true;}; diff --git a/nixos/roles/fonts.nix b/nixos/roles/fonts.nix index 8cd8c783..da6d12de 100644 --- a/nixos/roles/fonts.nix +++ b/nixos/roles/fonts.nix @@ -19,15 +19,16 @@ fonts = builtins.attrValues { inherit (pkgs) - nerdfonts # For all my terminal needs. - - libertinus # nice text font - - material-icons # icons in my app - - b612 # sans font, very good for displays - - noto-fonts # for unicode fallback + nerdfonts + # For all my terminal needs. + libertinus + # nice text font + material-icons + # icons in my app + b612 + # sans font, very good for displays + noto-fonts + # for unicode fallback ; }; }; @@ -39,9 +40,9 @@ font_sources = map (v: v.src) (lib.filter (v: v ? src) config.fonts.fonts); in builtins.listToAttrs (lib.imap0 - (n: source: - lib.nameValuePair "src-cache/fonts/${toString n}" { - inherit source; - }) - font_sources); + (n: source: + lib.nameValuePair "src-cache/fonts/${toString n}" { + inherit source; + }) + font_sources); } diff --git a/nixos/roles/home-assistant/default.nix b/nixos/roles/home-assistant/default.nix index 7f0e65a2..63bacc30 100644 --- a/nixos/roles/home-assistant/default.nix +++ b/nixos/roles/home-assistant/default.nix @@ -378,26 +378,26 @@ in { } ] ++ (map - (minutes: { - alias = "Warnung bei ${minutes} Minuten offenem Fenster oder offener Tür"; - trigger = - map - (name: - triggers.stateTrigger name - // { - to = "on"; - for = "00:${minutes}:00"; - }) - fenster; - #condition = { - # condition = "numeric_state"; - # entity_id = "weather.dwd_darmstadt"; - # attribute = "temperature"; - # below = 15; - #}; - action = [(actions.notify "{{ trigger.to_state.name }} ist seit mehr als ${minutes} Minuten offen.")]; - }) - (map toString [10 20 30 40 50 60])); + (minutes: { + alias = "Warnung bei ${minutes} Minuten offenem Fenster oder offener Tür"; + trigger = + map + (name: + triggers.stateTrigger name + // { + to = "on"; + for = "00:${minutes}:00"; + }) + fenster; + #condition = { + # condition = "numeric_state"; + # entity_id = "weather.dwd_darmstadt"; + # attribute = "temperature"; + # below = 15; + #}; + action = [(actions.notify "{{ trigger.to_state.name }} ist seit mehr als ${minutes} Minuten offen.")]; + }) + (map toString [10 20 30 40 50 60])); history = {}; image = {}; sun = {}; diff --git a/nixos/roles/standalone/default.nix b/nixos/roles/standalone/default.nix index 5b235b92..44ce4f2f 100644 --- a/nixos/roles/standalone/default.nix +++ b/nixos/roles/standalone/default.nix @@ -30,15 +30,15 @@ environment = { # Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager systemPackages = builtins.attrValues ({ - inherit - (import ../../../lib/update-system.nix { - inherit pkgs; - inherit (config.system.build) nixos-rebuild; - }) - update-system - ; - } - // pkgs.system-pkgs); + inherit + (import ../../../lib/update-system.nix { + inherit pkgs; + inherit (config.system.build) nixos-rebuild; + }) + update-system + ; + } + // pkgs.system-pkgs); }; programs = { diff --git a/overlays/10-previews.nix b/overlays/10-previews.nix index 620b4e75..b718b4c8 100644 --- a/overlays/10-previews.nix +++ b/overlays/10-previews.nix @@ -1,17 +1,11 @@ self: super: let unstable = import super.sources.nixos-unstable {}; - nom_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nix-output-monitor.rev; - hx_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).helix.rev; bot_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nixpkgs-bot.rev; - hx = builtins.getFlake "github:helix-editor/helix/${hx_commit}"; - nom = builtins.getFlake "git+ssh://git@hera.m-0.eu/nix-output-monitor?rev=${nom_commit}&ref=main"; bot = builtins.getFlake "git+ssh://git@hera.m-0.eu/nixpkgs-bot?rev=${bot_commit}&ref=main"; in { inherit unstable; unstableHaskellPackages = unstable.haskellPackages; unstableGhc = unstable.ghc; inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis nil taplo tut; - nix-output-monitor = nom.packages.x86_64-linux.default; - helix = hx.packages.x86_64-linux.default; nixpkgs-bot = bot.packages.x86_64-linux.default; } diff --git a/overlays/pkgSets.nix b/overlays/pkgSets.nix index d9f8f584..38ced682 100644 --- a/overlays/pkgSets.nix +++ b/overlays/pkgSets.nix @@ -93,8 +93,10 @@ self: super: { desktop-pkgs = { inherit (self) - esphome # To flash devices - esptool # provides esptool.py + esphome + # To flash devices + esptool + # provides esptool.py dconf lm_sensors xwayland diff --git a/test.nix b/test.nix index cb141047..535331c3 100644 --- a/test.nix +++ b/test.nix @@ -1,8 +1,8 @@ let - sources = import ./nix/sources.nix; - nix-pre-commit-hooks = import "${sources."pre-commit-hooks.nix"}/nix" {nixpkgs = sources.nixos-unstable;}; + commit = (builtins.fromJSON (builtins.readFile ./nix/sources.json))."pre-commit-hooks.nix".rev; + nix-pre-commit-hooks = builtins.getFlake "github:cachix/pre-commit-hooks.nix/${commit}"; in { - pre-commit-check = nix-pre-commit-hooks.run { + pre-commit-check = nix-pre-commit-hooks.lib.x86_64-linux.run { src = ./.; hooks = { hlint.enable = true;