hosts: Move host configuration into its own directory
This commit is contained in:
parent
97c6fece4c
commit
a531a27be5
@ -1,17 +1,17 @@
|
|||||||
{ config, pkgs, modulesPath, lib, ... }:
|
{ config, pkgs, modulesPath, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
customPkgs = import ./packages/overlay.nix;
|
customPkgs = import ../packages/overlay.nix;
|
||||||
unstable = (import ./modules/unstable.nix config);
|
unstable = (import ../modules/unstable.nix config);
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./generic.nix
|
../generic.nix
|
||||||
./modules/hardware/generic.nix ./modules/hardware/bluetooth.nix ./modules/hardware/wifi.nix ./modules/hardware/video.nix ./modules/hardware/mobile.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/fonts.nix
|
||||||
./modules/users
|
../modules/users
|
||||||
./modules/users/alexander.nix
|
../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/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
|
../modules/programs/distributed-build/offload.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
@ -19,7 +19,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
nur = (import ./modules/nur.nix pkgs);
|
nur = (import ../modules/nur.nix pkgs);
|
||||||
unstable = unstable;
|
unstable = unstable;
|
||||||
};
|
};
|
||||||
|
|
@ -11,7 +11,7 @@ in
|
|||||||
# Install home-manager
|
# Install home-manager
|
||||||
imports = [
|
imports = [
|
||||||
"${home-manager}/nixos"
|
"${home-manager}/nixos"
|
||||||
./modules/users # For system.singleUser
|
../modules/users # For system.singleUser
|
||||||
];
|
];
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
|
78
hosts/isla.nix
Normal file
78
hosts/isla.nix
Normal 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 = [ ];
|
||||||
|
}
|
@ -1,17 +1,17 @@
|
|||||||
{ config, pkgs, modulesPath, lib, ... }:
|
{ config, pkgs, modulesPath, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
unstable = (import ./modules/unstable.nix config);
|
unstable = (import ../modules/unstable.nix config);
|
||||||
customPkgs = import ./packages/overlay.nix;
|
customPkgs = import ../packages/overlay.nix;
|
||||||
gamemode = pkgs.callPackage ./packages/gamemode {};
|
gamemode = pkgs.callPackage ../packages/gamemode {};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./generic.nix
|
../generic.nix
|
||||||
./modules/hardware/generic.nix ./modules/hardware/video.nix
|
../modules/hardware/generic.nix ../modules/hardware/video.nix
|
||||||
./modules/fonts.nix
|
../modules/fonts.nix
|
||||||
./modules/users/alexander.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/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/distributed-build/builder.nix
|
||||||
#./modules/programs/music
|
#./modules/programs/music
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
nur = (import ./modules/nur.nix pkgs);
|
nur = (import ../modules/nur.nix pkgs);
|
||||||
unstable = unstable;
|
unstable = unstable;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ in {
|
|||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
# Prevent us from having to always type it out
|
# 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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -21,7 +21,7 @@
|
|||||||
home-manager.users.alexander = {
|
home-manager.users.alexander = {
|
||||||
# TODO: Move into a generic
|
# TODO: Move into a generic
|
||||||
pam.sessionVariables = {
|
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;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user