initial commit
This commit is contained in:
commit
c2fad27db7
68 changed files with 2446 additions and 0 deletions
2
.directory
Normal file
2
.directory
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Desktop Entry]
|
||||
Icon=bookmarks-blue
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# ---> Nix
|
||||
# Ignore build outputs from performing a nix-build or `nix build` command
|
||||
result
|
||||
result-*
|
380
flake.lock
Normal file
380
flake.lock
Normal file
|
@ -0,0 +1,380 @@
|
|||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728330715,
|
||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732021966,
|
||||
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1733139194,
|
||||
"narHash": "sha256-PVQW9ovo0CJbhuhCsrhFJGGdD1euwUornspKpBIgdok=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "c6c90887f84c02ce9ebf33b95ca79ef45007bf88",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733050161,
|
||||
"narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "62d536255879be574ebfe9b87c4ac194febf47c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733085484,
|
||||
"narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729958008,
|
||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733105089,
|
||||
"narHash": "sha256-Qs3YmoLYUJ8g4RkFj2rMrzrP91e4ShAioC9s+vG6ENM=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "c6b65d946097baf3915dd51373251de98199280d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1732981179,
|
||||
"narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1733015953,
|
||||
"narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1733015953,
|
||||
"narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733132296,
|
||||
"narHash": "sha256-fYEf0IgsNJp/hcb+C3FKtJvVabPDQs64hdL0izNBwXc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "e680b367c726e2ae37d541328fe81f8daaf49a6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733006402,
|
||||
"narHash": "sha256-BC1CecAQISV5Q4LZK72Gx0+faemOwaChiD9rMVfDPoA=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "16307548b7a1247291c84ae6a12c0aacb07dfba2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732894027,
|
||||
"narHash": "sha256-2qbdorpq0TXHBWbVXaTqKoikN4bqAtAplTwGuII+oAc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "6209c381904cab55796c5d7350e89681d3b2a8ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
78
flake.nix
Normal file
78
flake.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
description = "nix config";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# NixVim
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
|
||||
# NixOS hardware
|
||||
hardware.url = "github:NixOS/nixos-hardware/";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
# 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;
|
||||
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;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations = {
|
||||
pluto = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit self inputs outputs;};
|
||||
modules = [
|
||||
# > Our main nixos configuration file <
|
||||
./hosts/pluto/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
"kirbo@pluto" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit self inputs outputs;};
|
||||
modules = [
|
||||
# > Our main home-manager configuration file <
|
||||
./users/kirbo/pluto.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
8
hosts/common/global/default.nix
Normal file
8
hosts/common/global/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./keyboard.nix
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./network.nix
|
||||
];
|
||||
}
|
8
hosts/common/global/keyboard.nix
Normal file
8
hosts/common/global/keyboard.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{...}: {
|
||||
console.useXkbConfig = true; # use xkb.options in tty.
|
||||
# Configure keymap in x11
|
||||
services.xserver.xkb = {
|
||||
layout = "de,ru";
|
||||
variant = "nodeadkeys,";
|
||||
};
|
||||
}
|
22
hosts/common/global/locale.nix
Normal file
22
hosts/common/global/locale.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{...}: {
|
||||
# Locale config for languages n stuff
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
# make stuff german
|
||||
extraLocaleSettings = {
|
||||
LC_CTYPE = "en_US.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
LC_COLLATE = "en_US.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_MESSAGES = "en_US.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
16
hosts/common/global/network.nix
Normal file
16
hosts/common/global/network.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{...}: {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
firewall = rec {
|
||||
# kdeconnect
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
};
|
||||
};
|
||||
}
|
35
hosts/common/global/nix.nix
Normal file
35
hosts/common/global/nix.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
settings = {
|
||||
warn-dirty = false;
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
# Opinionated: optimize store on every rebuild
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
# Keep the last 3 generations
|
||||
options = "--delete-older-than +3";
|
||||
};
|
||||
};
|
||||
programs.nix-ld.enable = true;
|
||||
}
|
4
hosts/common/optional/bluetooth.nix
Normal file
4
hosts/common/optional/bluetooth.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{...}: {
|
||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||
services.blueman.enable = true; # gui
|
||||
}
|
12
hosts/common/optional/font.nix
Normal file
12
hosts/common/optional/font.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
# Enable Fonts
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["JetBrainsMono"];})
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
];
|
||||
};
|
||||
}
|
15
hosts/common/optional/plasma.nix
Normal file
15
hosts/common/optional/plasma.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{pkgs, ...}: {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.excludePackages = [pkgs.xterm];
|
||||
|
||||
# Enable Kde Plasma
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
elisa
|
||||
krdp
|
||||
okular
|
||||
];
|
||||
}
|
9
hosts/common/optional/sound.nix
Normal file
9
hosts/common/optional/sound.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{...}: {
|
||||
# Enable sound.
|
||||
# hardware.pulseaudio.enable = true;
|
||||
# OR
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
3
hosts/common/optional/steam.nix
Normal file
3
hosts/common/optional/steam.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{...}: {
|
||||
programs.steam.enable = true;
|
||||
}
|
26
hosts/common/users/kirbo.nix
Normal file
26
hosts/common/users/kirbo.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
users.users.kirbo = let
|
||||
ifGroupExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = ifGroupExists [
|
||||
"audio"
|
||||
"git"
|
||||
"input"
|
||||
"lp"
|
||||
"networkmanager"
|
||||
"scanner"
|
||||
"video"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
}
|
78
hosts/pluto/configuration.nix
Normal file
78
hosts/pluto/configuration.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
inputs.hardware.nixosModules.common-cpu-intel
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
./../common/users/kirbo.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Global Config
|
||||
./../common/global
|
||||
|
||||
# Optional Config
|
||||
../common/optional/bluetooth.nix
|
||||
../common/optional/font.nix
|
||||
../common/optional/sound.nix
|
||||
../common/optional/steam.nix
|
||||
../common/optional/plasma.nix
|
||||
];
|
||||
|
||||
# opengl
|
||||
hardware.graphics.enable = true;
|
||||
# nvidia
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia.open = true; # Set to false for proprietary drivers
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "pluto";
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "24.05";
|
||||
}
|
58
hosts/pluto/hardware-configuration.nix
Normal file
58
hosts/pluto/hardware-configuration.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/404bd66f-257e-4743-820e-62c72cf3dfbb";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root" "compress=zstd" "noatime"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/404bd66f-257e-4743-820e-62c72cf3dfbb";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/404bd66f-257e-4743-820e-62c72cf3dfbb";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/23D0-66BB";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/1fe6bcce-6819-4aa6-aa5a-4d431a262136";}
|
||||
];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
6
modules/home-manager/default.nix
Normal file
6
modules/home-manager/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
}
|
6
modules/nixos/default.nix
Normal file
6
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
}
|
23
overlays/default.nix
Normal file
23
overlays/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
# This file defines overlays
|
||||
{inputs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs final.pkgs;
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
5
pkgs/default.nix
Normal file
5
pkgs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||
# You can build them using 'nix build .#example'
|
||||
pkgs: {
|
||||
# example = pkgs.callPackage ./example { };
|
||||
}
|
6
users/common/global/clipboard.nix
Normal file
6
users/common/global/clipboard.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
xclip
|
||||
];
|
||||
}
|
12
users/common/global/default.nix
Normal file
12
users/common/global/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./clipboard.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./nixhelper.nix
|
||||
./nixvim
|
||||
./shell.nix
|
||||
./steamrun.nix
|
||||
./wine.nix
|
||||
];
|
||||
}
|
10
users/common/global/git.nix
Normal file
10
users/common/global/git.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "estra@disroot.org";
|
||||
userName = "Mel";
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
8
users/common/global/gpg.nix
Normal file
8
users/common/global/gpg.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
}
|
6
users/common/global/nixhelper.nix
Normal file
6
users/common/global/nixhelper.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
programs.nh.enable = true;
|
||||
home.sessionVariables = {
|
||||
FLAKE = "$HOME/Documents/nix-config";
|
||||
};
|
||||
}
|
347
users/common/global/nixvim/default.nix
Executable file
347
users/common/global/nixvim/default.nix
Executable file
|
@ -0,0 +1,347 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# NOTE: The first thing you will want to do is uncommented on of the three imports below
|
||||
# depending on which module you chose to use to install Nixvim.
|
||||
#
|
||||
# Uncomment if you are using the home-manager module
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
# Uncomment if you are using the nixos module
|
||||
#inputs.nixvim.nixosModules.nixvim
|
||||
# Uncomment if you are using the nix-darwin module
|
||||
#inputs.nixvim.nixDarwinModules.nixvim
|
||||
|
||||
# Plugins
|
||||
./plugins/which-key.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/lsp.nix
|
||||
./plugins/nvim-cmp.nix
|
||||
./plugins/mini.nix
|
||||
|
||||
# NOTE: Add/Configure additional plugins for Kickstart.nixvim
|
||||
#
|
||||
# Here are some example plugins that I've included in the Kickstart repository.
|
||||
# Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
#
|
||||
./plugins/kickstart/plugins/debug.nix
|
||||
# ./plugins/kickstart/plugins/indent-blankline.nix
|
||||
./plugins/kickstart/plugins/lint.nix
|
||||
./plugins/kickstart/plugins/autopairs.nix
|
||||
# ./plugins/kickstart/plugins/neo-tree.nix
|
||||
#
|
||||
# NOTE: Configure your own plugins `see https://nix-community.github.io/nixvim/`
|
||||
# Add your plugins to ./plugins/custom/plugins and import them below
|
||||
./plugins/custom/plugins/oil.nix
|
||||
./plugins/custom/plugins/snippets.nix
|
||||
];
|
||||
|
||||
/*
|
||||
=====================================================================
|
||||
==================== READ THIS BEFORE CONTINUING ====================
|
||||
=====================================================================
|
||||
======== .-----. ========
|
||||
======== .----------------------. | === | ========
|
||||
======== |.-""""""""""""""""""-.| |-----| ========
|
||||
======== || || | === | ========
|
||||
======== || KICKSTART.NIXVIM || |-----| ========
|
||||
======== || || | === | ========
|
||||
======== || || |-----| ========
|
||||
======== ||:Tutor || |:::::| ========
|
||||
======== |'-..................-'| |____o| ========
|
||||
======== `"")----------------(""` ___________ ========
|
||||
======== /::::::::::| |::::::::::\ \ no mouse \ ========
|
||||
======== /:::========| |==hjkl==:::\ \ required \ ========
|
||||
======== '""""""""""""' '""""""""""""' '""""""""""' ========
|
||||
======== ========
|
||||
=====================================================================
|
||||
=====================================================================
|
||||
|
||||
What is Kickstart.nixvim?
|
||||
|
||||
Kickstart.nixvim is a starting point for your own configuration.
|
||||
The goal is that you can read every line of code, top-to-bottom, understand
|
||||
what your configuration is doing, and modify it to suit your needs.
|
||||
|
||||
Once you've done that, you can start exploring, configuring and tinkering to
|
||||
make Neovim your own!
|
||||
|
||||
If you don't know anything about Nixvim, Nix or Lua, I recommend taking some time to read through.
|
||||
- https://nix-community.github.io/nixvim/
|
||||
- https://learnxinyminutes.com/docs/nix/
|
||||
- https://learnxinyminutes.com/docs/lua/
|
||||
|
||||
Kickstart.nixvim Guide:
|
||||
|
||||
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
|
||||
|
||||
If you don't know what this means, type the following:
|
||||
- <escape key>
|
||||
- :
|
||||
- Tutor
|
||||
- <enter key>
|
||||
|
||||
(If you already know the Neovim basics, you can skip this step.)
|
||||
|
||||
Once you've completed that, you can continue working through **AND READING** the rest
|
||||
of the nixvim.nix.
|
||||
|
||||
Next, run AND READ `:help`.
|
||||
This will open up a help window with some basic information
|
||||
about reading, navigating and searching the builtin help documentation.
|
||||
|
||||
This should be the first place you go to look when you're stuck or confused
|
||||
with something. It's one of my favorite Neovim features.
|
||||
|
||||
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
|
||||
which is very useful when you're not exactly sure of what you're looking for.
|
||||
|
||||
I have left several `:help X` comments throughout the nixvim.nix and the plugin .nix files
|
||||
These are hints about where to find more information about the relevant settings,
|
||||
plugins or Neovim features used in Kickstart.nixvim.
|
||||
|
||||
NOTE: Look for lines like this
|
||||
|
||||
Throughout the file. These are for you, the reader, to help you understand what is happening.
|
||||
Feel free to delete them once you know what you're doing, but they should serve as a guide
|
||||
for when you are first encountering a few different constructs in your Nixvim Neovim config.
|
||||
|
||||
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
||||
|
||||
I hope you enjoy your Neovim journey,
|
||||
- JMartJonesy
|
||||
|
||||
P.S. You can delete this when you're done too. It's your config now! :)
|
||||
*/
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# You can easily change to a different colorscheme.
|
||||
# Add your colorscheme here and enable it.
|
||||
# Don't forget to disable the colorschemes you arent using
|
||||
#
|
||||
# If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
colorschemes = {
|
||||
gruvbox = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=globals#globals
|
||||
globals = {
|
||||
# Set <space> as the leader key
|
||||
# See `:help mapleader`
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
# [[ Setting options ]]
|
||||
# See `:help vim.opt`
|
||||
# NOTE: You can change these options as you wish!
|
||||
# For more options, you can see `:help option-list`
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=globals#opts
|
||||
opts = {
|
||||
# Show line numbers
|
||||
number = true;
|
||||
# You can also add relative line numbers, to help with jumping.
|
||||
# Experiment for yourself to see if you like it!
|
||||
relativenumber = true;
|
||||
|
||||
# Enable mouse mode, can be useful for resizing splits for example!
|
||||
mouse = "a";
|
||||
|
||||
# Don't show the mode, since it's already in the statusline
|
||||
showmode = false;
|
||||
|
||||
# See `:help 'clipboard'`
|
||||
clipboard = {
|
||||
providers = {
|
||||
wl-copy.enable = true; # For Wayland
|
||||
xclip.enable = true; # For X11
|
||||
};
|
||||
|
||||
# Sync clipboard between OS and Neovim
|
||||
# Remove this option if you want your OS clipboard to remain independent.
|
||||
register = "unnamedplus";
|
||||
};
|
||||
|
||||
# Enable break indent
|
||||
breakindent = true;
|
||||
|
||||
# Save undo history
|
||||
undofile = true;
|
||||
|
||||
# Case-insensitive searching UNLESS \C or one or more capital letters in search term
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# Keep signcolumn on by default
|
||||
signcolumn = "yes";
|
||||
|
||||
# Decrease update time
|
||||
updatetime = 250;
|
||||
|
||||
# Decrease mapped sequence wait time
|
||||
# Displays which-key popup sooner
|
||||
timeoutlen = 300;
|
||||
|
||||
# Configure how new splits should be opened
|
||||
splitright = true;
|
||||
splitbelow = true;
|
||||
|
||||
# Sets how neovim will display certain whitespace characters in the editor
|
||||
# See `:help 'list'`
|
||||
# See `:help 'listchars'`
|
||||
list = true;
|
||||
# NOTE: .__raw here means that this field is raw lua code
|
||||
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||||
|
||||
# Preview subsitutions live, as you type!
|
||||
inccommand = "split";
|
||||
|
||||
# Show which line your cursor is on
|
||||
cursorline = true;
|
||||
|
||||
# Minimal number of screen lines to keep above and below the cursor
|
||||
scrolloff = 10;
|
||||
|
||||
# See `:help hlsearch`
|
||||
hlsearch = true;
|
||||
};
|
||||
|
||||
# [[ Basic Keymaps ]]
|
||||
# See `:help vim.keymap.set()`
|
||||
# https://nix-community.github.io/nixvim/keymaps/index.html
|
||||
keymaps = [
|
||||
# Clear highlights on search when pressing <Esc> in normal mode
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Esc>";
|
||||
action = "<cmd>nohlsearch<CR>";
|
||||
}
|
||||
# Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
# for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
# is not what someone will guess without a bit more experience.
|
||||
#
|
||||
# NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
# or just use <C-\><C-n> to exit terminal mode
|
||||
{
|
||||
mode = "t";
|
||||
key = "<Esc><Esc>";
|
||||
action = "<C-\\><C-n>";
|
||||
options = {
|
||||
desc = "Exit terminal mode";
|
||||
};
|
||||
}
|
||||
# TIP: Disable arrow keys in normal mode
|
||||
/*
|
||||
{
|
||||
mode = "n";
|
||||
key = "<left>";
|
||||
action = "<cmd>echo 'Use h to move!!'<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<right>";
|
||||
action = "<cmd>echo 'Use l to move!!'<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<up>";
|
||||
action = "<cmd>echo 'Use k to move!!'<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<down>";
|
||||
action = "<cmd>echo 'Use j to move!!'<CR>";
|
||||
}
|
||||
*/
|
||||
# Keybinds to make split navigation easier.
|
||||
# Use CTRL+<hjkl> to switch between windows
|
||||
#
|
||||
# See `:help wincmd` for a list of all window commands
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-h>";
|
||||
action = "<C-w><C-h>";
|
||||
options = {
|
||||
desc = "Move focus to the left window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-l>";
|
||||
action = "<C-w><C-l>";
|
||||
options = {
|
||||
desc = "Move focus to the right window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-j>";
|
||||
action = "<C-w><C-j>";
|
||||
options = {
|
||||
desc = "Move focus to the lower window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-k>";
|
||||
action = "<C-w><C-k>";
|
||||
options = {
|
||||
desc = "Move focus to the upper window";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/autoGroups/index.html
|
||||
autoGroups = {
|
||||
kickstart-highlight-yank = {
|
||||
clear = true;
|
||||
};
|
||||
};
|
||||
|
||||
# [[ Basic Autocommands ]]
|
||||
# See `:help lua-guide-autocommands`
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/autoCmd/index.html
|
||||
autoCmd = [
|
||||
# Highlight when yanking (copying) text
|
||||
# Try it with `yap` in normal mode
|
||||
# See `:help vim.highlight.on_yank()`
|
||||
{
|
||||
event = ["TextYankPost"];
|
||||
desc = "Highlight when yanking (copying) text";
|
||||
group = "kickstart-highlight-yank";
|
||||
callback.__raw = ''
|
||||
function()
|
||||
vim.highlight.on_yank()
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
# Adds icons for plugins to utilize in ui
|
||||
web-devicons.enable = true;
|
||||
|
||||
# Adds all treesitter parsers
|
||||
treesitter.enable = true;
|
||||
|
||||
# smooth scrolling
|
||||
neoscroll.enable = true;
|
||||
|
||||
# Detect tabstop and shiftwidth automatically
|
||||
# https://nix-community.github.io/nixvim/plugins/sleuth/index.html
|
||||
sleuth = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
home.sessionVariables.MANPAGER = "nvim +Man!"; # change manpage viewer to neovim
|
||||
}
|
57
users/common/global/nixvim/plugins/conform.nix
Executable file
57
users/common/global/nixvim/plugins/conform.nix
Executable file
|
@ -0,0 +1,57 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
# Dependencies
|
||||
#
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraplugins#extrapackages
|
||||
extraPackages = with pkgs; [
|
||||
# Used to format Lua code
|
||||
stylua
|
||||
];
|
||||
|
||||
# Autoformat
|
||||
# https://nix-community.github.io/nixvim/plugins/conform-nvim.html
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
notify_on_error = false;
|
||||
format_on_save = ''
|
||||
function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for lanuages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- lanuages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype]
|
||||
}
|
||||
end
|
||||
'';
|
||||
formatters_by_ft = {
|
||||
lua = ["stylua"];
|
||||
# Conform can also run multiple formatters sequentially
|
||||
python = ["isort" "black"];
|
||||
#
|
||||
# You can use a sublist to tell conform to run *until* a formatter
|
||||
# is found
|
||||
# javascript = [ [ "prettierd" "prettier" ] ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/keymaps/index.html
|
||||
keymaps = [
|
||||
{
|
||||
mode = "";
|
||||
key = "<leader>f";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('conform').format { async = true, lsp_fallback = true }
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "[F]ormat buffer";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
15
users/common/global/nixvim/plugins/custom/plugins/oil.nix
Normal file
15
users/common/global/nixvim/plugins/custom/plugins/oil.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{...}: {
|
||||
programs.nixvim = {
|
||||
plugins.oil.enable = true;
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>o";
|
||||
action = "<cmd>Oil<cr>";
|
||||
options = {
|
||||
desc = "[O]il";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
programs.nixvim.plugins = {
|
||||
luasnip.enable = true;
|
||||
friendly-snippets.enable = true;
|
||||
};
|
||||
}
|
15
users/common/global/nixvim/plugins/kickstart/plugins/autopairs.nix
Executable file
15
users/common/global/nixvim/plugins/kickstart/plugins/autopairs.nix
Executable file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
# Inserts matching pairs of parens, brackets, etc.
|
||||
# https://nix-community.github.io/nixvim/plugins/nvim-autopairs/index.html
|
||||
programs.nixvim = {
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# If you want to automatically add `(` after selecting a function or method
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraconfiglua#extraconfiglua
|
||||
extraConfigLua = ''
|
||||
require('cmp').event:on('confirm_done', require('nvim-autopairs.completion.cmp').on_confirm_done())
|
||||
'';
|
||||
};
|
||||
}
|
145
users/common/global/nixvim/plugins/kickstart/plugins/debug.nix
Normal file
145
users/common/global/nixvim/plugins/kickstart/plugins/debug.nix
Normal file
|
@ -0,0 +1,145 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Shows how to use the DAP plugin to debug your code.
|
||||
#
|
||||
# Primarily focused on configuring the debugger for Go, but can
|
||||
# be extended to other languages as well. That's why it's called
|
||||
# kickstart.nixvim and not kitchen-sink.nixvim ;)
|
||||
# https://nix-community.github.io/nixvim/plugins/dap/index.html
|
||||
plugins.dap = {
|
||||
enable = true;
|
||||
|
||||
extensions = {
|
||||
# Creates a beautiful debugger UI
|
||||
dap-ui = {
|
||||
enable = true;
|
||||
|
||||
# Set icons to characters that are more likely to work in every terminal.
|
||||
# Feel free to remove or use ones that you like more! :)
|
||||
# Don't feel like these are good choices.
|
||||
icons = {
|
||||
expanded = "▾";
|
||||
collapsed = "▸";
|
||||
current_frame = "*";
|
||||
};
|
||||
|
||||
controls = {
|
||||
icons = {
|
||||
pause = "⏸";
|
||||
play = "▶";
|
||||
step_into = "⏎";
|
||||
step_over = "⏭";
|
||||
step_out = "⏮";
|
||||
step_back = "b";
|
||||
run_last = "▶▶";
|
||||
terminate = "⏹";
|
||||
disconnect = "⏏";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Add your own debuggers here
|
||||
dap-go = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/keymaps/index.html
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F5>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').continue()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Start/Continue";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F1>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Step Into";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F2>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Step Over";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F3>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Step Out";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Toggle Breakpoint";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>B";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: Set Breakpoint";
|
||||
};
|
||||
}
|
||||
# Toggle to see last session result. Without this, you can't see session output
|
||||
# in case of unhandled exception.
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F7>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Debug: See last session result.";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraconfiglua#extraconfiglua
|
||||
extraConfigLua = ''
|
||||
require('dap').listeners.after.event_initialized['dapui_config'] = require('dapui').open
|
||||
require('dap').listeners.before.event_terminated['dapui_config'] = require('dapui').close
|
||||
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
|
||||
'';
|
||||
};
|
||||
}
|
10
users/common/global/nixvim/plugins/kickstart/plugins/indent-blankline.nix
Executable file
10
users/common/global/nixvim/plugins/kickstart/plugins/indent-blankline.nix
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Add indentation guides even on blank lines
|
||||
# For configuration see `:help ibl`
|
||||
# https://nix-community.github.io/nixvim/plugins/indent-blankline/index.html
|
||||
plugins.indent-blankline = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
51
users/common/global/nixvim/plugins/kickstart/plugins/lint.nix
Executable file
51
users/common/global/nixvim/plugins/kickstart/plugins/lint.nix
Executable file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Linting
|
||||
# https://nix-community.github.io/nixvim/plugins/lint/index.html
|
||||
plugins.lint = {
|
||||
enable = true;
|
||||
|
||||
# NOTE: Enabling these will cause errors unless these tools are installed
|
||||
lintersByFt = {
|
||||
nix = ["nix"];
|
||||
markdown = [
|
||||
"markdownlint"
|
||||
#vale
|
||||
];
|
||||
python = ["black"];
|
||||
#clojure = ["clj-kondo"];
|
||||
#dockerfile = ["hadolint"];
|
||||
#inko = ["inko"];
|
||||
#janet = ["janet"];
|
||||
#json = ["jsonlint"];
|
||||
#rst = ["vale"];
|
||||
#ruby = ["ruby"];
|
||||
#terraform = ["tflint"];
|
||||
#text = ["vale"];
|
||||
};
|
||||
|
||||
# Create autocommand which carries out the actual linting
|
||||
# on the specified events.
|
||||
autoCmd = {
|
||||
callback.__raw = ''
|
||||
function()
|
||||
require('lint').try_lint()
|
||||
end
|
||||
'';
|
||||
group = "lint";
|
||||
event = [
|
||||
"BufEnter"
|
||||
"BufWritePost"
|
||||
"InsertLeave"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/autoGroups/index.html
|
||||
autoGroups = {
|
||||
lint = {
|
||||
clear = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
28
users/common/global/nixvim/plugins/kickstart/plugins/neo-tree.nix
Executable file
28
users/common/global/nixvim/plugins/kickstart/plugins/neo-tree.nix
Executable file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Neo-tree is a Neovim plugin to browse the file system
|
||||
# https://nix-community.github.io/nixvim/plugins/neo-tree/index.html?highlight=neo-tree#pluginsneo-treepackage
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
"\\" = "close_window";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/keymaps/index.html
|
||||
keymaps = [
|
||||
{
|
||||
key = "\\";
|
||||
action = "<cmd>Neotree reveal<cr>";
|
||||
options = {
|
||||
desc = "NeoTree reveal";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
302
users/common/global/nixvim/plugins/lsp.nix
Executable file
302
users/common/global/nixvim/plugins/lsp.nix
Executable file
|
@ -0,0 +1,302 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
# Dependencies
|
||||
# { 'Bilal2453/luvit-meta', lazy = true },
|
||||
#
|
||||
#
|
||||
# Allows extra capabilities providied by nvim-cmp
|
||||
# https://nix-community.github.io/nixvim/plugins/cmp-nvim-lsp.html
|
||||
plugins.cmp-nvim-lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Useful status updates for LSP.
|
||||
# https://nix-community.github.io/nixvim/plugins/fidget/index.html
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraplugi#extraplugins
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
# NOTE: This is where you would add a vim plugin that is not implemented in Nixvim, also see extraConfigLuaPre below
|
||||
#
|
||||
# TODO: Add luvit-meta when Nixos package is added
|
||||
];
|
||||
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/autoGroups/index.html
|
||||
autoGroups = {
|
||||
"kickstart-lsp-attach" = {
|
||||
clear = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Brief aside: **What is LSP?**
|
||||
#
|
||||
# LSP is an initialism you've probably heard, but might not understand what it is.
|
||||
#
|
||||
# LSP stands for Language Server Protocol. It's a protocol that helps editors
|
||||
# and language tooling communicate in a standardized fashion.
|
||||
#
|
||||
# In general, you have a "server" which is some tool built to understand a particular
|
||||
# language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
|
||||
# (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
|
||||
# processes that communicate with some "client" - in this case, Neovim!
|
||||
#
|
||||
# LSP provides Neovim with features like:
|
||||
# - Go to definition
|
||||
# - Find references
|
||||
# - Autocompletion
|
||||
# - Symbol Search
|
||||
# - and more!
|
||||
#
|
||||
# Thus, Language Servers are external tools that must be installed separately from
|
||||
# Neovim which are configured below in the `server` section.
|
||||
#
|
||||
# If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
||||
# and elegantly composed help section, `:help lsp-vs-treesitter`
|
||||
#
|
||||
# https://nix-community.github.io/nixvim/plugins/lsp/index.html
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
# Enable the following language servers
|
||||
# Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
#
|
||||
# Add any additional override configuration in the following tables. Available keys are:
|
||||
# - cmd: Override the default command used to start the server
|
||||
# - filetypes: Override the default list of associated filetypes for the server
|
||||
# - capabilities: Override fields in capabilities. Can be used to disable certain LSP features.
|
||||
# - settings: Override the default settings passed when initializing the server.
|
||||
# For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
servers = {
|
||||
bashls = {
|
||||
enable = true;
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
};
|
||||
gopls = {
|
||||
enable = true;
|
||||
};
|
||||
hls = {
|
||||
enable = true;
|
||||
installGhc = true;
|
||||
};
|
||||
# ...etc. See `https://nix-community.github.io/nixvim/plugins/lsp` for a list of pre-configured LSPs
|
||||
#
|
||||
# Some languages (like typscript) have entire language plugins that can be useful:
|
||||
# `https://nix-community.github.io/nixvim/plugins/typescript-tools/index.html?highlight=typescript-tools#pluginstypescript-toolspackage`
|
||||
#
|
||||
# But for many setups the LSP (`tsserver`) will work just fine
|
||||
# tsserver = {
|
||||
# enable = true;
|
||||
#}
|
||||
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
|
||||
# cmd = {
|
||||
#};
|
||||
# filetypes = {
|
||||
#};
|
||||
settings = {
|
||||
completion = {
|
||||
callSnippet = "Replace";
|
||||
};
|
||||
diagnostics = {
|
||||
disable = [
|
||||
"missing-fields"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatting.command = ["alejandra"];
|
||||
# nixpkgs.expr = "";
|
||||
};
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
installRustfmt = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = {
|
||||
# Diagnostic keymaps
|
||||
diagnostic = {
|
||||
"<leader>q" = {
|
||||
#mode = "n";
|
||||
action = "setloclist";
|
||||
desc = "Open diagnostic [Q]uickfix list";
|
||||
};
|
||||
};
|
||||
|
||||
extra = [
|
||||
# Jump to the definition of the word under your cusor.
|
||||
# This is where a variable was first declared, or where a function is defined, etc.
|
||||
# To jump back, press <C-t>.
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action.__raw = "require('telescope.builtin').lsp_definitions";
|
||||
options = {
|
||||
desc = "LSP: [G]oto [D]efinition";
|
||||
};
|
||||
}
|
||||
# Find references for the word under your cursor.
|
||||
{
|
||||
mode = "n";
|
||||
key = "gr";
|
||||
action.__raw = "require('telescope.builtin').lsp_references";
|
||||
options = {
|
||||
desc = "LSP: [G]oto [R]eferences";
|
||||
};
|
||||
}
|
||||
# Jump to the implementation of the word under your cursor.
|
||||
# Useful when your language has ways of declaring types without an actual implementation.
|
||||
{
|
||||
mode = "n";
|
||||
key = "gI";
|
||||
action.__raw = "require('telescope.builtin').lsp_implementations";
|
||||
options = {
|
||||
desc = "LSP: [G]oto [I]mplementation";
|
||||
};
|
||||
}
|
||||
# Jump to the type of the word under your cursor.
|
||||
# Useful when you're not sure what type a variable is and you want to see
|
||||
# the definition of its *type*, not where it was *defined*.
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>D";
|
||||
action.__raw = "require('telescope.builtin').lsp_type_definitions";
|
||||
options = {
|
||||
desc = "LSP: Type [D]efinition";
|
||||
};
|
||||
}
|
||||
# Fuzzy find all the symbols in your current document.
|
||||
# Symbols are things like variables, functions, types, etc.
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ds";
|
||||
action.__raw = "require('telescope.builtin').lsp_document_symbols";
|
||||
options = {
|
||||
desc = "LSP: [D]ocument [S]ymbols";
|
||||
};
|
||||
}
|
||||
# Fuzzy find all the symbols in your current workspace.
|
||||
# Similar to document symbols, except searches over your entire project.
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ws";
|
||||
action.__raw = "require('telescope.builtin').lsp_dynamic_workspace_symbols";
|
||||
options = {
|
||||
desc = "LSP: [W]orkspace [S]ymbols";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
lspBuf = {
|
||||
# Rename the variable under your cursor.
|
||||
# Most Language Servers support renaming across files, etc.
|
||||
"<leader>rn" = {
|
||||
action = "rename";
|
||||
desc = "LSP: [R]e[n]ame";
|
||||
};
|
||||
# Execute a code action, usually your cursor needs to be on top of an error
|
||||
# or a suggestion from your LSP for this to activate.
|
||||
"<leader>ca" = {
|
||||
#mode = "n";
|
||||
action = "code_action";
|
||||
desc = "LSP: [C]ode [A]ction";
|
||||
};
|
||||
"gd" = {
|
||||
action = "definition";
|
||||
desc = "LSP: [G]oto [d]efinition";
|
||||
};
|
||||
"gD" = {
|
||||
action = "declaration";
|
||||
desc = "LSP: [G]oto [D]eclaration";
|
||||
};
|
||||
"gi" = {
|
||||
action = "implementation";
|
||||
desc = "LSP: [G]oto [i]mplementation";
|
||||
};
|
||||
"gt" = {
|
||||
action = "type_definition";
|
||||
desc = "LSP: [G]oto [t]ype definition";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# LSP servers and clients are able to communicate to each other what features they support.
|
||||
# By default, Neovim doesn't support everything that is in the LSP specification.
|
||||
# When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||
# So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||
# NOTE: This is done automatically by Nixvim when enabling cmp-nvim-lsp below is an example if you did want to add new capabilities
|
||||
#capabilities = ''
|
||||
# capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||
#'';
|
||||
|
||||
# This function gets run when an LSP attaches to a particular buffer.
|
||||
# That is to say, every time a new file is opened that is associated with
|
||||
# an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
||||
# function will be executred to configure the current buffer
|
||||
# NOTE: This is an example of an attribute that takes raw lua
|
||||
onAttach = ''
|
||||
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself.
|
||||
--
|
||||
-- In this case, we create a function that lets us more easily define mappings specific
|
||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||
local map = function(keys, func, desc)
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under the cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspDetach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- The following autocommand is used to enable inlay hints in your
|
||||
-- code, if the language server you are using supports them
|
||||
--
|
||||
-- This may be unwanted, since they displace some of your code
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
72
users/common/global/nixvim/plugins/mini.nix
Executable file
72
users/common/global/nixvim/plugins/mini.nix
Executable file
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Collection of various small independent plugins/modules
|
||||
# https://nix-community.github.io/nixvim/plugins/mini.html
|
||||
plugins.mini = {
|
||||
enable = true;
|
||||
|
||||
modules = {
|
||||
# Better Around/Inside textobjects
|
||||
#
|
||||
# Examples:
|
||||
# - va) - [V]isually select [A]round [)]paren
|
||||
# - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
# - ci' - [C]hange [I]nside [']quote
|
||||
ai = {
|
||||
n_lines = 500;
|
||||
};
|
||||
|
||||
# (,[ and { syntax
|
||||
bracketed = {
|
||||
};
|
||||
|
||||
# Comments
|
||||
comment = {
|
||||
};
|
||||
|
||||
# Highlight word under cursor
|
||||
cursorword = {
|
||||
};
|
||||
|
||||
# gitsigns functionality
|
||||
diff = {
|
||||
};
|
||||
|
||||
# kinda like magit from emacs
|
||||
git = {
|
||||
};
|
||||
|
||||
# Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
#
|
||||
# Examples:
|
||||
# - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
# - sd' - [S]urround [D]elete [']quotes
|
||||
# - sr)' - [S]urround [R]eplace [)] [']
|
||||
surround = {
|
||||
};
|
||||
|
||||
# Simple and easy statusline.
|
||||
# You could remove this setup call if you don't like it,
|
||||
# and try some other statusline plugin
|
||||
statusline = {
|
||||
};
|
||||
|
||||
tabline = {
|
||||
};
|
||||
|
||||
# ... and there is more!
|
||||
# Check out: https://github.com/echasnovski/mini.nvim
|
||||
};
|
||||
};
|
||||
|
||||
# You can configure sections in the statusline by overriding their
|
||||
# default behavior. For example, here we set the section for
|
||||
# cursor location to LINE:COLUMN
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html?highlight=extraconfiglu#extraconfiglua
|
||||
extraConfigLua = ''
|
||||
require('mini.statusline').section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
111
users/common/global/nixvim/plugins/nvim-cmp.nix
Executable file
111
users/common/global/nixvim/plugins/nvim-cmp.nix
Executable file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# `friendly-snippets` contains a variety of premade snippets
|
||||
# See the README about individual language/framework/plugin snippets:
|
||||
# https://github.com/rafamadriz/friendly-snippets
|
||||
# https://nix-community.github.io/nixvim/plugins/friendly-snippets.html
|
||||
# plugins.friendly-snippets = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# Autocompletion
|
||||
# See `:help cmp`
|
||||
# https://nix-community.github.io/nixvim/plugins/cmp/index.html
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
snippet = {
|
||||
expand = ''
|
||||
function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert";
|
||||
};
|
||||
|
||||
# For an understanding of why these mappings were
|
||||
# chosen, you will need to read `:help ins-completion`
|
||||
#
|
||||
# No, but seriously, Please read `:help ins-completion`, it is really good!
|
||||
mapping = {
|
||||
# Select the [n]ext item
|
||||
# "<C-n>" = "cmp.mapping.select_next_item()";
|
||||
# Select the [p]revious item
|
||||
# "<C-p>" = "cmp.mapping.select_prev_item()";
|
||||
# Scroll the documentation window [b]ack / [f]orward
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
# Accept ([y]es) the completion.
|
||||
# This will auto-import if your LSP supports it.
|
||||
# This will expand snippets if the LSP sent a snippet.
|
||||
# "<C-y>" = "cmp.mapping.confirm { select = true }";
|
||||
# If you prefer more traditional completion keymaps,
|
||||
# you can uncomment the following lines.
|
||||
"<CR>" = "cmp.mapping.confirm { select = true }";
|
||||
"<Tab>" = "cmp.mapping.select_next_item()";
|
||||
"<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||
|
||||
# Manually trigger a completion from nvim-cmp.
|
||||
# Generally you don't need this, because nvim-cmp will display
|
||||
# completions whenever it has completion options available.
|
||||
"<C-Space>" = "cmp.mapping.complete {}";
|
||||
|
||||
# Think of <c-l> as moving to the right of your snippet expansion.
|
||||
# So if you have a snippet that's like:
|
||||
# function $name($args)
|
||||
# $body
|
||||
# end
|
||||
#
|
||||
# <c-l> will move you to the right of the expansion locations.
|
||||
# <c-h> is similar, except moving you backwards.
|
||||
"<C-l>" = ''
|
||||
cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { 'i', 's' })
|
||||
'';
|
||||
"<C-h>" = ''
|
||||
cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { 'i', 's' })
|
||||
'';
|
||||
|
||||
# For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||
# https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
};
|
||||
|
||||
# Dependencies
|
||||
#
|
||||
# WARNING: If plugins.cmp.autoEnableSources Nixivm will automatically enable the
|
||||
# corresponding source plugins. This will work only when this option is set to a list.
|
||||
# If you use a raw lua string, you will need to explicitly enable the relevant source
|
||||
# plugins in your nixvim configuration.
|
||||
sources = [
|
||||
# Snippet Engine & its associated nvim-cmp source
|
||||
# https://nix-community.github.io/nixvim/plugins/luasnip/index.html
|
||||
{
|
||||
name = "luasnip";
|
||||
}
|
||||
# Adds other completion capabilites.
|
||||
# nvim-cmp does not ship with all sources by default. They are split
|
||||
# into multiple repos for maintenance purposes.
|
||||
# https://nix-community.github.io/nixvim/plugins/cmp-nvim-lsp.html
|
||||
{
|
||||
name = "nvim_lsp";
|
||||
}
|
||||
# https://nix-community.github.io/nixvim/plugins/cmp-path.html
|
||||
{
|
||||
name = "path";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
169
users/common/global/nixvim/plugins/telescope.nix
Executable file
169
users/common/global/nixvim/plugins/telescope.nix
Executable file
|
@ -0,0 +1,169 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Fuzzy Finder (files, lsp, etc)
|
||||
# https://nix-community.github.io/nixvim/plugins/telescope/index.html
|
||||
plugins.telescope = {
|
||||
# Telescope is a fuzzy finder that comes with a lot of different things that
|
||||
# it can fuzzy find! It's more than just a "file finder", it can search
|
||||
# many different aspects of Neovim, your workspace, LSP, and more!
|
||||
#
|
||||
# The easiest way to use Telescope, is to start by doing something like:
|
||||
# :Telescope help_tags
|
||||
#
|
||||
# After running this command, a window will open up and you're able to
|
||||
# type in the prompt window. You'll see a list of `help_tags` options and
|
||||
# a corresponding preview of the help.
|
||||
#
|
||||
# Two important keymaps to use while in Telescope are:
|
||||
# - Insert mode: <c-/>
|
||||
# - Normal mode: ?
|
||||
#
|
||||
# This opens a window that shows you all of the keymaps for the current
|
||||
# Telescope picker. This is really useful to discover what Telescope can
|
||||
# do as well as how to actually do it!
|
||||
#
|
||||
# [[ Configure Telescope ]]
|
||||
# See `:help telescope` and `:help telescope.setup()`
|
||||
enable = true;
|
||||
|
||||
# Enable Telescope extensions
|
||||
extensions = {
|
||||
fzf-native.enable = true;
|
||||
ui-select.enable = true;
|
||||
};
|
||||
|
||||
# You can put your default mappings / updates / etc. in here
|
||||
# See `:help telescope.builtin`
|
||||
keymaps = {
|
||||
"<leader>sh" = {
|
||||
mode = "n";
|
||||
action = "help_tags";
|
||||
options = {
|
||||
desc = "[S]earch [H]elp";
|
||||
};
|
||||
};
|
||||
"<leader>sk" = {
|
||||
mode = "n";
|
||||
action = "keymaps";
|
||||
options = {
|
||||
desc = "[S]earch [K]eymaps";
|
||||
};
|
||||
};
|
||||
"<leader>sf" = {
|
||||
mode = "n";
|
||||
action = "find_files";
|
||||
options = {
|
||||
desc = "[S]earch [F]iles";
|
||||
};
|
||||
};
|
||||
"<leader>ss" = {
|
||||
mode = "n";
|
||||
action = "builtin";
|
||||
options = {
|
||||
desc = "[S]earch [S]elect Telescope";
|
||||
};
|
||||
};
|
||||
"<leader>sw" = {
|
||||
mode = "n";
|
||||
action = "grep_string";
|
||||
options = {
|
||||
desc = "[S]earch current [W]ord";
|
||||
};
|
||||
};
|
||||
"<leader>sg" = {
|
||||
mode = "n";
|
||||
action = "live_grep";
|
||||
options = {
|
||||
desc = "[S]earch by [G]rep";
|
||||
};
|
||||
};
|
||||
"<leader>sd" = {
|
||||
mode = "n";
|
||||
action = "diagnostics";
|
||||
options = {
|
||||
desc = "[S]earch [D]iagnostics";
|
||||
};
|
||||
};
|
||||
"<leader>sr" = {
|
||||
mode = "n";
|
||||
action = "resume";
|
||||
options = {
|
||||
desc = "[S]earch [R]esume";
|
||||
};
|
||||
};
|
||||
"<leader>s" = {
|
||||
mode = "n";
|
||||
action = "oldfiles";
|
||||
options = {
|
||||
desc = "[S]earch Recent Files ('.' for repeat)";
|
||||
};
|
||||
};
|
||||
"<leader><leader>" = {
|
||||
mode = "n";
|
||||
action = "buffers";
|
||||
options = {
|
||||
desc = "[ ] Find existing buffers";
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
extensions.__raw = "{ ['ui-select'] = { require('telescope.themes').get_dropdown() } }";
|
||||
};
|
||||
};
|
||||
|
||||
# https://nix-community.github.io/nixvim/keymaps/index.html
|
||||
keymaps = [
|
||||
# Slightly advanced example of overriding default behavior and theme
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>/";
|
||||
# You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('telescope.builtin').current_buffer_fuzzy_find(
|
||||
require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false
|
||||
}
|
||||
)
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "[/] Fuzzily search in current buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>s/";
|
||||
# It's also possible to pass additional configuration options.
|
||||
# See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('telescope.builtin').live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files'
|
||||
}
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "[S]earch [/] in Open Files";
|
||||
};
|
||||
}
|
||||
# Shortcut for searching your Neovim configuration files
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sn";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('telescope.builtin').find_files {
|
||||
cwd = vim.fn.stdpath 'config'
|
||||
}
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "[S]earch [N]eovim files";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
47
users/common/global/nixvim/plugins/which-key.nix
Executable file
47
users/common/global/nixvim/plugins/which-key.nix
Executable file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
# Useful plugin to show you pending keybinds.
|
||||
# https://nix-community.github.io/nixvim/plugins/which-key/index.html
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
|
||||
# Document existing key chains
|
||||
settings = {
|
||||
spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>c";
|
||||
group = "[C]ode";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>d";
|
||||
group = "[D]ocument";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>r";
|
||||
group = "[R]ename";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>s";
|
||||
group = "[S]earch";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>w";
|
||||
group = "[W]orkspace";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>t";
|
||||
group = "[T]oggle";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>h";
|
||||
group = "Git [H]unk";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
users/common/global/shell.nix
Normal file
22
users/common/global/shell.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{config, ...}: {
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
history = {
|
||||
size = 10000;
|
||||
ignoreAllDups = true;
|
||||
path = "${config.xdg.dataHome}/.zsh_history";
|
||||
};
|
||||
# Plugins
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "eza" "fzf" ];
|
||||
theme = "minimal";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
users/common/global/steamrun.nix
Normal file
3
users/common/global/steamrun.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.steam-run];
|
||||
}
|
3
users/common/global/wine.nix
Normal file
3
users/common/global/wine.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.wineWowPackages.waylandFull];
|
||||
}
|
7
users/common/optional/cli/code.nix
Normal file
7
users/common/optional/cli/code.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
gcc
|
||||
];
|
||||
}
|
7
users/common/optional/cli/default.nix
Normal file
7
users/common/optional/cli/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./code.nix
|
||||
./pfetch.nix
|
||||
./utils.nix
|
||||
];
|
||||
}
|
6
users/common/optional/cli/pfetch.nix
Normal file
6
users/common/optional/cli/pfetch.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = [pkgs.pfetch-rs];
|
||||
sessionVariables.PF_INFO = "ascii title os kernel uptime shell de palette";
|
||||
};
|
||||
}
|
12
users/common/optional/cli/utils.nix
Normal file
12
users/common/optional/cli/utils.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
eza.enable = true;
|
||||
fd.enable = true;
|
||||
fzf.enable = true;
|
||||
zoxide = {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
};
|
||||
}
|
6
users/common/optional/games/default.nix
Normal file
6
users/common/optional/games/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./steam.nix
|
||||
./prismlauncher.nix
|
||||
];
|
||||
}
|
3
users/common/optional/games/prismlauncher.nix
Normal file
3
users/common/optional/games/prismlauncher.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.prismlauncher];
|
||||
}
|
5
users/common/optional/games/steam.nix
Normal file
5
users/common/optional/games/steam.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
protonup
|
||||
];
|
||||
}
|
7
users/common/optional/internet/default.nix
Normal file
7
users/common/optional/internet/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./floorp.nix
|
||||
./qbittorrent.nix
|
||||
./webcord.nix
|
||||
];
|
||||
}
|
33
users/common/optional/internet/floorp.nix
Normal file
33
users/common/optional/internet/floorp.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{pkgs, config, ...}: {
|
||||
programs.browserpass.enable = true;
|
||||
programs.floorp = {
|
||||
enable = true;
|
||||
profiles."${config.home.username}" = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "DuckDuckGo";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"NixOS Wiki" = {
|
||||
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"Bing".metaData.hidden = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
users/common/optional/internet/qbittorrent.nix
Normal file
3
users/common/optional/internet/qbittorrent.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.qbittorrent];
|
||||
}
|
3
users/common/optional/internet/webcord.nix
Normal file
3
users/common/optional/internet/webcord.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.webcord];
|
||||
}
|
3
users/common/optional/media/aseprite.nix
Normal file
3
users/common/optional/media/aseprite.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.aseprite];
|
||||
}
|
3
users/common/optional/media/blender.nix
Normal file
3
users/common/optional/media/blender.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.blender];
|
||||
}
|
8
users/common/optional/media/default.nix
Normal file
8
users/common/optional/media/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./aseprite.nix
|
||||
./blender.nix
|
||||
./gimp.nix
|
||||
./krita.nix
|
||||
];
|
||||
}
|
3
users/common/optional/media/gimp.nix
Normal file
3
users/common/optional/media/gimp.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.gimp];
|
||||
}
|
3
users/common/optional/media/krita.nix
Normal file
3
users/common/optional/media/krita.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.krita];
|
||||
}
|
3
users/common/optional/productivity/anki.nix
Normal file
3
users/common/optional/productivity/anki.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [ pkgs.anki-bin ];
|
||||
}
|
8
users/common/optional/productivity/default.nix
Normal file
8
users/common/optional/productivity/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./anki.nix
|
||||
./kdeconnect.nix
|
||||
./libreoffice.nix
|
||||
./passwordstore.nix
|
||||
];
|
||||
}
|
6
users/common/optional/productivity/kdeconnect.nix
Normal file
6
users/common/optional/productivity/kdeconnect.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.kdePackages.kdeconnect-kde;
|
||||
};
|
||||
}
|
3
users/common/optional/productivity/libreoffice.nix
Normal file
3
users/common/optional/productivity/libreoffice.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.libreoffice-qt];
|
||||
}
|
5
users/common/optional/productivity/passwordstore.nix
Normal file
5
users/common/optional/productivity/passwordstore.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
66
users/kirbo/pluto.nix
Normal file
66
users/kirbo/pluto.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{outputs, ...}: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ../common/desktop/plasma
|
||||
|
||||
# Global Config
|
||||
../common/global
|
||||
|
||||
# Optional Config
|
||||
../common/optional/cli
|
||||
../common/optional/games
|
||||
../common/optional/media
|
||||
../common/optional/internet
|
||||
../common/optional/productivity
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = rec {
|
||||
username = "kirbo";
|
||||
homeDirectory = "/home/${username}";
|
||||
sessionPath = ["$HOME/.local/bin"];
|
||||
};
|
||||
|
||||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "24.05";
|
||||
}
|
BIN
wallpapers/chinatown.png
Normal file
BIN
wallpapers/chinatown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 MiB |
BIN
wallpapers/girl-reading-book.png
Normal file
BIN
wallpapers/girl-reading-book.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
BIN
wallpapers/secluded-grove-pixel.png
Normal file
BIN
wallpapers/secluded-grove-pixel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 422 KiB |
Loading…
Reference in a new issue