Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
Some checks failed
Update `flake.lock` / update_lockfile (push) Waiting to run
Flake check / check (push) Has been cancelled

This commit is contained in:
Pedro Rey Anca 2025-09-08 18:59:28 +02:00
parent ebd178b0a5
commit 7606f9e051
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
66 changed files with 9465 additions and 73 deletions

View file

@ -0,0 +1,12 @@
{...}: {
imports = [
./hardware.nix
./networking.nix
./nix.nix
./pipewire.nix
./programs.nix
./security.nix
./services.nix
./stylix.nix
];
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
hardware.flipperzero.enable = true; # Installs and setups everything Flipper Zero
hardware.bluetooth.enable = true;
hardware.sane.enable = true;
}

View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
networking = {
networkmanager.enable = true;
nameservers = ["1.1.1.1"];
firewall = {
enable = true;
### https://nixos.wiki/wiki/WireGuard#Setting_up_WireGuard_with_NetworkManager
checkReversePath = "loose";
};
};
environment.systemPackages = with pkgs; [
networkmanagerapplet
wireguard-tools
openconnect
networkmanager-openconnect
];
}

View file

@ -0,0 +1,11 @@
{lib, ...}: {
nix.settings = {
trusted-users = ["pedro"];
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
];
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# lowLatency.enable = true;
};
environment.systemPackages = with pkgs; [
pulseaudioFull
];
}

View file

@ -0,0 +1,6 @@
{...}: {
programs.nix-ld.enable = true;
programs.adb.enable = true;
programs.kdeconnect.enable = true;
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
security.rtkit.enable = true;
security.polkit.enable = true;
security.sudo = {
enable = true;
package = pkgs.sudo.override {withInsults = true;}; # I'm spanish and I love cursing
};
security.pam.services.hyprlock = {};
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
services = {
gvfs.enable = true;
gnome.gnome-keyring.enable = true;
dbus.enable = true;
flatpak.enable = true;
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
blueman.enable = true;
};
environment.systemPackages = [pkgs.libsecret];
}

View file

@ -0,0 +1,16 @@
{
inputs,
pkgs,
...
}: {
imports = [inputs.stylix.nixosModules.stylix];
stylix = {
enable = true;
homeManagerIntegration.autoImport = false; # Handled in each user's HM config
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
targets = {
console.enable = false;
grub.enable = false;
};
};
}

View file

@ -0,0 +1,11 @@
{...}: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
services.joycond.enable = true;
}

View file

@ -0,0 +1,44 @@
{
pkgs,
lib,
config,
...
}: {
imports = [./regreet.nix];
options = {
programs.hyprland.autoLogin.username = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "john";
description = "User for Hyprland auto login with ReGreet. Disabled by default";
};
};
config = {
programs.hyprland = {
enable = true;
withUWSM = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
services.greetd.settings.initial_session = let
username = config.programs.hyprland.autoLogin.username;
in
lib.mkIf (!isNull username) {
command = "uwsm start hyprland-uwsm.desktop";
user = username;
};
environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es";
};
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
programs.regreet = {
enable = true;
settings = {
background = {
path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
fit = "Cover";
};
};
cageArgs = ["-s" "-m" "last"]; # Only show on the last monitor
};
}

View file

@ -1,15 +0,0 @@
{ ... }:
{
# Can be imported into machines to enable GNOME and GDM.
#
# Copy this into a machine's configuration:
# `machines/<name>/configuration.nix`
# ```nix
# imports = [
# ../../modules/gnome.nix
# ];
# ```
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
}

13
modules/podman.nix Normal file
View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
podman-compose
];
virtualisation.podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
}

View file

@ -0,0 +1,28 @@
{pkgs, ...}: {
# Install necessary packages
environment.systemPackages = with pkgs; [
virt-manager
virt-viewer
spice
spice-gtk
spice-protocol
win-virtio
win-spice
adwaita-icon-theme
];
# Manage the virtualisation services
virtualisation = {
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [pkgs.OVMFFull.fd];
};
};
spiceUSBRedirection.enable = true;
};
services.spice-vdagentd.enable = true;
}