base: add existing config
This commit is contained in:
commit
0c2d3b2e78
34 changed files with 437 additions and 0 deletions
25
nixos/configuration.nix
Normal file
25
nixos/configuration.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware/hardware.nix
|
||||
./environments/plasma-wayland.nix
|
||||
./users/luxzi.nix
|
||||
./services/services.nix
|
||||
./programs/programs.nix
|
||||
./misc/misc.nix
|
||||
];
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
14
nixos/environments/plasma-wayland.nix
Normal file
14
nixos/environments/plasma-wayland.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs; [
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
];
|
||||
}
|
5
nixos/hardware/audio.nix
Normal file
5
nixos/hardware/audio.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
hardware.pulseaudio.enable = false;
|
||||
}
|
14
nixos/hardware/fstab.nix
Normal file
14
nixos/hardware/fstab.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6f9a4486-8f14-468f-aecb-5e0df8af2309";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4A4B-5B94";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
}
|
13
nixos/hardware/hardware.nix
Normal file
13
nixos/hardware/hardware.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./modules.nix
|
||||
./fstab.nix
|
||||
./audio.nix
|
||||
./network.nix
|
||||
./intel.nix
|
||||
./nvidia.nix
|
||||
];
|
||||
}
|
6
nixos/hardware/intel.nix
Normal file
6
nixos/hardware/intel.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
13
nixos/hardware/modules.nix
Normal file
13
nixos/hardware/modules.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
}
|
5
nixos/hardware/network.nix
Normal file
5
nixos/hardware/network.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
}
|
13
nixos/hardware/nvidia.nix
Normal file
13
nixos/hardware/nvidia.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
}
|
5
nixos/misc/locale.nix
Normal file
5
nixos/misc/locale.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
}
|
10
nixos/misc/misc.nix
Normal file
10
nixos/misc/misc.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./time.nix
|
||||
./locale.nix
|
||||
./nixconfig.nix
|
||||
];
|
||||
}
|
6
nixos/misc/nixconfig.nix
Normal file
6
nixos/misc/nixconfig.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
5
nixos/misc/time.nix
Normal file
5
nixos/misc/time.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "America/New_York";
|
||||
}
|
5
nixos/programs/dconf.nix
Normal file
5
nixos/programs/dconf.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.dconf.enable = true;
|
||||
}
|
8
nixos/programs/gpg.nix
Normal file
8
nixos/programs/gpg.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
}
|
8
nixos/programs/nix-ld.nix
Normal file
8
nixos/programs/nix-ld.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [];
|
||||
};
|
||||
}
|
29
nixos/programs/programs.nix
Normal file
29
nixos/programs/programs.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./nix-ld.nix
|
||||
./dconf.nix
|
||||
./gpg.nix
|
||||
./steam.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
git
|
||||
neovim
|
||||
fira-code-nerdfont
|
||||
cmake
|
||||
ninja
|
||||
libgcc
|
||||
gnumake
|
||||
topgrade
|
||||
unzip
|
||||
patchelf
|
||||
wl-clipboard
|
||||
jdk17
|
||||
jre8
|
||||
];
|
||||
}
|
5
nixos/programs/steam.nix
Normal file
5
nixos/programs/steam.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
}
|
9
nixos/services/boot.nix
Normal file
9
nixos/services/boot.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.systemd-boot.editor = false;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
5
nixos/services/cups.nix
Normal file
5
nixos/services/cups.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.printing.enable = true;
|
||||
}
|
7
nixos/services/firewall.nix
Normal file
7
nixos/services/firewall.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
networking.firewall.enable = false;
|
||||
networking.firewall.allowedTCPPorts = [];
|
||||
networking.firewall.allowedUDPPorts = [];
|
||||
}
|
5
nixos/services/libinput.nix
Normal file
5
nixos/services/libinput.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.libinput.enable = true;
|
||||
}
|
6
nixos/services/networkmanager.nix
Normal file
6
nixos/services/networkmanager.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
11
nixos/services/pipewire.nix
Normal file
11
nixos/services/pipewire.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
pulse.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
};
|
||||
}
|
13
nixos/services/services.nix
Normal file
13
nixos/services/services.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./boot.nix
|
||||
./pipewire.nix
|
||||
./cups.nix
|
||||
./firewall.nix
|
||||
./libinput.nix
|
||||
./networkmanager.nix
|
||||
];
|
||||
}
|
15
nixos/users/luxzi.nix
Normal file
15
nixos/users/luxzi.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ self, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.luxzi = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
packages = [
|
||||
self.inputs.home-manager.packages.${pkgs.system}.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
programs.zsh.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue