properly reformat all files

This commit is contained in:
Franek 2025-04-14 10:37:58 +02:00
parent d670e245e4
commit 725588ec9b
26 changed files with 920 additions and 776 deletions

View File

@ -17,18 +17,23 @@
hyprspace.url = "github:KZDKM/Hyprspace";
};
outputs = { self, nixpkgs, ... }: let
outputs =
{ self, nixpkgs, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
];
in {
in
{
nixosConfigurations = import ./hosts { inherit self; };
devShells = forAllSystems ( system:
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
in
{
ddt4all = import ./shells/ddt4all.nix { inherit pkgs; };
}
);

View File

@ -6,12 +6,17 @@
# Enable cache
nix.settings = {
substituters = ["https://cache.nixos.org" "https://hyprland.cachix.org"];
substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
nixpkgs.config = {
allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
allowInsecurePredicate =
pkg:
builtins.elem (pkgs.lib.getName pkg) [
"olm"
];
};

View File

@ -4,24 +4,33 @@ let
inherit (self) inputs;
homeDir = self + /profiles;
mkSystem = {
mkSystem =
{
system,
hostname,
useHomeManager ? true,
modules ? []
}: inputs.nixpkgs.lib.nixosSystem {
modules ? [ ],
}:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
modules =
[
./base-configuration.nix
./${hostname}
homeDir
] ++ (
if useHomeManager then [
]
++ (
if useHomeManager then
[
inputs.home-manager.nixosModules.home-manager
] else [ ]
) ++ modules;
]
else
[ ]
)
++ modules;
};
in {
in
{
hulk = mkSystem {
system = "x86_64-linux";
hostname = "hulk";

View File

@ -6,7 +6,10 @@
./networking.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;

View File

@ -1,27 +1,41 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
fileSystems."/" = {
device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A399-E37C";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A399-E37C";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View File

@ -3,7 +3,8 @@
let
networkManagerEnabled = true;
wirelessEnabled = false;
in {
in
{
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
networking.networkmanager.wifi.powersave = pkgs.lib.mkIf networkManagerEnabled true;

View File

@ -4,12 +4,19 @@ let
username = "sadorowo";
fullname = "Franek";
preferredShell = pkgs.fish;
in {
in
{
users.users.${username} = {
isNormalUser = true;
description = fullname;
home = "/home/${username}";
extraGroups = [ "wheel" "networkmanager" "plugdev" "adbusers" "nordvpn" ];
extraGroups = [
"wheel"
"networkmanager"
"plugdev"
"adbusers"
"nordvpn"
];
shell = preferredShell;
ignoreShellProgramCheck = true; # Will do it later in profile configuration
};

View File

@ -12,7 +12,10 @@ let
hash = "sha256-RJoI3G4Tr3272CZ/lI9HEfKXdwuwPzWlrOKm9taIjuU=";
};
buildInputs = with pkgs; [ libxml2 libidn2 ];
buildInputs = with pkgs; [
libxml2
libidn2
];
nativeBuildInputs = with pkgs; [
dpkg
autoPatchelfHook
@ -44,7 +47,8 @@ let
name = "nordvpnd";
runScript = "nordvpnd";
targetPkgs = pkgs: with pkgs; [
targetPkgs =
pkgs: with pkgs; [
nordVPNBase
sysctl
iptables
@ -64,7 +68,8 @@ let
cp -r ${nordVPNBase}/var/lib/nordvpn/* /var/lib/nordvpn;
fi
'';
in pkgs.stdenv.mkDerivation rec {
in
pkgs.stdenv.mkDerivation rec {
inherit pname version;
dontUnpack = true;

View File

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
{
options.modules.hyprland = {
@ -29,9 +34,16 @@
};
config = lib.mkIf config.modules.hyprland.enable {
home.packages = with pkgs; [
hyprlock hypridle wl-clipboard cliphist swww
] ++ config.modules.hyprland.additionalPackages;
home.packages =
with pkgs;
[
hyprlock
hypridle
wl-clipboard
cliphist
swww
]
++ config.modules.hyprland.additionalPackages;
wayland.windowManager.hyprland = {
enable = true;

View File

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
options.modules.darkman = {

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}:
{
options.modules.apple-style.enable = lib.mkEnableOption "Enable Apple fonts and emojis";
@ -14,8 +20,14 @@
fonts.fontconfig.enable = true;
fonts.enableDefaultPackages = false;
fonts.fontconfig.defaultFonts = {
sansSerif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
serif = [ "SFProText Nerd Font" "SFProDisplay Nerd Font" ];
sansSerif = [
"SFProText Nerd Font"
"SFProDisplay Nerd Font"
];
serif = [
"SFProText Nerd Font"
"SFProDisplay Nerd Font"
];
monospace = [ "SFMono Nerd Font" ];
emoji = [ "Apple Color Emoji" ];
};

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
options.modules.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth";

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}:
{
options.modules.fingerprint-fix = {
@ -14,9 +20,16 @@
config = lib.mkIf config.modules.fingerprint-fix.enable {
# Needed because we're getting TLS error with open-fprintd-resume
systemd.services.validity-restart = let
targets = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
in {
systemd.services.validity-restart =
let
targets = [
"suspend.target"
"hibernate.target"
"hybrid-sleep.target"
"suspend-then-hibernate.target"
];
in
{
description = "Restart.modules.to fix fingerprint integration";
wantedBy = targets;
after = targets;

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
options.modules.greetd = {

View File

@ -1,9 +1,15 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
options.modules.nordvpn.enable = lib.mkEnableOption "Whether to enable the NordVPN daemon";
config = lib.mkIf config.modules.nordvpn.enable (let
config = lib.mkIf config.modules.nordvpn.enable (
let
nordVPN = pkgs.callPackage ../derivations/nordvpn.nix { inherit pkgs lib; };
preScript = pkgs.writeShellScript "nordvpn-start" ''
mkdir -m 700 -p /var/lib/nordvpn;
@ -11,7 +17,8 @@
cp -r ${nordVPN}/var/lib/nordvpn/* /var/lib/nordvpn;
fi
'';
in {
in
{
networking.firewall.checkReversePath = false;
networking.firewall.allowedUDPPorts = [ 1194 ];
networking.firewall.allowedTCPPorts = [ 443 ];
@ -36,5 +43,6 @@
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
});
}
);
}

View File

@ -4,10 +4,14 @@
options.modules.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations.";
config = lib.mkIf config.modules.nvidia.enable {
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
boot.kernelModules = [
"nvidia"
"nvidia_modeset"
"nvidia_uvm"
"nvidia_drm"
];
boot.extraModprobeConfig = ''
options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
'';
};
}

View File

@ -1,4 +1,10 @@
{ self, impurity, inputs, ... }: {
{
self,
impurity,
inputs,
...
}:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View File

@ -3,7 +3,8 @@
let
username = "sadorowo";
homeDirectory = "/home/${username}";
in {
in
{
imports = [
./packages.nix
./programs.nix
@ -21,4 +22,3 @@ in {
programs.home-manager.enable = true;
home.stateVersion = "24.11";
}

View File

@ -2,11 +2,14 @@
{
home.packages = with pkgs; [
pywal pywalfox-native
pywal
pywalfox-native
(python3.withPackages (py: with py; [
(python3.withPackages (
py: with py; [
pywayland
]))
]
))
(birdtray.overrideAttrs (_: {
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ];
@ -20,7 +23,10 @@
youtube-music
libreoffice-qt6-fresh
gimp
vscodium git nodejs postgresql
vscodium
git
nodejs
postgresql
fprintd
cups
fish
@ -37,4 +43,3 @@
sshfs
];
}

View File

@ -53,10 +53,25 @@
programs.pywal.enable = true;
programs.ags = {
enable = true;
extraPackages = with inputs.ags.packages.${pkgs.system}; [
apps battery bluetooth greet hyprland mpris network notifd powerprofiles tray wireplumber
] ++ [
pkgs.dart-sass pkgs.fzf pkgs.icon-library
extraPackages =
with inputs.ags.packages.${pkgs.system};
[
apps
battery
bluetooth
greet
hyprland
mpris
network
notifd
powerprofiles
tray
wireplumber
]
++ [
pkgs.dart-sass
pkgs.fzf
pkgs.icon-library
];
};

View File

@ -1,14 +1,16 @@
{ pkgs, inputs, ... }:
let
nerdfonts = (pkgs.nerdfonts.override {
nerdfonts = (
pkgs.nerdfonts.override {
fonts = [
"CascadiaCode"
"JetBrainsMono"
"FiraCode"
"SpaceMono"
];
});
}
);
cursor-theme = "Bibata-Modern-Classic";
cursor-pkg = pkgs.bibata-cursors;

View File

@ -1,13 +1,15 @@
{ pkgs, ... }:
let
pythonWithPkgs = pkgs.python3.withPackages (ps: with ps; [
pythonWithPkgs = pkgs.python3.withPackages (
ps: with ps; [
ps.pyqt5
ps.pyqtwebengine
ps.pyusb
ps.crcmod
ps.pyserial
]);
]
);
src = pkgs.fetchFromGitHub {
owner = "cedricp";
@ -15,7 +17,8 @@ let
rev = "v3.0.4";
sha256 = "sha256-SswaqV2UabVjuNeMTd7K3Vxa77LZKCb/qkgidkaE0R8=";
};
in pkgs.mkShell {
in
pkgs.mkShell {
name = "ddt4all-env";
buildInputs = [