Separated out shared.nix into headful and headless nix config files
This commit is contained in:
parent
2f097552b6
commit
8de0666cc5
52
config/headful.nix
Normal file
52
config/headful.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{ config, pkgs, inputs, ... }: {
|
||||||
|
|
||||||
|
imports = [ ./shared.nix ];
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
networking.wireless.iwd.enable = true;
|
||||||
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = "iwd";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable sound
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable the X11 windowing system and i3 window manager.
|
||||||
|
environment.pathsToLink = [ "/libexec" ];
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Setup i3 window manager
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.i3-gaps;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
rofi
|
||||||
|
polybar
|
||||||
|
rxvt-unicode
|
||||||
|
arandr
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# List packages to be installed for headful systems
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
picom
|
||||||
|
];
|
||||||
|
|
||||||
|
# Install additional programs
|
||||||
|
programs.thunar.enable = true;
|
||||||
|
|
||||||
|
}
|
@ -1,21 +1,11 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ config, pkgs, inputs, ... }: {
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
imports = [ ./shared.nix ];
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../hardware/vm.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
# Set hostname
|
|
||||||
networking.hostName = "nixos-dev";
|
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../hardware/omen.nix
|
../hardware/omen.nix
|
||||||
|
./headful.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
@ -16,6 +16,9 @@
|
|||||||
# Set hostname
|
# Set hostname
|
||||||
networking.hostName = "randomctf";
|
networking.hostName = "randomctf";
|
||||||
|
|
||||||
|
# Create user
|
||||||
|
users.users.random = import ./user.nix;
|
||||||
|
|
||||||
# Enable Nvidia drivers
|
# Enable Nvidia drivers
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
@ -45,6 +48,4 @@
|
|||||||
|
|
||||||
# Enable VMWare Workstation
|
# Enable VMWare Workstation
|
||||||
virtualisation.vmware.host.enable = true;
|
virtualisation.vmware.host.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,8 @@
|
|||||||
# Enable experimental nix features.
|
# Enable experimental nix features.
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Networking
|
# Allow unfree packages
|
||||||
networking.wireless.iwd.enable = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
networking.networkmanager = {
|
|
||||||
enable = true;
|
|
||||||
wifi.backend = "iwd";
|
|
||||||
};
|
|
||||||
|
|
||||||
# General setup
|
# General setup
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
@ -26,36 +22,6 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system and i3 window manager.
|
|
||||||
environment.pathsToLink = [ "/libexec" ];
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.i3-gaps;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
rofi
|
|
||||||
polybar
|
|
||||||
rxvt-unicode
|
|
||||||
arandr
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
options = "caps:escape";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound with
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
# Change default shell to zsh.
|
# Change default shell to zsh.
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
@ -64,29 +30,13 @@
|
|||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.random = {
|
|
||||||
isNormalUser = true;
|
|
||||||
useDefaultShell = true;
|
|
||||||
description = "random";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile.
|
# List packages installed in system profile.
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
git
|
git
|
||||||
picom
|
|
||||||
killall
|
killall
|
||||||
];
|
];
|
||||||
|
|
||||||
# Install additional programs
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
|
|
||||||
# Enable services.
|
# Enable services.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
8
config/user.nix
Normal file
8
config/user.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Generic user configuration.
|
||||||
|
# Don't forget to set a password with ‘passwd’.
|
||||||
|
{
|
||||||
|
isNormalUser = true;
|
||||||
|
useDefaultShell = true;
|
||||||
|
description = "random";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user