properly reformat all files

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

View File

@ -1,30 +1,35 @@
{ config, pkgs, ... }:
{
# DO NOT change this unless you know what you're doing!
system.stateVersion = "24.11";
# DO NOT change this unless you know what you're doing!
system.stateVersion = "24.11";
# Enable cache
nix.settings = {
substituters = ["https://cache.nixos.org" "https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
# Enable cache
nix.settings = {
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) [
"olm"
];
};
nixpkgs.config = {
allowInsecurePredicate =
pkg:
builtins.elem (pkgs.lib.getName pkg) [
"olm"
];
};
environment.systemPackages = with pkgs; [
alacritty
vim
unzip
networkmanager
];
environment.systemPackages = with pkgs; [
alacritty
vim
unzip
networkmanager
];
services.automatic-timezoned.enable = true;
services.automatic-timezoned.enable = true;
boot.loader.grub.enable = false;
boot.loader.systemd-boot.enable = true;
boot.loader.grub.enable = false;
boot.loader.systemd-boot.enable = true;
}

View File

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

View File

@ -1,25 +1,28 @@
{
imports = [
./hardware-configuration.nix
./modules.nix
./users.nix
./networking.nix
];
imports = [
./hardware-configuration.nix
./modules.nix
./users.nix
./networking.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nixpkgs.config.allowUnfree = true;
swapDevices = [
{
device = "/swap";
size = 8192;
}
];
nixpkgs.config.allowUnfree = true;
swapDevices = [
{
device = "/swap";
size = 8192;
}
];
}

View File

@ -1,28 +1,42 @@
# 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";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/9c4c982e-0ea2-46c7-b7d6-e5a94f8562d3";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A399-E37C";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A399-E37C";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View File

@ -1,59 +1,59 @@
{ pkgs, inputs, ... }:
{ pkgs, inputs, ... }:
{
imports = [
# Utilities
../../modules/nixos/nvidia-support.nix
../../modules/nixos/fingerprint.nix
../../modules/nixos/apple-style.nix
../../modules/nixos/bluetooth.nix
../../modules/nixos/greetd.nix
../../modules/nixos/audio.nix
imports = [
# Utilities
../../modules/nixos/nvidia-support.nix
../../modules/nixos/fingerprint.nix
../../modules/nixos/apple-style.nix
../../modules/nixos/bluetooth.nix
../../modules/nixos/greetd.nix
../../modules/nixos/audio.nix
# Apps/services
../../modules/nixos/nordvpn.nix
# Apps/services
../../modules/nixos/nordvpn.nix
];
modules.apple-style.enable = true;
modules.bluetooth.enable = true;
modules.nvidia.enable = true;
modules.nordvpn.enable = true;
modules.audio.enable = true;
modules.fingerprint-fix = {
enable = true;
calibDataFile = ./calib-data.bin;
};
services = {
tlp.enable = false;
gvfs.enable = true;
upower.enable = true;
power-profiles-daemon.enable = true;
xserver.displayManager = {
gdm.enable = true;
startx.enable = true;
};
printing = {
enable = true;
drivers = with pkgs; [ hplipWithPlugin ];
};
udev.extraRules = ''
SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
'';
};
programs = {
adb.enable = true;
thunar.enable = true;
hyprland.enable = true;
thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
modules.apple-style.enable = true;
modules.bluetooth.enable = true;
modules.nvidia.enable = true;
modules.nordvpn.enable = true;
modules.audio.enable = true;
modules.fingerprint-fix = {
enable = true;
calibDataFile = ./calib-data.bin;
};
services = {
tlp.enable = false;
gvfs.enable = true;
upower.enable = true;
power-profiles-daemon.enable = true;
xserver.displayManager = {
gdm.enable = true;
startx.enable = true;
};
printing = {
enable = true;
drivers = with pkgs; [ hplipWithPlugin ];
};
udev.extraRules = ''
SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
'';
};
programs = {
adb.enable = true;
thunar.enable = true;
hyprland.enable = true;
thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
light.enable = true;
};
light.enable = true;
};
}

View File

@ -1,12 +1,13 @@
{ pkgs, ... }:
let
networkManagerEnabled = true;
wirelessEnabled = false;
in {
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
networking.networkmanager.wifi.powersave = pkgs.lib.mkIf networkManagerEnabled true;
networkManagerEnabled = true;
wirelessEnabled = false;
in
{
networking.networkmanager.enable = pkgs.lib.mkIf networkManagerEnabled true;
networking.networkmanager.wifi.powersave = pkgs.lib.mkIf networkManagerEnabled true;
networking.wireless.enable = pkgs.lib.mkIf wirelessEnabled true;
networking.wireless.userControlled.enable = pkgs.lib.mkIf wirelessEnabled true;
networking.wireless.enable = pkgs.lib.mkIf wirelessEnabled true;
networking.wireless.userControlled.enable = pkgs.lib.mkIf wirelessEnabled true;
}

View File

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