hosts: Move host configuration into its own directory

This commit is contained in:
PapaTutuWawa 2021-08-04 19:17:15 +02:00
parent 97c6fece4c
commit a531a27be5
5 changed files with 101 additions and 23 deletions

View File

@ -1,17 +1,17 @@
{ config, pkgs, modulesPath, lib, ... }:
let
customPkgs = import ./packages/overlay.nix;
unstable = (import ./modules/unstable.nix config);
customPkgs = import ../packages/overlay.nix;
unstable = (import ../modules/unstable.nix config);
in {
imports = [
./generic.nix
./modules/hardware/generic.nix ./modules/hardware/bluetooth.nix ./modules/hardware/wifi.nix ./modules/hardware/video.nix ./modules/hardware/mobile.nix
./modules/fonts.nix
./modules/users
./modules/users/alexander.nix
./modules/programs/zsh ./modules/programs/mpv ./modules/programs/git ./modules/programs/tmux ./modules/programs/firefox ./modules/programs/gnome-terminal ./modules/programs/gnome ./modules/programs/nonvm
./modules/programs/distributed-build/offload.nix
../generic.nix
../modules/hardware/generic.nix ../modules/hardware/bluetooth.nix ../modules/hardware/wifi.nix ../modules/hardware/video.nix ../modules/hardware/mobile.nix
../modules/fonts.nix
../modules/users
../modules/users/alexander.nix
../modules/programs/zsh ../modules/programs/mpv ../modules/programs/git ../modules/programs/tmux ../modules/programs/firefox ../modules/programs/gnome-terminal ../modules/programs/gnome ../modules/programs/nonvm
../modules/programs/distributed-build/offload.nix
];
nixpkgs.overlays = [
@ -19,7 +19,7 @@ in {
];
nixpkgs.config.packageOverrides = pkgs: {
nur = (import ./modules/nur.nix pkgs);
nur = (import ../modules/nur.nix pkgs);
unstable = unstable;
};

View File

@ -11,7 +11,7 @@ in
# Install home-manager
imports = [
"${home-manager}/nixos"
./modules/users # For system.singleUser
../modules/users # For system.singleUser
];
home-manager.useGlobalPkgs = true;

78
hosts/isla.nix Normal file
View File

@ -0,0 +1,78 @@
{ config, pkgs, modulesPath, lib, ... }:
let
unstable = (import ../modules/unstable.nix config);
customPkgs = import ../packages/overlay.nix;
in {
imports = [
../generic.nix
../modules/hardware/generic.nix ../modules/hardware/video.nix
../modules/users/fuck-xi.nix
../modules/programs/zsh ../modules/programs/tmux ../modules/programs/emacs ../modules/programs/firefox ../modules/programs/gnome-terminal ../modules/programs/gnome
];
nixpkgs.overlays = [
(import (builtins.fetchGit {
url = "https://github.com/nix-community/emacs-overlay.git";
ref = "master";
rev = "ce0e9482d53d69bedc8416d8a984d00e17607826";
}))
customPkgs
];
nixpkgs.config.packageOverrides = pkgs: {
nur = (import ../modules/nur.nix pkgs);
unstable = unstable;
};
environment = {
systemPackages = with pkgs; [
emacsPgtkGcc
];
sessionVariables = {
# Prevent us from having to always type it out
#NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/hosts/isla.nix";
};
};
networking = {
interfaces.enp6s0.useDHCP = false;
hostName = "isla";
# Nix otherwise has a conflict with this option
wireless.enable = lib.mkForce false;
# Allow scream to connect to this host
firewall.allowedUDPPorts = [ 4010 ];
};
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
extraModprobeConfig = "";
initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" "vendor-reset" ];
kernelModules = [];
};
kernelParams = [];
kernelModules = [];
extraModulePackages = [];
kernelPackages = pkgs.linuxPackages_zen;
};
services = {
emacs.package = pkgs.emacsPgtkGcc;
};
systemd.services.NetworkManager-wait-online.enable = false;
fileSystems = {
"/" = {
device = "/dev/disk/by-label/root";
fsType = "btrfs";
};
};
swapDevices = [ ];
}

View File

@ -1,17 +1,17 @@
{ config, pkgs, modulesPath, lib, ... }:
let
unstable = (import ./modules/unstable.nix config);
customPkgs = import ./packages/overlay.nix;
gamemode = pkgs.callPackage ./packages/gamemode {};
unstable = (import ../modules/unstable.nix config);
customPkgs = import ../packages/overlay.nix;
gamemode = pkgs.callPackage ../packages/gamemode {};
in {
imports = [
./generic.nix
./modules/hardware/generic.nix ./modules/hardware/video.nix
./modules/fonts.nix
./modules/users/alexander.nix
./modules/programs/zsh ./modules/programs/git ./modules/programs/mpv ./modules/programs/tmux ./modules/programs/emacs ./modules/programs/firefox ./modules/programs/gnome-terminal ./modules/programs/gnome ./modules/programs/i18n.nix ./modules/programs/gamemode ./modules/programs/nonvm
./modules/programs/distributed-build/builder.nix
../generic.nix
../modules/hardware/generic.nix ../modules/hardware/video.nix
../modules/fonts.nix
../modules/users/alexander.nix
../modules/programs/zsh ../modules/programs/git ../modules/programs/mpv ../modules/programs/tmux ../modules/programs/emacs ../modules/programs/firefox ../modules/programs/gnome-terminal ../modules/programs/gnome ../modules/programs/i18n.nix ../modules/programs/gamemode ../modules/programs/nonvm
../modules/programs/distributed-build/builder.nix
#./modules/programs/music
];
@ -25,7 +25,7 @@ in {
];
nixpkgs.config.packageOverrides = pkgs: {
nur = (import ./modules/nur.nix pkgs);
nur = (import ../modules/nur.nix pkgs);
unstable = unstable;
};
@ -43,7 +43,7 @@ in {
sessionVariables = {
# Prevent us from having to always type it out
#NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/miku.nix";
#NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/hosts/miku.nix";
};
};

View File

@ -21,7 +21,7 @@
home-manager.users.alexander = {
# TODO: Move into a generic
pam.sessionVariables = {
NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/${config.networking.hostName}.nix";
NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/hosts/${config.networking.hostName}.nix";
};
programs.home-manager.enable = true;