Split configuration into smaller files
This commit is contained in:
parent
e258674fec
commit
372874ff1c
10 changed files with 212 additions and 209 deletions
58
desktop.nix
Normal file
58
desktop.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# This makes Spyro Reignighted Trilogy not crash
|
||||
networking.extraHosts =
|
||||
''
|
||||
0.0.0.0 datarouter.ol.epicgames.com
|
||||
0.0.0.0 datarouter-weighted.ol.epicgames.com
|
||||
'';
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.utf8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the Pantheon Desktop Environment.
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.avahi.enable = true;
|
||||
services.avahi.openFirewall = true;
|
||||
# services.ipp-usb.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
}
|
|
@ -8,7 +8,11 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = attrs;
|
||||
modules = [
|
||||
./graystripe.nix
|
||||
./desktop.nix
|
||||
./fonts.nix
|
||||
./graystripe
|
||||
./packages.nix
|
||||
./user.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
16
fonts.nix
Normal file
16
fonts.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
|
||||
fonts = with pkgs; [
|
||||
fantasque-sans-mono
|
||||
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
];
|
||||
|
||||
fontconfig.defaultFonts.monospace = [ "Fantasque Sans Mono" "Roboto Mono" ];
|
||||
|
||||
fontDir.enable = true;
|
||||
};
|
||||
}
|
208
graystripe.nix
208
graystripe.nix
|
@ -1,208 +0,0 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./egpu.nix
|
||||
./wireguard.nix
|
||||
];
|
||||
|
||||
# Nix cache
|
||||
# nix.extraOptions = ''
|
||||
# secret-key-files = /etc/nix/cache-priv-key.pem
|
||||
# '';
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
# Setup keyfile
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
# Enable swap on luks
|
||||
boot.initrd.luks.devices."luks-8b65fe7f-2115-422f-9443-7c6265d4d8ea".device = "/dev/disk/by-uuid/8b65fe7f-2115-422f-9443-7c6265d4d8ea";
|
||||
boot.initrd.luks.devices."luks-8b65fe7f-2115-422f-9443-7c6265d4d8ea".keyFile = "/crypto_keyfile.bin";
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
"/home".options = [ "compress=zstd" ];
|
||||
"/nix".options = [ "compress=zstd" ];
|
||||
"/root".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
networking.hostName = "graystripe"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# This makes Spyro Reignighted Trilogy not crash
|
||||
networking.extraHosts =
|
||||
''
|
||||
0.0.0.0 datarouter.ol.epicgames.com
|
||||
0.0.0.0 datarouter-weighted.ol.epicgames.com
|
||||
'';
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.utf8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the Pantheon Desktop Environment.
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.avahi.enable = true;
|
||||
services.avahi.openFirewall = true;
|
||||
# services.ipp-usb.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
# Define a user account. Don't forget to set a password with `passwd`.
|
||||
users.users.asonix = {
|
||||
isNormalUser = true;
|
||||
description = "Aode";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
git
|
||||
vim
|
||||
zsh
|
||||
|
||||
protonup
|
||||
protontricks
|
||||
wine-staging
|
||||
winetricks
|
||||
|
||||
usbutils
|
||||
pciutils
|
||||
bolt
|
||||
thunderbolt
|
||||
wireguard-tools
|
||||
];
|
||||
|
||||
systemd.packages = with pkgs; [
|
||||
bolt
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
|
||||
fonts = with pkgs; [
|
||||
fantasque-sans-mono
|
||||
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
];
|
||||
|
||||
fontconfig.defaultFonts.monospace = [ "Fantasque Sans Mono" "Roboto Mono" ];
|
||||
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.vim.defaultEditor = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
services.fwupd.enableTestRemote = true;
|
||||
services.fwupd.extraRemotes = [
|
||||
"lvfs-testing"
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
|
||||
}
|
61
graystripe/default.nix
Normal file
61
graystripe/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./egpu.nix
|
||||
./wireguard.nix
|
||||
];
|
||||
|
||||
# Nix cache
|
||||
# nix.extraOptions = ''
|
||||
# secret-key-files = /etc/nix/cache-priv-key.pem
|
||||
# '';
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
# Setup keyfile
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
# Enable swap on luks
|
||||
boot.initrd.luks.devices."luks-8b65fe7f-2115-422f-9443-7c6265d4d8ea".device = "/dev/disk/by-uuid/8b65fe7f-2115-422f-9443-7c6265d4d8ea";
|
||||
boot.initrd.luks.devices."luks-8b65fe7f-2115-422f-9443-7c6265d4d8ea".keyFile = "/crypto_keyfile.bin";
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
"/home".options = [ "compress=zstd" ];
|
||||
"/nix".options = [ "compress=zstd" ];
|
||||
"/root".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
networking.hostName = "graystripe"; # Define your hostname.
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
|
||||
}
|
56
packages.nix
Normal file
56
packages.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
git
|
||||
vim
|
||||
zsh
|
||||
|
||||
protonup
|
||||
protontricks
|
||||
wine-staging
|
||||
winetricks
|
||||
|
||||
usbutils
|
||||
pciutils
|
||||
bolt
|
||||
thunderbolt
|
||||
wireguard-tools
|
||||
];
|
||||
|
||||
systemd.packages = with pkgs; [
|
||||
bolt
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.vim.defaultEditor = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
services.fwupd.enableTestRemote = true;
|
||||
services.fwupd.extraRemotes = [
|
||||
"lvfs-testing"
|
||||
];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
16
user.nix
Normal file
16
user.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Define a user account. Don't forget to set a password with `passwd`.
|
||||
users.users.asonix = {
|
||||
isNormalUser = true;
|
||||
description = "Aode";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
}
|
Loading…
Reference in a new issue