initial commit, pc config
This commit is contained in:
commit
139aac8fef
6 changed files with 394 additions and 0 deletions
74
nixos/configuration.nix
Normal file
74
nixos/configuration.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./programs.nix
|
||||
];
|
||||
|
||||
users.users.daniel = {
|
||||
isNormalUser = true;
|
||||
description = "Daniel";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shellAliases = {
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/Documents/Nix/pc-config/nixos#daniel";
|
||||
rebuild-test = "sudo nixos-rebuild test --flake ~/Documents/Nix/pc-config/nixos#daniel";
|
||||
rebuild-dry = "nixos-rebuild dry-run --flake ~/Documents/Nix/pc-config/nixos#daniel";
|
||||
|
||||
to-public = "ssh -r danielk.me:/var/www/danielk.me/public";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "laptop";
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
time.timeZone = "Europe/Madrid";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
console.keyMap = "es";
|
||||
|
||||
services.xserver.enable = false;
|
||||
services.xserver.xkb.layout = "es";
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.displayManager.gdm.wayland = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
services.libinput.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
27
nixos/flake.lock
generated
Normal file
27
nixos/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1770136044,
|
||||
"narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
19
nixos/flake.nix
Normal file
19
nixos/flake.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
description = "Personal computer NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations.daniel = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
33
nixos/hardware-configuration.nix
Normal file
33
nixos/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7d432fe3-7b18-47ed-bffa-28355e34c131";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/60E7-33F0";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/785d9e21-9079-4c21-88f4-c114f7593703"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
39
nixos/programs.nix
Normal file
39
nixos/programs.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.daniel.packages = with pkgs; [
|
||||
ghostty
|
||||
vlc
|
||||
localsend
|
||||
krita
|
||||
aseprite
|
||||
godot
|
||||
godotPackages.export-template
|
||||
audacity
|
||||
steam
|
||||
libreoffice
|
||||
signal-desktop
|
||||
python313
|
||||
nodejs_24
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
ffmpeg-full
|
||||
libva-utils
|
||||
vdpauinfo
|
||||
];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue