From 6a4c1b34bf84735b6cbef75cf3a29c6a46851a74 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:09:33 +0100 Subject: [PATCH] Autoformat --- flake.nix | 206 +++++++++++------------ home/features/coding/nixvim/plugins.nix | 14 +- home/features/desktop/common/firefox.nix | 29 ++-- hosts/leopold/hardware-configuration.nix | 22 ++- 4 files changed, 137 insertions(+), 134 deletions(-) diff --git a/flake.nix b/flake.nix index b0c370d..2cd8003 100644 --- a/flake.nix +++ b/flake.nix @@ -70,117 +70,115 @@ }; }; - outputs = - { self - , nixpkgs - , home-manager - , ... - } @ inputs: - let - inherit (self) outputs; - # Supported systems for your flake packages, shell, etc. - systems = [ - "aarch64-linux" - "i686-linux" - "x86_64-linux" - "aarch64-darwin" - "x86_64-darwin" - ]; - # This is a function that generates an attribute by calling a function you - # pass to it, with each system as an argument - forAllSystems = nixpkgs.lib.genAttrs systems; - vars = import ./vars.nix; - in - { - # Your custom packages - # Accessible through 'nix build', 'nix shell', etc - packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); - # Formatter for your nix files, available through 'nix fmt' - # Other options beside 'alejandra' include 'nixpkgs-fmt' - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + outputs = { + self, + nixpkgs, + home-manager, + ... + } @ inputs: let + inherit (self) outputs; + # Supported systems for your flake packages, shell, etc. + systems = [ + "aarch64-linux" + "i686-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + # This is a function that generates an attribute by calling a function you + # pass to it, with each system as an argument + forAllSystems = nixpkgs.lib.genAttrs systems; + vars = import ./vars.nix; + in { + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc + packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # Formatter for your nix files, available through 'nix fmt' + # Other options beside 'alejandra' include 'nixpkgs-fmt' + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - # Your custom packages and modifications, exported as overlays - overlays = import ./overlays { inherit inputs; }; - # Reusable nixos modules you might want to export - # These are usually stuff you would upstream into nixpkgs - nixosModules = import ./modules/nixos; - # Reusable home-manager modules you might want to export - # These are usually stuff you would upstream into home-manager - homeManagerModules = import ./modules/home-manager; + # Your custom packages and modifications, exported as overlays + overlays = import ./overlays {inherit inputs;}; + # Reusable nixos modules you might want to export + # These are usually stuff you would upstream into nixpkgs + nixosModules = import ./modules/nixos; + # Reusable home-manager modules you might want to export + # These are usually stuff you would upstream into home-manager + homeManagerModules = import ./modules/home-manager; - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - adalbert = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs vars; }; - modules = [ - ./hosts/adalbert - ]; - }; - ludwig = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs vars; }; - modules = [ - ./hosts/ludwig - ]; - }; - leopold = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs vars; }; - modules = [ - ./hosts/leopold - ]; - }; - franz = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs vars; }; - modules = [ - ./hosts/franz - ]; - }; - # build with nix build .#nixosConfigurations.eustachius.config.system.build.sdImage - eustachius = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - modules = [ - "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix" - ./hosts/eustachius - - # extra config for sdImage generator - { - sdImage.compressImage = false; - } - ]; - }; - }; - - # Standalone home-manager configuration entrypoint - # Available through 'home-manager --flake .#your-username@your-hostname' - homeConfigurations = { - "${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = { inherit inputs outputs vars; }; - modules = [ - ./home/adalbert.nix - ]; - }; - }; - "${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = { inherit inputs outputs vars; }; + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + adalbert = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs vars;}; modules = [ - ./home/ludwig.nix + ./hosts/adalbert ]; }; - "${vars.user}@franz" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = { inherit inputs outputs vars; }; + ludwig = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs vars;}; modules = [ - ./home/franz.nix + ./hosts/ludwig + ]; + }; + leopold = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs vars;}; + modules = [ + ./hosts/leopold + ]; + }; + franz = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs vars;}; + modules = [ + ./hosts/franz + ]; + }; + # build with nix build .#nixosConfigurations.eustachius.config.system.build.sdImage + eustachius = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix" + ./hosts/eustachius + + # extra config for sdImage generator + { + sdImage.compressImage = false; + } ]; }; - # "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration { - # pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance - # extraSpecialArgs = {inherit inputs outputs vars;}; - # modules = [ - # ./home/eustachius.nix - # ]; - # }; }; + + # Standalone home-manager configuration entrypoint + # Available through 'home-manager --flake .#your-username@your-hostname' + homeConfigurations = { + "${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs vars;}; + modules = [ + ./home/adalbert.nix + ]; + }; + }; + "${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs vars;}; + modules = [ + ./home/ludwig.nix + ]; + }; + "${vars.user}@franz" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs vars;}; + modules = [ + ./home/franz.nix + ]; + }; + # "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance + # extraSpecialArgs = {inherit inputs outputs vars;}; + # modules = [ + # ./home/eustachius.nix + # ]; + # }; + }; } diff --git a/home/features/coding/nixvim/plugins.nix b/home/features/coding/nixvim/plugins.nix index f5d5660..7ec31a5 100644 --- a/home/features/coding/nixvim/plugins.nix +++ b/home/features/coding/nixvim/plugins.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.nixvim.plugins = { lualine.enable = true; oil.enable = true; @@ -87,12 +87,12 @@ todo-comments = { enable = true; settings.colors = { - error = [ "DiagnosticError" "ErrorMsg" "#DC2626" ]; - warning = [ "DiagnosticWarn" "WarningMsg" "#FBBF24" ]; - info = [ "DiagnosticInfo" "#2563EB" ]; - hint = [ "DiagnosticHint" "#10B981" ]; - default = [ "Identifier" "#7C3AED" ]; - test = [ "Identifier" "#FF00FF" ]; + error = ["DiagnosticError" "ErrorMsg" "#DC2626"]; + warning = ["DiagnosticWarn" "WarningMsg" "#FBBF24"]; + info = ["DiagnosticInfo" "#2563EB"]; + hint = ["DiagnosticHint" "#10B981"]; + default = ["Identifier" "#7C3AED"]; + test = ["Identifier" "#FF00FF"]; }; }; diff --git a/home/features/desktop/common/firefox.nix b/home/features/desktop/common/firefox.nix index e4e8609..4a96c22 100644 --- a/home/features/desktop/common/firefox.nix +++ b/home/features/desktop/common/firefox.nix @@ -1,9 +1,10 @@ -{ inputs -, pkgs -, vars -, ... +{ + inputs, + pkgs, + vars, + ... }: { - imports = [ inputs.arkenfox.hmModules.default ]; + imports = [inputs.arkenfox.hmModules.default]; home.file.".mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json".source = "${pkgs.plasma5Packages.plasma-browser-integration}/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json"; programs.firefox = { @@ -47,7 +48,7 @@ ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; + definedAliases = ["@np"]; }; "Home Manager" = { @@ -64,7 +65,7 @@ ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@hm" ]; + definedAliases = ["@hm"]; }; "Searx" = { @@ -81,7 +82,7 @@ ]; iconUpdateURL = "https://paulgo.io/favicon.ico"; - definedAliases = [ "@sx" ]; + definedAliases = ["@sx"]; }; "Amazon" = { @@ -98,7 +99,7 @@ ]; iconUpdateURL = "https://amazon.de/favicon.ico"; - definedAliases = [ "@a" ]; + definedAliases = ["@a"]; }; "YouTube" = { @@ -115,7 +116,7 @@ ]; iconUpdateURL = "https://piped.video/favicon.ico"; - definedAliases = [ "yt" ]; + definedAliases = ["yt"]; }; }; search.force = true; @@ -190,9 +191,9 @@ }; xdg.mimeApps.defaultApplications = { - "text/html" = [ "firefox.desktop" ]; - "text/xml" = [ "firefox.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; + "text/html" = ["firefox.desktop"]; + "text/xml" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; }; } diff --git a/hosts/leopold/hardware-configuration.nix b/hosts/leopold/hardware-configuration.nix index 34177d3..5c9fd3b 100644 --- a/hosts/leopold/hardware-configuration.nix +++ b/hosts/leopold/hardware-configuration.nix @@ -1,17 +1,21 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = ["dm-snapshot"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's