Initial commit (after fork)
This commit is contained in:
parent
5ebba8a939
commit
5fe3f69a17
111 changed files with 1428 additions and 1611 deletions
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
{pkgs, ...}: {
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
grub = {
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,24 @@
|
|||
{ inputs, nixpkgs, self, username, host, ...}:
|
||||
{
|
||||
inputs,
|
||||
nixpkgs,
|
||||
self,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[ (import ./bootloader.nix) ]
|
||||
++ [ (import ./hardware.nix) ]
|
||||
++ [ (import ./xserver.nix) ]
|
||||
++ [ (import ./network.nix) ]
|
||||
++ [ (import ./pipewire.nix) ]
|
||||
++ [ (import ./program.nix) ]
|
||||
++ [ (import ./security.nix) ]
|
||||
++ [ (import ./services.nix) ]
|
||||
++ [ (import ./system.nix) ]
|
||||
++ [ (import ./user.nix) ]
|
||||
++ [ (import ./wayland.nix) ]
|
||||
++ [ (import ./virtualization.nix) ];
|
||||
[(import ./bootloader.nix)]
|
||||
++ [(import ./hardware.nix)]
|
||||
++ [(import ./xserver.nix)]
|
||||
++ [(import ./network.nix)]
|
||||
++ [(import ./pipewire.nix)]
|
||||
++ [(import ./programs.nix)]
|
||||
++ [(import ./security.nix)]
|
||||
++ [(import ./services.nix)]
|
||||
++ [(import ./gaming.nix)]
|
||||
++ [(import ./system.nix)]
|
||||
++ [(import ./user.nix)]
|
||||
++ [(import ./wayland.nix)]
|
||||
++ [(import ./variables.nix)]
|
||||
++ [(import ./virtualisation.nix)];
|
||||
}
|
||||
|
|
14
modules/core/gaming.nix
Normal file
14
modules/core/gaming.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = false;
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
services.joycond.enable = true;
|
||||
}
|
|
@ -1,12 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
hardware.flipperzero.enable = true; # Installs and setups everything Flipper Zero
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
networking = {
|
||||
hostName = "nixos";
|
||||
networkmanager.enable = true;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
nameservers = ["1.1.1.1"];
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 80 443 59010 59011 ];
|
||||
allowedUDPPorts = [ 59010 59011 ];
|
||||
allowedTCPPorts = [22 80 443 59010 59011];
|
||||
allowedUDPPorts = [59010 59011];
|
||||
# allowedUDPPortRanges = [
|
||||
# { from = 4000; to = 4007; }
|
||||
# { from = 8000; to = 8010; }
|
||||
# { from = 4000; to = 4007; }
|
||||
# { from = 8000; to = 8010; }
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.dconf.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
|
@ -9,4 +12,5 @@
|
|||
};
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [];
|
||||
programs.adb.enable = true;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
security.rtkit.enable = true;
|
||||
security.sudo.enable = true;
|
||||
security.sudo.package = pkgs.sudo.override {withInsults = true;}; # I'm spanish and I love cursing
|
||||
# security.pam.services.swaylock = { };
|
||||
security.pam.services.hyprlock = {};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
dbus.enable = true;
|
||||
fstrim.enable = true;
|
||||
flatpak.enable = true;
|
||||
printing.enable = true;
|
||||
blueman.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
services.logind.extraConfig = ''
|
||||
# don’t shutdown when power button is short-pressed
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
{ self, pkgs, lib, inputs, ...}:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# imports = [ inputs.nix-gaming.nixosModules.default ];
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://nix-gaming.cachix.org" ];
|
||||
trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
@ -16,7 +21,6 @@
|
|||
};
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
self.overlays.default
|
||||
inputs.nur.overlay
|
||||
];
|
||||
};
|
||||
|
@ -24,9 +28,17 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
git
|
||||
ddcutil
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Paris";
|
||||
# For ddcutil brightness control
|
||||
boot.kernelModules = ["i2c-dev"];
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
|
||||
'';
|
||||
|
||||
time.timeZone = "Europe/Madrid";
|
||||
console.keyMap = "es";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "24.05";
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
{ pkgs, inputs, username, host, ...}:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
pkgs,
|
||||
inputs,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = { inherit inputs username host; };
|
||||
extraSpecialArgs = {inherit inputs username host;};
|
||||
users.${username} = {
|
||||
imports =
|
||||
if (host == "desktop") then
|
||||
[ ./../home/default.desktop.nix ]
|
||||
else [ ./../home ];
|
||||
imports = [./../home];
|
||||
home.username = "${username}";
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "24.05";
|
||||
|
@ -20,8 +22,8 @@
|
|||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "${username}";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = ["networkmanager" "wheel" "i2c" "libvirtd" "adbusers"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
nix.settings.allowed-users = [ "${username}" ];
|
||||
nix.settings.allowed-users = ["${username}"];
|
||||
}
|
||||
|
|
4
modules/core/variables.nix
Normal file
4
modules/core/variables.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{...}: {
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es";
|
||||
}
|
47
modules/core/virtualisation.nix
Normal file
47
modules/core/virtualisation.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
# Add user to libvirtd group
|
||||
users.users.${username}.extraGroups = ["libvirtd"];
|
||||
|
||||
# Install necessary packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
adwaita-icon-theme
|
||||
];
|
||||
|
||||
# Manage the virtualisation services
|
||||
virtualisation = {
|
||||
waydroid.enable = true;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ config, pkgs, username, ... }:
|
||||
{
|
||||
# Add user to libvirtd group
|
||||
users.users.${username}.extraGroups = [ "libvirtd" ];
|
||||
|
||||
# Install necessary packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
gnome.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;
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
@ -14,4 +17,12 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
# xwaylandvideobridge
|
||||
];
|
||||
|
||||
# Display manager
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background.path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ pkgs, username, ... }:
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us,fr";
|
||||
xkb.layout = "es,us";
|
||||
};
|
||||
|
||||
displayManager.autoLogin = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue