Format all files

This commit is contained in:
2025-07-07 19:11:26 +02:00
parent 80ed32f741
commit a459b74dbe
12 changed files with 134 additions and 105 deletions
+51 -48
View File
@@ -17,56 +17,59 @@
nixvim.inputs.nixpkgs.follows = "nixpkgs"; nixvim.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs =
self, {
nixpkgs, self,
home-manager, nixpkgs,
nixvim, home-manager,
... nixvim,
} @ inputs: let ...
inherit (self) outputs; }@inputs:
# Supported systems for your flake packages, shell, etc. let
systems = [ inherit (self) outputs;
"x86_64-linux" # Supported systems for your flake packages, shell, etc.
]; systems = [
# This is a function that generates an attribute by calling a function you "x86_64-linux"
# pass to it, with each system as an argument ];
forAllSystems = nixpkgs.lib.genAttrs systems; # This is a function that generates an attribute by calling a function you
in { # pass to it, with each system as an argument
# Your custom packages forAllSystems = nixpkgs.lib.genAttrs systems;
# Accessible through 'nix build', 'nix shell', etc in
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); {
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Your custom packages and modifications, exported as overlays # Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;}; overlays = import ./overlays { inherit inputs; };
# Reusable nixos modules you might want to export # Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs # These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos; nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export # Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager # These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager; homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem { desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;}; specialArgs = { inherit inputs outputs; };
modules = [ modules = [
./nixos/configuration.nix ./nixos/configuration.nix
]; ];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"leonhard@desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home-manager/home.nix
];
};
}; };
}; };
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"leonhard@desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home-manager/home.nix
];
};
};
};
} }
+6 -7
View File
@@ -1,12 +1,11 @@
# This is your home-manager configuration file # This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) # Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ inputs {
, outputs inputs,
, lib outputs,
, config ...
, pkgs }:
, ... {
}: {
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
outputs.homeManagerModules outputs.homeManagerModules
+3 -2
View File
@@ -1,8 +1,9 @@
{ pkgs, ... }: { { pkgs, ... }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
fishPlugins.tide fishPlugins.tide
]; ];
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
+2 -1
View File
@@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
git-credential-manager git-credential-manager
]; ];
+17 -11
View File
@@ -1,6 +1,10 @@
{ {
programs.nixvim = { programs.nixvim = {
opts.completeopt = ["menu" "menuone" "noselect"]; opts.completeopt = [
"menu"
"menuone"
"noselect"
];
plugins = { plugins = {
luasnip.enable = true; luasnip.enable = true;
@@ -42,16 +46,18 @@
"<C-y>" = "cmp.mapping.confirm({ select = true })"; "<C-y>" = "cmp.mapping.confirm({ select = true })";
"<CR>" = "cmp.mapping.confirm({ select = true })"; "<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-Space>" = "cmp.mapping.complete()"; "<C-Space>" = "cmp.mapping.complete()";
"<C-l>" = ''cmp.mapping(function() "<C-l>" = ''
if luasnip.expand_or_locally_jumpable() then cmp.mapping(function()
luasnip.expand_or_jump() if luasnip.expand_or_locally_jumpable() then
end luasnip.expand_or_jump()
end, {'i', 's'})''; end
"<C-h>" = ''cmp.mapping(function() end, {'i', 's'})'';
if luasnip.locally_jumpable(-1) then "<C-h>" = ''
luasnip.jump(-1) cmp.mapping(function()
end if luasnip.locally_jumpable(-1) then
end, {'i', 's'})''; luasnip.jump(-1)
end
end, {'i', 's'})'';
}; };
sources = [ sources = [
@@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
imports = [ imports = [
./cmp.nix ./cmp.nix
./lsp.nix ./lsp.nix
@@ -13,8 +13,8 @@
icon = ""; icon = "";
} }
]; ];
lualine_c = ["filename"]; lualine_c = [ "filename" ];
lualine_x = ["filetype"]; lualine_x = [ "filetype" ];
}; };
}; };
}; };
@@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
programs.nixvim = { programs.nixvim = {
plugins.treesitter = { plugins.treesitter = {
enable = true; enable = true;
+2 -1
View File
@@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
programs.fish.enable = true; programs.fish.enable = true;
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
} }
+22 -19
View File
@@ -7,7 +7,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
outputs.nixosModules outputs.nixosModules
@@ -24,24 +25,26 @@
}; };
}; };
nix = let nix =
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; let
in { flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
settings = { in
# Enable flakes and new 'nix' command {
experimental-features = "nix-command flakes"; settings = {
# Opinionated: disable global registry # Enable flakes and new 'nix' command
flake-registry = ""; experimental-features = "nix-command flakes";
# Workaround for https://github.com/NixOS/nix/issues/9574 # Opinionated: disable global registry
nix-path = config.nix.nixPath; flake-registry = "";
}; # Workaround for https://github.com/NixOS/nix/issues/9574
# Opinionated: disable channels nix-path = config.nix.nixPath;
channel.enable = false; };
# Opinionated: disable channels
channel.enable = false;
# Opinionated: make flake registry and nix path match flake inputs # Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
@@ -103,7 +106,7 @@
# Be sure to change it (using passwd) after rebooting! # Be sure to change it (using passwd) after rebooting!
initialPassword = "correcthorsebatterystaple"; initialPassword = "correcthorsebatterystaple";
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel"]; extraGroups = [ "wheel" ];
}; };
}; };
+23 -11
View File
@@ -1,23 +1,35 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ ]; imports = [ ];
boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/0eb29109-abd1-49af-859a-1c5009e2482f"; device = "/dev/disk/by-uuid/0eb29109-abd1-49af-859a-1c5009e2482f";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/EE00-3849"; device = "/dev/disk/by-uuid/EE00-3849";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];
+2 -1
View File
@@ -1,5 +1,6 @@
# This file defines overlays # This file defines overlays
{inputs, ...}: { { inputs, ... }:
{
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs final.pkgs; additions = final: _prev: import ../pkgs final.pkgs;