197 lines
4.1 KiB
Nix
197 lines
4.1 KiB
Nix
|
{
|
||
|
inputs,
|
||
|
outputs,
|
||
|
lib,
|
||
|
config,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: {
|
||
|
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-amd
|
||
|
# inputs.hardware.nixosModules.common-ssd
|
||
|
|
||
|
# You can also split up your configuration and import pieces of it here:
|
||
|
# ./users.nix
|
||
|
];
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# This will add each flake input as a registry
|
||
|
# To make nix3 commands consistent with your flake
|
||
|
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||
|
|
||
|
# This will additionally add your inputs to the system's legacy channels
|
||
|
# Making legacy nix commands consistent as well, awesome!
|
||
|
nix.nixPath = ["/etc/nix/path"];
|
||
|
environment.etc =
|
||
|
lib.mapAttrs'
|
||
|
(name: value: {
|
||
|
name = "nix/path/${name}";
|
||
|
value.source = value.flake;
|
||
|
})
|
||
|
config.nix.registry;
|
||
|
|
||
|
nix.settings = {
|
||
|
# Enable flakes and new 'nix' command
|
||
|
experimental-features = "nix-command flakes";
|
||
|
# Deduplicate and optimize nix store
|
||
|
auto-optimise-store = true;
|
||
|
};
|
||
|
|
||
|
boot = {
|
||
|
loader.systemd-boot.enable = true;
|
||
|
loader.efi.canTouchEfiVariables = true;
|
||
|
};
|
||
|
|
||
|
# Set your time zone.
|
||
|
time.timeZone = "Europe/Paris";
|
||
|
|
||
|
# Enable CUPS to print documents.
|
||
|
services.printing.enable = true;
|
||
|
|
||
|
# Enable sound with pipewire.
|
||
|
sound.enable = true;
|
||
|
hardware.pulseaudio.enable = false;
|
||
|
security.rtkit.enable = true;
|
||
|
services.pipewire = {
|
||
|
enable = true;
|
||
|
alsa.enable = true;
|
||
|
alsa.support32Bit = true;
|
||
|
pulse.enable = true;
|
||
|
};
|
||
|
|
||
|
users.defaultUserShell = pkgs.zsh;
|
||
|
|
||
|
programs.zsh = {
|
||
|
enable = true;
|
||
|
enableCompletion = true;
|
||
|
autosuggestions.enable = true;
|
||
|
syntaxHighlighting.enable = true;
|
||
|
|
||
|
shellAliases = {
|
||
|
ll = "ls -al";
|
||
|
};
|
||
|
# history.size = 10000;
|
||
|
# history.path = "${config.xdg.dataHome}/zsh/history";
|
||
|
ohMyZsh = {
|
||
|
enable = true;
|
||
|
plugins = [
|
||
|
"git"
|
||
|
# "thefuck"
|
||
|
];
|
||
|
theme = "robbyrussell";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.fwupd.enable = true;
|
||
|
|
||
|
programs.neovim = {
|
||
|
enable = true;
|
||
|
defaultEditor = true;
|
||
|
|
||
|
configure = {
|
||
|
customRC = ''
|
||
|
set number
|
||
|
set list
|
||
|
if &diff
|
||
|
colorscheme blue
|
||
|
endif
|
||
|
'';
|
||
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
||
|
start = [
|
||
|
ctrlp
|
||
|
nvim-tree-lua
|
||
|
indent-blankline-nvim
|
||
|
|
||
|
nvim-lspconfig
|
||
|
nvim-treesitter.withAllGrammars
|
||
|
plenary-nvim
|
||
|
gruvbox-material
|
||
|
mini-nvim
|
||
|
];
|
||
|
};
|
||
|
|
||
|
extraLuaConfig =
|
||
|
/*
|
||
|
lua
|
||
|
*/
|
||
|
''
|
||
|
require("nvim-tree").setup()
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking = {
|
||
|
networkmanager.enable = true;
|
||
|
|
||
|
firewall.enable = true;
|
||
|
};
|
||
|
|
||
|
nix.settings.allowed-users = ["@wheel"];
|
||
|
|
||
|
security = {
|
||
|
#auditd.enable = true;
|
||
|
#audit.enable = true;
|
||
|
#audit.rules = [
|
||
|
# "-a exit,always -F arch=b64 -S execve"
|
||
|
#];
|
||
|
|
||
|
sudo.execWheelOnly = true;
|
||
|
};
|
||
|
|
||
|
services.tailscale.enable = true;
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
wget
|
||
|
dig
|
||
|
nmap
|
||
|
btop
|
||
|
gitFull
|
||
|
smartmontools
|
||
|
lm_sensors
|
||
|
pciutils
|
||
|
gcc
|
||
|
gnumake
|
||
|
sysstat
|
||
|
file
|
||
|
ffmpeg
|
||
|
syncthing
|
||
|
|
||
|
kate
|
||
|
partition-manager
|
||
|
gparted
|
||
|
librewolf
|
||
|
vscodium
|
||
|
vlc
|
||
|
filelight
|
||
|
libreoffice
|
||
|
];
|
||
|
}
|