refactor
This commit is contained in:
parent
d516a6e283
commit
04fdbf9d61
16 changed files with 72 additions and 335 deletions
|
|
@ -8,12 +8,17 @@
|
|||
myhostname,
|
||||
...
|
||||
}:
|
||||
let
|
||||
modulesDirectory = ../../moduler;
|
||||
in
|
||||
{
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
(modulesDirectory + /services/base)
|
||||
|
||||
../../moduler/users.nix
|
||||
../../moduler/base.nix
|
||||
../../moduler/services/monitoring
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -7,24 +7,26 @@
|
|||
}:
|
||||
let
|
||||
theme = "mocha";
|
||||
modulesDirectory = ../../moduler;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../moduler/base.nix
|
||||
(modulesDirectory + /moduler/users.nix)
|
||||
(modulesDirectory + /moduler/git.nix)
|
||||
(modulesDirectory + /moduler/network.nix)
|
||||
(modulesDirectory + /moduler/programs.nix)
|
||||
(modulesDirectory + /moduler/system.nix)
|
||||
(modulesDirectory + /moduler/dev.nix)
|
||||
(modulesDirectory + /moduler/sound.nix)
|
||||
(modulesDirectory + /programs/kubernetes-tools.nix)
|
||||
|
||||
../../moduler/users.nix
|
||||
../../moduler/git.nix
|
||||
../../moduler/network.nix
|
||||
../../moduler/programs.nix
|
||||
../../moduler/system.nix
|
||||
../../moduler/dev.nix
|
||||
../../moduler/hyprland.nix
|
||||
../../moduler/sound.nix
|
||||
../../moduler/programs/kubernetes-tools.nix
|
||||
../../moduler/programs/confetti
|
||||
../../moduler/programs/nixvim
|
||||
(modulesDirectory + /services/base)
|
||||
|
||||
(modulesDirectory + /programs/hyprland)
|
||||
(modulesDirectory + /programs/confetti)
|
||||
(modulesDirectory + /programs/nixvim)
|
||||
];
|
||||
|
||||
kubernetes-tools.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
myhostname,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../moduler/base.nix
|
||||
../../moduler/users.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kubectl
|
||||
azure-cli
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
networking.hostName = myhostname;
|
||||
|
||||
services.xserver.dpi = 140;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = lib.mkDefault "/dev/nvme0n1";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "1G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "101G";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/40bb9f8c-1a35-476a-8d78-18763ec97171";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/FAC4-0F98";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/d14d1b31-04fb-4ec8-a70f-438939898c3f"; }
|
||||
];
|
||||
|
||||
# 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.enp59s0u1u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -11,24 +11,26 @@
|
|||
}:
|
||||
let
|
||||
theme = "mocha";
|
||||
modulesDirectory = ../../moduler;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../moduler/base.nix
|
||||
(modulesDirectory + /moduler/users.nix)
|
||||
(modulesDirectory + /moduler/git.nix)
|
||||
(modulesDirectory + /moduler/network.nix)
|
||||
(modulesDirectory + /moduler/programs.nix)
|
||||
(modulesDirectory + /moduler/system.nix)
|
||||
(modulesDirectory + /moduler/dev.nix)
|
||||
(modulesDirectory + /moduler/hyprland.nix)
|
||||
(modulesDirectory + /moduler/sound.nix)
|
||||
|
||||
../../moduler/users.nix
|
||||
../../moduler/git.nix
|
||||
../../moduler/network.nix
|
||||
../../moduler/programs.nix
|
||||
../../moduler/system.nix
|
||||
../../moduler/dev.nix
|
||||
../../moduler/hyprland.nix
|
||||
../../moduler/sound.nix
|
||||
../../moduler/programs/kubernetes-tools.nix
|
||||
../../moduler/programs/confetti
|
||||
../../moduler/programs/nixvim
|
||||
(modulesDirectory + /services/base)
|
||||
|
||||
(modulesDirectory + /moduler/programs/kubernetes-tools.nix)
|
||||
(modulesDirectory + /moduler/programs/confetti)
|
||||
(modulesDirectory + /moduler/programs/nixvim)
|
||||
];
|
||||
|
||||
kubernetes-tools.enable = true;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ in
|
|||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(modulesDirectory + /base.nix)
|
||||
|
||||
(modulesDirectory + /users.nix)
|
||||
(modulesDirectory + /kitchenowl.nix)
|
||||
(modulesDirectory + /radicale.nix)
|
||||
|
|
@ -24,6 +24,7 @@ in
|
|||
(modulesDirectory + /uptime-kuma.nix)
|
||||
(modulesDirectory + /wedding.nix)
|
||||
|
||||
(modulesDirectory + /services/base)
|
||||
(modulesDirectory + /services/monitoring)
|
||||
(modulesDirectory + /services/headscale)
|
||||
(modulesDirectory + /services/mpd)
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -725,6 +725,8 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3630), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
+ { USB_DEVICE(0x2c7c, 0x7009), .driver_info = BTUSB_MEDIATEK |
|
||||
+ BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional Realtek 8723AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "btusb-kernel-module";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
|
||||
# The key change is here: point to the correct module path for btusb.
|
||||
modulePath = "drivers/bluetooth";
|
||||
|
||||
buildPhase = ''
|
||||
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
||||
cp $BUILT_KERNEL/Module.symvers .
|
||||
cp $BUILT_KERNEL/.config .
|
||||
cp $kernel_dev/vmlinux .
|
||||
make "-j$NIX_BUILD_CORES" modules_prepare
|
||||
make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
make \
|
||||
INSTALL_MOD_PATH="$out" \
|
||||
XZ="xz -T$NIX_BUILD_CORES" \
|
||||
M="$modulePath" \
|
||||
modules_install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "btusb kernel module";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
}
|
||||
|
|
@ -3,65 +3,18 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# go-migrate-pg = pkgs.go-migrate.overrideAttrs (oldAttrs: {
|
||||
# tags = [ "postgres" ];
|
||||
# });
|
||||
in
|
||||
{
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"fw"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Neovim
|
||||
inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
|
||||
# Nix
|
||||
nixfmt-rfc-style
|
||||
|
||||
# Docker
|
||||
# dive
|
||||
lazydocker
|
||||
|
||||
# Jobb
|
||||
gh
|
||||
# awscli
|
||||
# minio-client
|
||||
# dotnetCorePackages.dotnet_9.sdk
|
||||
# opentofu
|
||||
# azure-cli
|
||||
# jira-cli-go
|
||||
|
||||
# Blogging
|
||||
# zola
|
||||
|
||||
# System Design
|
||||
# sqlc
|
||||
# postgresql
|
||||
# plantuml
|
||||
|
||||
# Web Dev
|
||||
# tailwindcss
|
||||
# prettierd
|
||||
|
||||
# Go
|
||||
# go
|
||||
# air
|
||||
# templ
|
||||
# go-migrate-pg
|
||||
|
||||
# Build
|
||||
git
|
||||
gcc
|
||||
# gnumake
|
||||
# cmake
|
||||
|
||||
# System Tools
|
||||
awscli
|
||||
minio-client
|
||||
opentofu
|
||||
azure-cli
|
||||
yq
|
||||
jq
|
||||
git
|
||||
# qrencode
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixd
|
||||
dockerfile-language-server
|
||||
bash-language-server
|
||||
helm-ls
|
||||
yaml-language-server
|
||||
lua-language-server
|
||||
marksman
|
||||
|
||||
# tofu-ls
|
||||
# gopls
|
||||
# omnisharp-roslyn
|
||||
# nodejs_22
|
||||
# vue-language-server
|
||||
# vtsls
|
||||
# typescript
|
||||
# typescript-language-server
|
||||
# nodePackages.vscode-json-languageserver
|
||||
# tailwindcss-language-server
|
||||
];
|
||||
}
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
# networkmanager
|
||||
dnsutils
|
||||
# nmap
|
||||
# ipcalc
|
||||
nmap
|
||||
ipcalc
|
||||
# iperf3
|
||||
# networkmanagerapplet
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ with lib;
|
|||
enable = true;
|
||||
settings = {
|
||||
flavour = config.nixvim.theme;
|
||||
integrations = {
|
||||
telescope = true;
|
||||
treesitter = true;
|
||||
cmp = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -181,7 +186,6 @@ with lib;
|
|||
|
||||
lualine = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
options.theme = "catppuccin";
|
||||
tabline = {
|
||||
|
|
@ -190,15 +194,11 @@ with lib;
|
|||
"branch"
|
||||
"diagnostics"
|
||||
];
|
||||
lualine_y = [ "buffers" ];
|
||||
};
|
||||
inactive_sections = {
|
||||
lualine_a = [];
|
||||
lualine_b = [];
|
||||
lualine_c = [ ];
|
||||
lualine_x = [ ];
|
||||
lualine_y = [];
|
||||
lualine_y = [ "buffers" ];
|
||||
lualine_z = [ ];
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -289,16 +289,16 @@ with lib;
|
|||
};
|
||||
};
|
||||
enableMan = false;
|
||||
# autoCmd = [
|
||||
# {
|
||||
# event = [
|
||||
# "BufRead"
|
||||
# "BufNewFile"
|
||||
# ];
|
||||
# pattern = "*.{md,typ}";
|
||||
# callback = "vim.opt_local.spell = true";
|
||||
# }
|
||||
# ];
|
||||
autoCmd = [
|
||||
{
|
||||
event = [
|
||||
"BufRead"
|
||||
"BufNewFile"
|
||||
];
|
||||
pattern = "*.{md,typ}";
|
||||
command = "setlocal spell spelllang=en";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/fw/nix";
|
||||
};
|
||||
nix = {
|
||||
registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
|
||||
(lib.filterAttrs (_: lib.isType "flake")) inputs
|
||||
|
|
@ -23,6 +29,10 @@
|
|||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [
|
||||
"root"
|
||||
"fw"
|
||||
];
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.bash;
|
||||
|
|
@ -1,26 +1,14 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
myhostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/fw/nix";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bluez
|
||||
bluez-tools
|
||||
|
||||
poppler-utils
|
||||
|
||||
alsa-utils
|
||||
|
||||
sops
|
||||
|
|
@ -31,16 +19,9 @@
|
|||
htop
|
||||
procps
|
||||
grc
|
||||
vim
|
||||
fastfetch
|
||||
bc
|
||||
|
||||
# sysstat
|
||||
# lm_sensors
|
||||
# ethtool
|
||||
# pciutils
|
||||
# usbutils
|
||||
|
||||
fzf
|
||||
eza
|
||||
rsync
|
||||
|
|
@ -54,34 +35,5 @@
|
|||
lazygit
|
||||
hyprpicker
|
||||
typst
|
||||
typstyle
|
||||
tinymist
|
||||
# (
|
||||
# let
|
||||
# base = pkgs.appimageTools.defaultFhsEnvArgs;
|
||||
# in
|
||||
# pkgs.buildFHSEnv (
|
||||
# base
|
||||
# // {
|
||||
# name = "fhs";
|
||||
# targetPkgs =
|
||||
# pkgs:
|
||||
# # pkgs.buildFHSUserEnv provides only a minimal FHS environment,
|
||||
# # lacking many basic packages needed by most software.
|
||||
# # Therefore, we need to add them manually.
|
||||
# #
|
||||
# # pkgs.appimageTools provides basic packages required by most software.
|
||||
# (base.targetPkgs pkgs)
|
||||
# ++ (with pkgs; [
|
||||
# pkg-config
|
||||
# ncurses
|
||||
# # Feel free to add more packages here if needed.
|
||||
# ]);
|
||||
# profile = "export FHS=1";
|
||||
# runScript = "bash";
|
||||
# extraOutputsToInstall = [ "dev" ];
|
||||
# }
|
||||
# )
|
||||
# )
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue