init
This commit is contained in:
commit
7f900c6be3
26 changed files with 965 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
result
|
77
configuration.nix
Normal file
77
configuration.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{ config, pkgs, lib, ... }@args:
|
||||
|
||||
let
|
||||
stateVersion = "23.05";
|
||||
home-manager = builtins.fetchTarball {url = "https://github.com/nix-community/home-manager/archive/release-${stateVersion}.tar.gz"; sha256 = "0rwzab51hnr6cmm1w5zmfh29gbkg6byv8jnr7frcv5kd6m8kna41"; };
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
kernelParams = [ "i915.enable_psr=0" ];
|
||||
};
|
||||
|
||||
networking.hostName = "x260";
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm = {
|
||||
enable = true;
|
||||
};
|
||||
desktopManager.gnome.enable = true;
|
||||
excludePackages = with pkgs; [ xterm ];
|
||||
};
|
||||
|
||||
home-manager.users.pim = import ./home/home.nix;
|
||||
|
||||
users.users.pim = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
git
|
||||
btop
|
||||
ripgrep
|
||||
vim
|
||||
];
|
||||
gnome.excludePackages = with pkgs; [ gnome.totem gnome-tour gnome.epiphany gnome.geary gnome-console ];
|
||||
};
|
||||
|
||||
system.stateVersion = stateVersion;
|
||||
|
||||
programs.ssh.knownHosts = {
|
||||
dmz = {
|
||||
hostNames = ["*.dmz"];
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x";
|
||||
certAuthority = true;
|
||||
};
|
||||
|
||||
hypervisors = {
|
||||
hostNames = ["*.hyp"];
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb";
|
||||
certAuthority = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults timestamp_timeout=30
|
||||
'';
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
}
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696697597,
|
||||
"narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5a237aecb57296f67276ac9ab296a41c23981f56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
flake.nix
Normal file
29
flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "My NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
myNixos = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system; };
|
||||
|
||||
modules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
43
hardware-configuration.nix
Normal file
43
hardware-configuration.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
# 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" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/33e4587b-fba3-4a9d-82d2-a9e49a8e75fa";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-cd1139a7-0c1b-4459-b586-29b577825ee9".device = "/dev/disk/by-uuid/cd1139a7-0c1b-4459-b586-29b577825ee9";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/87DA-B083";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/908399cd-2f4f-4555-8805-80c9faf190aa"; }
|
||||
];
|
||||
|
||||
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
3
home/README.md
Normal file
3
home/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# nixos-home
|
||||
|
||||
The NixOS Home Manager configuration for my user on my laptop.
|
29
home/alacritty/config.nix
Normal file
29
home/alacritty/config.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
# Gruvbox theme (https://github.com/alacritty/alacritty-theme/blob/master/themes/gruvbox_dark.yaml)
|
||||
colors = {
|
||||
primary = {
|
||||
background = "0x282828";
|
||||
foreground = "0xebdbb2";
|
||||
};
|
||||
normal = {
|
||||
black = "0x282828";
|
||||
red = "0xcc241d";
|
||||
green = "0x98971a";
|
||||
yellow = "0xd79921";
|
||||
blue = "0x458588";
|
||||
magenta = "0xb16286";
|
||||
cyan = "0x689d6a";
|
||||
white = "0xa89984";
|
||||
};
|
||||
bright = {
|
||||
black = "0x928374";
|
||||
red = "0xfb4934";
|
||||
green = "0xb8bb26";
|
||||
yellow = "0xfabd2f";
|
||||
blue = "0x83a598";
|
||||
magenta = "0xd3869b";
|
||||
cyan = "0x8ec07c";
|
||||
white = "0xebdbb2";
|
||||
};
|
||||
};
|
||||
}
|
8
home/alacritty/default.nix
Normal file
8
home/alacritty/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config = {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = import ./config.nix;
|
||||
};
|
||||
};
|
||||
}
|
19
home/bash/default.nix
Normal file
19
home/bash/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config = {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
htop = "btop";
|
||||
gp = "git push";
|
||||
gco = "git checkout";
|
||||
gd = "git diff";
|
||||
gc = "git commit";
|
||||
gpl = "git pull";
|
||||
gb = "git branch";
|
||||
ga = "git add";
|
||||
gl = "git log";
|
||||
gs = "git status";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
home/direnv/default.nix
Normal file
9
home/direnv/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
config = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
12
home/firefox/addons.json
Normal file
12
home/firefox/addons.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
[
|
||||
{
|
||||
"slug": "sixindicator"
|
||||
},
|
||||
{
|
||||
"slug": "indicatetls"
|
||||
},
|
||||
{
|
||||
"pname": "http-version-indicator",
|
||||
"slug": "http2-indicator"
|
||||
}
|
||||
]
|
33
home/firefox/addons.nix
Normal file
33
home/firefox/addons.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{nurpkgs, lib, ...}@args:
|
||||
let
|
||||
rycee-addons = nurpkgs.repos.rycee.firefox-addons;
|
||||
custom-addons = import ./custom-addons.nix args;
|
||||
in
|
||||
{
|
||||
default = lib.concatLists [
|
||||
(with rycee-addons; [
|
||||
ublock-origin
|
||||
clearurls
|
||||
cookie-autodelete
|
||||
istilldontcareaboutcookies
|
||||
keepassxc-browser
|
||||
redirector
|
||||
ublacklist
|
||||
umatrix
|
||||
violentmonkey
|
||||
boring-rss
|
||||
# rycee.bypass-paywalls-clean
|
||||
])
|
||||
(with custom-addons; [
|
||||
http-version-indicator
|
||||
indicatetls
|
||||
sixindicator
|
||||
])
|
||||
];
|
||||
sue = with rycee-addons; [
|
||||
ublock-origin
|
||||
istilldontcareaboutcookies
|
||||
keepassxc-browser
|
||||
custom-addons.simple-style-fox-2
|
||||
];
|
||||
}
|
88
home/firefox/custom-addons.nix
Normal file
88
home/firefox/custom-addons.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
# Stolen from: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/default.nix
|
||||
buildFirefoxXpiAddon = lib.makeOverridable ({ stdenv ? pkgs.stdenv, fetchurl ? pkgs.fetchurl,
|
||||
pname, version, addonId, url, sha256, meta, ... }: stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
inherit meta;
|
||||
|
||||
src = fetchurl { inherit url sha256; };
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "$src" "$dst/${addonId}.xpi"
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
"http-version-indicator" = buildFirefoxXpiAddon {
|
||||
pname = "http-version-indicator";
|
||||
version = "3.2.1";
|
||||
addonId = "spdyindicator@chengsun.github.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3767224/http2_indicator-3.2.1.xpi";
|
||||
sha256 = "be9518017334ce502a1da514542c2ca4f974217d0c8e6c7c31d518aba57c09a8";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://github.com/bsiegel/http-version-indicator";
|
||||
description = "An indicator showing the HTTP version used to load the page in the address bar.";
|
||||
mozPermissions = [ "<all_urls>" "tabs" "webNavigation" "webRequest" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"indicatetls" = buildFirefoxXpiAddon {
|
||||
pname = "indicatetls";
|
||||
version = "0.3.0";
|
||||
addonId = "{252ee273-8c8d-4609-b54d-62ae345be0a1}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3608595/indicatetls-0.3.0.xpi";
|
||||
sha256 = "7a3b7edb1085f7b15d279c1013fac1d68f5247cfd6312d5275cb053e24a79465";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://github.com/jannispinter/indicatetls";
|
||||
description = "Displays negotiated SSL/TLS protocol version and additional security information in the address bar";
|
||||
license = licenses.mpl20;
|
||||
mozPermissions = [
|
||||
"tabs"
|
||||
"webNavigation"
|
||||
"webRequest"
|
||||
"webRequestBlocking"
|
||||
"http://*/*"
|
||||
"https://*/*"
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"sixindicator" = buildFirefoxXpiAddon {
|
||||
pname = "sixindicator";
|
||||
version = "1.3.0";
|
||||
addonId = "{8c9cad02-c069-4e93-909d-d874da819c49}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3493442/sixindicator-1.3.0.xpi";
|
||||
sha256 = "415ab83ed4ac94d1efe114752a09df29536d1bd54cc9b7e5ce5d9ee55a84226d";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://github.com/HostedDinner/SixIndicator";
|
||||
description = "Shows a simple icon, if IPv6 or IPv4 was used for the request of the site. When clicking on the icon, more information is shown, like the number of requests per domain and if these requests were made via IPv6 or IPv4.";
|
||||
license = licenses.mit;
|
||||
mozPermissions = [ "tabs" "webRequest" "<all_urls>" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"simple-style-fox-2" = buildFirefoxXpiAddon {
|
||||
pname = "simple-style-fox-2";
|
||||
version = "10.0";
|
||||
addonId = "{317526c6-ff2b-49c9-822e-d77b4a3da1d1}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3934220/simple_style_fox_2-10.0.xpi";
|
||||
sha256 = "1aaac3ba08d21086d7087015f92a27661940df45a97bf5680588c883f799a97d";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "Simple style fox 2";
|
||||
license = licenses.cc-by-30;
|
||||
mozPermissions = [];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
}
|
51
home/firefox/default.nix
Normal file
51
home/firefox/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ pkgs, ...}@args:
|
||||
|
||||
let
|
||||
nurpkgs = import (builtins.fetchTarball {url = "https://github.com/nix-community/NUR/archive/master.tar.gz"; sha256 = "1gb3wkmyl6xbs4kval2ml48nlil39853dj62rxfrlk9i2nky2ly4"; }) { inherit pkgs; };
|
||||
firefoxAddons = import ./addons.nix (args // {inherit nurpkgs; });
|
||||
firefoxSettings = {
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "always";
|
||||
"browser.tabs.firefox-view" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
settings = firefoxSettings;
|
||||
extensions = firefoxAddons.default;
|
||||
};
|
||||
sue = {
|
||||
id = 1;
|
||||
settings = firefoxSettings;
|
||||
extensions = firefoxAddons.sue;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.desktopEntries.firefox-sue = {
|
||||
categories = [ "Network" "WebBrowser" ];
|
||||
exec = "firefox -P sue --name firefox %U";
|
||||
genericName = "Web Browser";
|
||||
icon = "firefox";
|
||||
mimeType = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"application/xhtml+xml"
|
||||
"application/vnd.mozilla.xul+xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
];
|
||||
name = "Firefox | Sue";
|
||||
startupNotify = true;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
};
|
||||
};
|
||||
}
|
29
home/flake.nix
Normal file
29
home/flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "Home Manager configuration of pim";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."pim" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ./home.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
};
|
||||
};
|
||||
}
|
8
home/fzf/default.nix
Normal file
8
home/fzf/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config = {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
12
home/git/default.nix
Normal file
12
home/git/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
config = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Pim Kunis";
|
||||
userEmail = "pim@kunis.nl";
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
48
home/home.nix
Normal file
48
home/home.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bash
|
||||
./neovim
|
||||
./firefox
|
||||
./ssh
|
||||
./syncthing
|
||||
./alacritty
|
||||
./keepassxc
|
||||
./git
|
||||
./direnv
|
||||
./thunderbird
|
||||
./fzf
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "pim";
|
||||
homeDirectory = "/home/pim";
|
||||
stateVersion = "23.05";
|
||||
|
||||
packages = with pkgs; [
|
||||
moonlight-qt
|
||||
vlc
|
||||
nicotine-plus
|
||||
logseq
|
||||
signal-desktop
|
||||
telegram-desktop
|
||||
strawberry
|
||||
tree
|
||||
gimp
|
||||
libreoffice
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
chromium.enable = true;
|
||||
};
|
||||
|
||||
# Let home-manager manage the X session
|
||||
xsession = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg.userDirs.enable = true;
|
||||
}
|
33
home/keepassxc/config.nix
Normal file
33
home/keepassxc/config.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
General = {
|
||||
ConfigVersion = 2;
|
||||
};
|
||||
|
||||
Browser = {
|
||||
CustomProxyLocation = "";
|
||||
Enabled = true;
|
||||
};
|
||||
|
||||
GUI = {
|
||||
MinimizeOnClose = true;
|
||||
MinimizeOnStartup = true;
|
||||
ShowExpiredEntriesOnDatabaseUnlock = false;
|
||||
ShowTrayIcon = true;
|
||||
TrayIconAppearance = "monochrome-light";
|
||||
};
|
||||
|
||||
PasswordGenerator = {
|
||||
AdditionalChars = "";
|
||||
ExcludedChars = "";
|
||||
};
|
||||
|
||||
SSHAgent = {
|
||||
Enabled = true;
|
||||
};
|
||||
|
||||
Security = {
|
||||
ClearClipboardTimeout = 30;
|
||||
ClearSearch = false;
|
||||
EnableCopyOnDoubleClick = true;
|
||||
};
|
||||
}
|
8
home/keepassxc/default.nix
Normal file
8
home/keepassxc/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, lib, ...}:
|
||||
|
||||
{
|
||||
config = {
|
||||
home.packages = [ pkgs.keepassxc ];
|
||||
xdg.configFile."keepassxc/keepassxc.ini".text = lib.generators.toINI {} (import ./config.nix);
|
||||
};
|
||||
}
|
36
home/neovim/default.nix
Normal file
36
home/neovim/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
nil
|
||||
nodePackages.pyright
|
||||
neofetch
|
||||
gopls
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-lspconfig
|
||||
gruvbox-nvim
|
||||
leap-nvim
|
||||
telescope-nvim
|
||||
vim-commentary
|
||||
vim-sleuth
|
||||
gitsigns-nvim
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
friendly-snippets
|
||||
neodev-nvim
|
||||
];
|
||||
extraLuaConfig = builtins.readFile ./neovim.lua;
|
||||
};
|
||||
|
||||
programs.git.extraConfig.core.editor = "nvim";
|
||||
};
|
||||
}
|
124
home/neovim/neovim.lua
Normal file
124
home/neovim/neovim.lua
Normal file
|
@ -0,0 +1,124 @@
|
|||
--[ GLOBAL ]--
|
||||
|
||||
vim.o.background = "dark"
|
||||
vim.cmd([[colorscheme gruvbox]])
|
||||
vim.g.mapleader = ";"
|
||||
vim.o.signcolumn = "yes"
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.cursorline = true
|
||||
|
||||
--[ LSPCONFIG ]--
|
||||
|
||||
local on_attach = function(_, bufnr)
|
||||
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap('<leader>r', vim.lsp.buf.rename)
|
||||
bufmap('<leader>a', vim.lsp.buf.code_action)
|
||||
|
||||
bufmap('gd', vim.lsp.buf.definition)
|
||||
bufmap('gD', vim.lsp.buf.declaration)
|
||||
bufmap('gI', vim.lsp.buf.implementation)
|
||||
bufmap('<leader>D', vim.lsp.buf.type_definition)
|
||||
|
||||
bufmap('gr', require('telescope.builtin').lsp_references)
|
||||
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
|
||||
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
|
||||
|
||||
bufmap('K', vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
require('neodev').setup()
|
||||
require'lspconfig'.nil_ls.setup{ on_attach = on_attach, capabilities = capabilities }
|
||||
require'lspconfig'.pyright.setup{ on_attach = on_attach, capabilities = capabilities }
|
||||
require'lspconfig'.gopls.setup{ on_attach = on_attach, capabilities = capabilities }
|
||||
|
||||
--[ LEAP ]--
|
||||
|
||||
require('leap').add_default_mappings()
|
||||
-- Don't remap 'x' in visual mode.
|
||||
vim.keymap.del({'x', 'o'}, 'x')
|
||||
vim.keymap.del({'x', 'o'}, 'X')
|
||||
|
||||
--[ TELESCOPE ]--
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fr', builtin.lsp_references, {})
|
||||
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, {})
|
||||
|
||||
require('telescope').setup{
|
||||
pickers = {
|
||||
find_files = {
|
||||
theme = "dropdown"
|
||||
},
|
||||
live_grep = {
|
||||
theme = "dropdown"
|
||||
},
|
||||
buffers = {
|
||||
theme = "dropdown"
|
||||
},
|
||||
lsp_references = {
|
||||
theme = "dropdown"
|
||||
},
|
||||
lsp_document_symbols = {
|
||||
theme = "dropdown"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
--[ COMMENTARY ]--
|
||||
vim.cmd([[autocmd FileType nix setlocal commentstring=#\ %s]])
|
||||
|
||||
--[ GITSIGNS ]--
|
||||
require("gitsigns").setup()
|
||||
|
||||
--[ CMP ]--
|
||||
|
||||
-- For snippets: look at https://github.com/vimjoyer/nvim-nix-video/blob/main/nvim/plugin/cmp.lua
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup {
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete {},
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
}
|
44
home/ssh/default.nix
Normal file
44
home/ssh/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ lib, ...}:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = "User root";
|
||||
|
||||
matchBlocks = {
|
||||
gitlab-sue = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "gitlab.com";
|
||||
identityFile = "~/.ssh/sue_ed25519";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
github = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "github.com";
|
||||
user = "pizzapim";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
lewis = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "lewis.hyp";
|
||||
};
|
||||
atlas = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "atlas.hyp";
|
||||
};
|
||||
jefke = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "jefke.hyp";
|
||||
};
|
||||
hermes = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "hermes.dmz";
|
||||
};
|
||||
maestro = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "maestro.dmz";
|
||||
};
|
||||
bancomart = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "bancomart.dmz";
|
||||
};
|
||||
handjecontantje = lib.hm.dag.entryBefore [ "*" ] {
|
||||
hostname = "handjecontantje.dmz";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
home/syncthing/default.nix
Normal file
9
home/syncthing/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.syncthing.enable = true;
|
||||
xdg.configFile."syncthing/config.xml".source = ./syncthing.xml;
|
||||
xdg.userDirs.music = "${config.home.homeDirectory}/sync/Music";
|
||||
};
|
||||
}
|
175
home/syncthing/syncthing.xml
Normal file
175
home/syncthing/syncthing.xml
Normal file
|
@ -0,0 +1,175 @@
|
|||
<configuration version="37">
|
||||
<folder id="nncij-isaoe" label="Nextcloud" path="/home/pim/sync" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||
<filesystemType>basic</filesystemType>
|
||||
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
|
||||
<encryptionPassword></encryptionPassword>
|
||||
</device>
|
||||
<device id="LX5I2N3-WXPGTGV-ZMYTG3X-SZXJGKQ-KDGUBIA-KVFXMXX-2U2I3BX-M3H53Q2" introducedBy="">
|
||||
<encryptionPassword></encryptionPassword>
|
||||
</device>
|
||||
<minDiskFree unit="%">1</minDiskFree>
|
||||
<versioning>
|
||||
<cleanupIntervalS>3600</cleanupIntervalS>
|
||||
<fsPath></fsPath>
|
||||
<fsType>basic</fsType>
|
||||
</versioning>
|
||||
<copiers>0</copiers>
|
||||
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
|
||||
<hashers>0</hashers>
|
||||
<order>random</order>
|
||||
<ignoreDelete>false</ignoreDelete>
|
||||
<scanProgressIntervalS>0</scanProgressIntervalS>
|
||||
<pullerPauseS>0</pullerPauseS>
|
||||
<maxConflicts>10</maxConflicts>
|
||||
<disableSparseFiles>false</disableSparseFiles>
|
||||
<disableTempIndexes>false</disableTempIndexes>
|
||||
<paused>false</paused>
|
||||
<weakHashThresholdPct>25</weakHashThresholdPct>
|
||||
<markerName>.stfolder</markerName>
|
||||
<copyOwnershipFromParent>false</copyOwnershipFromParent>
|
||||
<modTimeWindowS>0</modTimeWindowS>
|
||||
<maxConcurrentWrites>2</maxConcurrentWrites>
|
||||
<disableFsync>false</disableFsync>
|
||||
<blockPullOrder>standard</blockPullOrder>
|
||||
<copyRangeMethod>standard</copyRangeMethod>
|
||||
<caseSensitiveFS>false</caseSensitiveFS>
|
||||
<junctionsAsDirs>false</junctionsAsDirs>
|
||||
<syncOwnership>false</syncOwnership>
|
||||
<sendOwnership>false</sendOwnership>
|
||||
<syncXattrs>false</syncXattrs>
|
||||
<sendXattrs>false</sendXattrs>
|
||||
<xattrFilter>
|
||||
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||
<maxTotalSize>4096</maxTotalSize>
|
||||
</xattrFilter>
|
||||
</folder>
|
||||
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" name="Home" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
||||
<address>dynamic</address>
|
||||
<paused>false</paused>
|
||||
<autoAcceptFolders>false</autoAcceptFolders>
|
||||
<maxSendKbps>0</maxSendKbps>
|
||||
<maxRecvKbps>0</maxRecvKbps>
|
||||
<maxRequestKiB>0</maxRequestKiB>
|
||||
<untrusted>false</untrusted>
|
||||
<remoteGUIPort>0</remoteGUIPort>
|
||||
</device>
|
||||
<device id="LX5I2N3-WXPGTGV-ZMYTG3X-SZXJGKQ-KDGUBIA-KVFXMXX-2U2I3BX-M3H53Q2" name="x260" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
||||
<address>dynamic</address>
|
||||
<paused>false</paused>
|
||||
<autoAcceptFolders>false</autoAcceptFolders>
|
||||
<maxSendKbps>0</maxSendKbps>
|
||||
<maxRecvKbps>0</maxRecvKbps>
|
||||
<maxRequestKiB>0</maxRequestKiB>
|
||||
<untrusted>false</untrusted>
|
||||
<remoteGUIPort>0</remoteGUIPort>
|
||||
</device>
|
||||
<gui enabled="true" tls="false" debugging="false">
|
||||
<address>127.0.0.1:8384</address>
|
||||
<apikey></apikey>
|
||||
<theme>default</theme>
|
||||
</gui>
|
||||
<ldap></ldap>
|
||||
<options>
|
||||
<listenAddress>default</listenAddress>
|
||||
<globalAnnounceServer>default</globalAnnounceServer>
|
||||
<globalAnnounceEnabled>true</globalAnnounceEnabled>
|
||||
<localAnnounceEnabled>true</localAnnounceEnabled>
|
||||
<localAnnouncePort>21027</localAnnouncePort>
|
||||
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
|
||||
<maxSendKbps>0</maxSendKbps>
|
||||
<maxRecvKbps>0</maxRecvKbps>
|
||||
<reconnectionIntervalS>60</reconnectionIntervalS>
|
||||
<relaysEnabled>true</relaysEnabled>
|
||||
<relayReconnectIntervalM>10</relayReconnectIntervalM>
|
||||
<startBrowser>true</startBrowser>
|
||||
<natEnabled>true</natEnabled>
|
||||
<natLeaseMinutes>60</natLeaseMinutes>
|
||||
<natRenewalMinutes>30</natRenewalMinutes>
|
||||
<natTimeoutSeconds>10</natTimeoutSeconds>
|
||||
<urAccepted>-1</urAccepted>
|
||||
<urSeen>3</urSeen>
|
||||
<urUniqueID></urUniqueID>
|
||||
<urURL>https://data.syncthing.net/newdata</urURL>
|
||||
<urPostInsecurely>false</urPostInsecurely>
|
||||
<urInitialDelayS>1800</urInitialDelayS>
|
||||
<autoUpgradeIntervalH>12</autoUpgradeIntervalH>
|
||||
<upgradeToPreReleases>false</upgradeToPreReleases>
|
||||
<keepTemporariesH>24</keepTemporariesH>
|
||||
<cacheIgnoredFiles>false</cacheIgnoredFiles>
|
||||
<progressUpdateIntervalS>5</progressUpdateIntervalS>
|
||||
<limitBandwidthInLan>false</limitBandwidthInLan>
|
||||
<minHomeDiskFree unit="%">1</minHomeDiskFree>
|
||||
<releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
|
||||
<overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
|
||||
<tempIndexMinBlocks>10</tempIndexMinBlocks>
|
||||
<trafficClass>0</trafficClass>
|
||||
<setLowPriority>true</setLowPriority>
|
||||
<maxFolderConcurrency>0</maxFolderConcurrency>
|
||||
<crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
|
||||
<crashReportingEnabled>true</crashReportingEnabled>
|
||||
<stunKeepaliveStartS>180</stunKeepaliveStartS>
|
||||
<stunKeepaliveMinS>20</stunKeepaliveMinS>
|
||||
<stunServer>default</stunServer>
|
||||
<databaseTuning>auto</databaseTuning>
|
||||
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
|
||||
<announceLANAddresses>true</announceLANAddresses>
|
||||
<sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>
|
||||
<connectionLimitEnough>0</connectionLimitEnough>
|
||||
<connectionLimitMax>0</connectionLimitMax>
|
||||
<insecureAllowOldTLSVersions>false</insecureAllowOldTLSVersions>
|
||||
</options>
|
||||
<defaults>
|
||||
<folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||
<filesystemType>basic</filesystemType>
|
||||
<device id="LX5I2N3-WXPGTGV-ZMYTG3X-SZXJGKQ-KDGUBIA-KVFXMXX-2U2I3BX-M3H53Q2" introducedBy="">
|
||||
<encryptionPassword></encryptionPassword>
|
||||
</device>
|
||||
<minDiskFree unit="%">1</minDiskFree>
|
||||
<versioning>
|
||||
<cleanupIntervalS>3600</cleanupIntervalS>
|
||||
<fsPath></fsPath>
|
||||
<fsType>basic</fsType>
|
||||
</versioning>
|
||||
<copiers>0</copiers>
|
||||
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
|
||||
<hashers>0</hashers>
|
||||
<order>random</order>
|
||||
<ignoreDelete>false</ignoreDelete>
|
||||
<scanProgressIntervalS>0</scanProgressIntervalS>
|
||||
<pullerPauseS>0</pullerPauseS>
|
||||
<maxConflicts>10</maxConflicts>
|
||||
<disableSparseFiles>false</disableSparseFiles>
|
||||
<disableTempIndexes>false</disableTempIndexes>
|
||||
<paused>false</paused>
|
||||
<weakHashThresholdPct>25</weakHashThresholdPct>
|
||||
<markerName>.stfolder</markerName>
|
||||
<copyOwnershipFromParent>false</copyOwnershipFromParent>
|
||||
<modTimeWindowS>0</modTimeWindowS>
|
||||
<maxConcurrentWrites>2</maxConcurrentWrites>
|
||||
<disableFsync>false</disableFsync>
|
||||
<blockPullOrder>standard</blockPullOrder>
|
||||
<copyRangeMethod>standard</copyRangeMethod>
|
||||
<caseSensitiveFS>false</caseSensitiveFS>
|
||||
<junctionsAsDirs>false</junctionsAsDirs>
|
||||
<syncOwnership>false</syncOwnership>
|
||||
<sendOwnership>false</sendOwnership>
|
||||
<syncXattrs>false</syncXattrs>
|
||||
<sendXattrs>false</sendXattrs>
|
||||
<xattrFilter>
|
||||
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||
<maxTotalSize>4096</maxTotalSize>
|
||||
</xattrFilter>
|
||||
</folder>
|
||||
<device id="" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
||||
<address>dynamic</address>
|
||||
<paused>false</paused>
|
||||
<autoAcceptFolders>false</autoAcceptFolders>
|
||||
<maxSendKbps>0</maxSendKbps>
|
||||
<maxRecvKbps>0</maxRecvKbps>
|
||||
<maxRequestKiB>0</maxRequestKiB>
|
||||
<untrusted>false</untrusted>
|
||||
<remoteGUIPort>0</remoteGUIPort>
|
||||
</device>
|
||||
<ignores></ignores>
|
||||
</defaults>
|
||||
</configuration>
|
10
home/thunderbird/default.nix
Normal file
10
home/thunderbird/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
config = {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue