refactor: Formatting

This commit is contained in:
2025-02-07 22:13:20 +01:00
parent c3f4470f80
commit dc2abe6ff1
36 changed files with 349 additions and 198 deletions
+18 -8
View File
@@ -1,7 +1,6 @@
{ {
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
nix.url = "github:NixOS/nix"; nix.url = "github:NixOS/nix";
nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs.url = "nixpkgs/nixos-24.11";
@@ -14,22 +13,33 @@
}; };
# hyprland.url = "github:hyprwm/Hyprland"; # hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = inputs@{ self, flake-parts, ... }: outputs =
inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ imports = [
./machines/configuration.nix ./machines/configuration.nix
]; ];
perSystem = { self', inputs', config, pkgs, system, ... }: { perSystem =
# make pkgs available to all `perSystem` functions {
_module.args.pkgs = import inputs.nixpkgs { self',
inherit system; inputs',
config,
pkgs,
system,
...
}:
{
# make pkgs available to all `perSystem` functions
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
};
}; };
};
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
}; };
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
} }
+14 -12
View File
@@ -1,7 +1,6 @@
{ self, ... }: { self, ... }:
let let
inherit inherit (self.inputs)
(self.inputs)
nixpkgs nixpkgs
nixpkgs-unstable nixpkgs-unstable
nixos-hardware nixos-hardware
@@ -24,16 +23,19 @@ let
} }
{ {
imports = [ imports = [
({ pkgs, ... }: { (
nixpkgs.overlays = [ { pkgs, ... }:
overlay-unstable {
(import ../pkgs) nixpkgs.overlays = [
]; overlay-unstable
nix.nixPath = [ (import ../pkgs)
"nixpkgs=${pkgs.path}" ];
]; nix.nixPath = [
documentation.info.enable = false; "nixpkgs=${pkgs.path}"
}) ];
documentation.info.enable = false;
}
)
#hyprland.nixosModules.default #hyprland.nixosModules.default
]; ];
} }
+22 -19
View File
@@ -5,10 +5,10 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ # Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@@ -85,22 +85,25 @@
users.users.finn = { users.users.finn = {
isNormalUser = true; isNormalUser = true;
description = "Finn Markwitz"; description = "Finn Markwitz";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
jetbrains.webstorm jetbrains.webstorm
jetbrains.goland jetbrains.goland
jetbrains.pycharm-professional jetbrains.pycharm-professional
jetbrains.idea-ultimate jetbrains.idea-ultimate
thunderbird thunderbird
google-chrome google-chrome
discord discord
spotify spotify
keepassxc keepassxc
nextcloud-client nextcloud-client
zsh zsh
oh-my-zsh oh-my-zsh
neovim neovim
]; ];
}; };
+7 -1
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
# Packages # Packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -40,6 +45,7 @@
networkmanager networkmanager
lm_sensors lm_sensors
systemctl-tui systemctl-tui
nixfmt-rfc-style
]; ];
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
+7 -2
View File
@@ -1,3 +1,8 @@
# Generate via nix-generate # Generate via nix-generate
{ config, lib, pkgs, ... }: {
{} config,
lib,
pkgs,
...
}:
{ }
+6 -1
View File
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
networking.networkmanager = { networking.networkmanager = {
+7 -1
View File
@@ -1,4 +1,10 @@
{ config, lib, pkgs, inputs, ... }: {
config,
lib,
pkgs,
inputs,
...
}:
{ {
nix = { nix = {
daemonCPUSchedPolicy = "idle"; daemonCPUSchedPolicy = "idle";
+6 -1
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
users.users.finn = { users.users.finn = {
+13 -8
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
imports = [ imports = [
@@ -15,13 +20,13 @@
# Shitfuck SOnar Dotnet dependency # Shitfuck SOnar Dotnet dependency
nixpkgs.config = { nixpkgs.config = {
permittedInsecurePackages = [ permittedInsecurePackages = [
"aspnetcore-runtime-6.0.36" "aspnetcore-runtime-6.0.36"
"aspnetcore-runtime-wrapped-6.0.36" "aspnetcore-runtime-wrapped-6.0.36"
"dotnet-sdk-6.0.428" "dotnet-sdk-6.0.428"
"dotnet-sdk-wrapped-6.0.428" "dotnet-sdk-wrapped-6.0.428"
]; ];
}; };
services.openssh.enable = true; services.openssh.enable = true;
+22 -14
View File
@@ -1,22 +1,30 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
#TODO: CHECK THIS OUT: https://github.com/nix-community/disko its kinda better but felix does not support it #TODO: CHECK THIS OUT: https://github.com/nix-community/disko its kinda better but felix does not support it
{ {
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/c95c64ad-f131-4bde-9bca-a7a3692173da"; device = "/dev/disk/by-uuid/c95c64ad-f131-4bde-9bca-a7a3692173da";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/0D77-17BB"; device = "/dev/disk/by-uuid/0D77-17BB";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/data/nfs" = fileSystems."/data/nfs" = {
{ device = "voyager:/"; device = "voyager:/";
fsType = "nfs"; fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ]; options = [
}; "x-systemd.automount"
"noauto"
];
};
} }
+25 -15
View File
@@ -1,14 +1,25 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@@ -16,7 +27,7 @@
# 9a49 # 9a49
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
}; };
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
@@ -33,16 +44,15 @@
enableGraphical = true; enableGraphical = true;
}; };
fileSystems."/" = {
device = "/dev/disk/by-uuid/c95c64ad-f131-4bde-9bca-a7a3692173da";
fsType = "ext4";
};
fileSystems."/" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/c95c64ad-f131-4bde-9bca-a7a3692173da"; device = "/dev/disk/by-uuid/0D77-17BB";
fsType = "ext4"; fsType = "vfat";
}; };
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0D77-17BB";
fsType = "vfat";
};
swapDevices = [ ]; swapDevices = [ ];
+6 -2
View File
@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
imports = [ imports = [
@@ -50,7 +55,6 @@
#media-session.enable = true; #media-session.enable = true;
}; };
system = { system = {
stateVersion = "23.05"; stateVersion = "23.05";
autoUpgrade.enable = true; autoUpgrade.enable = true;
+10 -5
View File
@@ -1,10 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
#TODO: CHECK THIS OUT: https://github.com/nix-community/disko its kinda better but felix does not support it #TODO: CHECK THIS OUT: https://github.com/nix-community/disko its kinda better but felix does not support it
{ {
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/077abdb0-cbc1-4589-b411-25ecc157488f"; device = "/dev/disk/by-uuid/077abdb0-cbc1-4589-b411-25ecc157488f";
fsType = "ext4"; fsType = "ext4";
}; };
} }
+19 -9
View File
@@ -1,22 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/077abdb0-cbc1-4589-b411-25ecc157488f"; device = "/dev/disk/by-uuid/077abdb0-cbc1-4589-b411-25ecc157488f";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [ ];
+17 -14
View File
@@ -1,10 +1,13 @@
{
{ config, lib, pkgs, ... }: config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.apps; cfg = config.my.profiles.apps;
in { in
{
options.my.profiles.apps = with lib; { options.my.profiles.apps = with lib; {
desktop_apps = mkEnableOption "Basic Apps"; desktop_apps = mkEnableOption "Basic Apps";
@@ -16,17 +19,17 @@ let
users.users.finn.packages = with pkgs; [ users.users.finn.packages = with pkgs; [
firefox firefox
thunderbird thunderbird
google-chrome google-chrome
vscode vscode
discord discord
spotify spotify
keepassxc keepassxc
moonlight-qt moonlight-qt
nextcloud-client nextcloud-client
pipewire pipewire
wireplumber wireplumber
vlc vlc
ghostty ghostty
]; ];
}; };
} }
+10 -3
View File
@@ -1,6 +1,13 @@
{ config, lib, pkgs, ... }: {
let cfg = config.my.profiles.development; config,
in { lib,
pkgs,
...
}:
let
cfg = config.my.profiles.development;
in
{
options.my.profiles.development = with lib; { options.my.profiles.development = with lib; {
enable = mkEnableOption "Development Tools"; enable = mkEnableOption "Development Tools";
+8 -1
View File
@@ -1,5 +1,12 @@
# Docker related settings # Docker related settings
{ config, inputs, lib, options, pkgs, ... }: {
config,
inputs,
lib,
options,
pkgs,
...
}:
let let
cfg = config.my.profiles.docker; cfg = config.my.profiles.docker;
in in
+15 -10
View File
@@ -1,7 +1,13 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.hyprland; cfg = config.my.profiles.hyprland;
in { in
{
options.my.profiles.hyprland = with lib; { options.my.profiles.hyprland = with lib; {
enable = mkEnableOption "hyprland env"; enable = mkEnableOption "hyprland env";
}; };
@@ -12,12 +18,11 @@ let
xwayland.enable = true; xwayland.enable = true;
}; };
services.displayManager.sddm.wayland.enable = true; services.displayManager.sddm.wayland.enable = true;
services.xserver = { services.xserver = {
layout = "de"; layout = "de";
xkbVariant = ""; xkbVariant = "";
}; };
users.users.finn.packages = with pkgs; [ users.users.finn.packages = with pkgs; [
wofi wofi
mako mako
@@ -30,11 +35,11 @@ let
#xdg-desktop-portal-hyprland #xdg-desktop-portal-hyprland
]; ];
hardware = { hardware = {
# Opengl # Opengl
opengl.enable = true; opengl.enable = true;
# Most wayland compositors need this # Most wayland compositors need this
nvidia.modesetting.enable = true; nvidia.modesetting.enable = true;
}; };
}; };
+6 -2
View File
@@ -1,5 +1,10 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.jellyfin; cfg = config.my.profiles.jellyfin;
in in
@@ -15,7 +20,6 @@ in
openFirewall = true; openFirewall = true;
}; };
systemd.services.jellyfin = { systemd.services.jellyfin = {
after = [ "network-online.target" ]; after = [ "network-online.target" ];
}; };
@@ -1,4 +1,3 @@
# manages and downloads films # manages and downloads films
{ config, lib, ... }: { config, lib, ... }:
let let
+9 -4
View File
@@ -1,5 +1,10 @@
# KDE Desktio Environment # KDE Desktio Environment
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.kde-desktop; cfg = config.my.profiles.kde-desktop;
in in
@@ -10,9 +15,9 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.sddm.enable = true; displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
}; };
users.users.finn.packages = with pkgs; [ users.users.finn.packages = with pkgs; [
# Programms can be added here... # Programms can be added here...
+12 -10
View File
@@ -8,18 +8,20 @@ in
enable = mkEnableOption "Paperless Server"; enable = mkEnableOption "Paperless Server";
port = mkOption { port = mkOption {
type = types.port; type = types.port;
default = 28981; default = 28981;
example = 8080; example = 8080;
description = "Internal port for webui"; description = "Internal port for webui";
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.attrs; type = types.attrs;
default = {}; default = { };
example = { PAPERLESS_OCR_LANGUAGE = "deu+eng"; }; example = {
description = "Extra configuration options"; PAPERLESS_OCR_LANGUAGE = "deu+eng";
}; };
description = "Extra configuration options";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
+8 -3
View File
@@ -1,10 +1,15 @@
# manages indexes # manages indexes
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.prowlarr; cfg = config.my.profiles.prowlarr;
# domain = config.networking.domain;
# port = 9696;
in in
# domain = config.networking.domain;
# port = 9696;
{ {
options.my.profiles.prowlarr = with lib; { options.my.profiles.prowlarr = with lib; {
enable = mkEnableOption "Prowlarr for indexing"; enable = mkEnableOption "Prowlarr for indexing";
+8 -3
View File
@@ -1,10 +1,15 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.radarr; cfg = config.my.profiles.radarr;
# domain = config.networking.domain;
# port = 7878;
in in
# domain = config.networking.domain;
# port = 7878;
{ {
options.my.profiles.radarr = with lib; { options.my.profiles.radarr = with lib; {
enable = mkEnableOption "Sonarr for films management"; enable = mkEnableOption "Sonarr for films management";
+8 -3
View File
@@ -1,10 +1,15 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.readarr; cfg = config.my.profiles.readarr;
# domain = config.networking.domain;
# port = 7878;
in in
# domain = config.networking.domain;
# port = 7878;
{ {
options.my.profiles.readarr = with lib; { options.my.profiles.readarr = with lib; {
enable = mkEnableOption "Readarr for ebook management"; enable = mkEnableOption "Readarr for ebook management";
+7 -2
View File
@@ -1,9 +1,14 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.sonarr; cfg = config.my.profiles.sonarr;
# domain = config.networking.domain; # domain = config.networking.domain;
port = 8989; port = 8989;
in in
{ {
options.my.profiles.sonarr = with lib; { options.my.profiles.sonarr = with lib; {
+13 -10
View File
@@ -1,9 +1,13 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.profiles.zsh; cfg = config.my.profiles.zsh;
in { in
{
options.my.profiles.zsh = with lib; { options.my.profiles.zsh = with lib; {
enable = mkEnableOption "zsh env"; enable = mkEnableOption "zsh env";
@@ -12,13 +16,12 @@ let
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
programs.zsh = { programs.zsh = {
enable = true;
ohMyZsh = {
enable = true; enable = true;
ohMyZsh = { theme = "agnoster";
enable = true; };
theme = "agnoster";
};
}; };
}; };
} }
+6 -1
View File
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.hardware.bluetooth; cfg = config.my.hardware.bluetooth;
in in
+6 -3
View File
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.hardware.bluetooth; cfg = config.my.hardware.bluetooth;
in in
@@ -7,8 +12,6 @@ in
enable = mkEnableOption "Sound configuration"; enable = mkEnableOption "Sound configuration";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
hardware.pulseaudio.support32Bit = true; hardware.pulseaudio.support32Bit = true;
+6 -1
View File
@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.my.hardware.wifi; cfg = config.my.hardware.wifi;
in in
+1 -2
View File
@@ -1,4 +1,3 @@
final: prev: final: prev: {
{
# homer = final.callPackage ./homer { }; # homer = final.callPackage ./homer { };
} }