added gnome
This commit is contained in:
parent
c36f2b43cd
commit
bd3befc8ab
7 changed files with 180 additions and 62 deletions
|
|
@ -1,14 +0,0 @@
|
|||
{config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
system.stateVersion = "22.11";
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
networking.useDHCP = true;
|
||||
# boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usbhid" "sd_mod" "sdhci_pci" ];
|
||||
# boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
# boot.kernelModules = [ "kvm-intel" "wl" ];
|
||||
# boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
||||
# hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
71
.modules/base/proxmox-vm-hardware.nix
Normal file
71
.modules/base/proxmox-vm-hardware.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
boot.loader.systemd-boot.enable = "true";
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/40fe3178-6ec1-450f-93fd-c359f2f3daf9";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s18.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# This helps stay in step with genertator due to being in vm
|
||||
boot = {
|
||||
growPartition = true;
|
||||
kernelParams = [ "console=ttyS0" ];
|
||||
loader.grub = {
|
||||
device = lib.mkDefault (if (hasNoFsPartition || supportBios) then
|
||||
# Even if there is a separate no-fs partition ("/dev/disk/by-partlabel/no-fs" i.e. "/dev/vda2"),
|
||||
# which will be used the bootloader, do not set it as loader.grub.device.
|
||||
# GRUB installation fails, unless the whole disk is selected.
|
||||
"/dev/disk/by-uuid/40fe3178-6ec1-450f-93fd-c359f2f3daf9"
|
||||
else
|
||||
"nodev");
|
||||
efiSupport = lib.mkDefault supportEfi;
|
||||
efiInstallAsRemovable = lib.mkDefault supportEfi;
|
||||
};
|
||||
|
||||
loader.timeout = 0;
|
||||
initrd.availableKernelModules = [ "uas" "virtio_blk" "virtio_pci" ];
|
||||
};
|
||||
|
||||
# fileSystems."/" = {
|
||||
# device = "/dev/disk/by-label/nixos";
|
||||
# autoResize = true;
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
# fileSystems."/boot" = lib.mkIf hasBootPartition {
|
||||
# device = "/dev/disk/by-label/ESP";
|
||||
# fsType = "vfat";
|
||||
# };
|
||||
|
||||
services.qemuGuest.enable = lib.mkDefault true;
|
||||
}
|
||||
32
.modules/features/desktop/desktop-environments/gnome.nix
Normal file
32
.modules/features/desktop/desktop-environments/gnome.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services = {
|
||||
gnome = {
|
||||
core-utilities.enable = false;
|
||||
gnome-keyring.enable = true;
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
displayManager = {
|
||||
gnome.enable = true;
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
# defaultSession = lib.mkDefault "gnome";
|
||||
};
|
||||
desktopManager = {
|
||||
xterm.enable = lib.mkForce false;
|
||||
gnome.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
xwayland.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
xdg.portal = { enable = lib.mkDefault true; };
|
||||
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
# TODO build out mode for working on data
|
||||
15
flake.nix
15
flake.nix
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -8,20 +8,19 @@
|
|||
};
|
||||
outputs = { self, nixos-generators, nixpkgs, ... }@inputs:
|
||||
{
|
||||
example = nixos-generators.nixosGenerate {
|
||||
proxmox = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/example.nix
|
||||
./hosts/creatorforge.nix
|
||||
];
|
||||
format = "qcow";
|
||||
format = "proxmox";
|
||||
};
|
||||
|
||||
openldap = nixos-generators.nixosGenerate {
|
||||
creatorforge-vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/openldap.nix
|
||||
./hosts/creatorforge.nix
|
||||
./modules/base/proxmox-vm-hardware.nix
|
||||
];
|
||||
format = "qcow";
|
||||
};
|
||||
};
|
||||
}
|
||||
70
hosts/creatorforge.nix
Normal file
70
hosts/creatorforge.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ modulesPath, config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
../.modules/services/docker.nix
|
||||
../.modules/users/speccon18.nix
|
||||
../.modules/services/openssh.nix
|
||||
../.modules/features/desktop-environments/gnome.nix
|
||||
];
|
||||
#TODO: MOVE TO MODULE LATER
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
# nix flakes
|
||||
package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
#auto maintainence
|
||||
settings.auto-optimise-store = lib.mkDefault true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
# prevent tampering
|
||||
readOnlyStore = true;
|
||||
};
|
||||
# base packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
bat
|
||||
exa
|
||||
zsh
|
||||
vim
|
||||
micro
|
||||
tailscale
|
||||
firefox
|
||||
codium
|
||||
# Gnome Extensions
|
||||
gnomeExtensions.dock-from-dash
|
||||
gnomeExtensions.pop-shell
|
||||
];
|
||||
|
||||
networking = {
|
||||
firewall.checkReversePath = "loose";
|
||||
hostName = "creatorforge"; # Define your hostname.
|
||||
# networkmanager.enable = true;
|
||||
};
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
## main services
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
### testing ###
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
# ../.modules/base/hardware.nix
|
||||
../.modules/services/docker.nix
|
||||
../.modules/users/arouzing.nix
|
||||
../.modules/services/openssh.nix
|
||||
];
|
||||
|
||||
# base packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
vim
|
||||
# sleep
|
||||
# tailscale
|
||||
];
|
||||
|
||||
networking = {
|
||||
firewall.checkReversePath = "loose";
|
||||
hostName = "example"; # Define your hostname.
|
||||
# networkmanager.enable = true;
|
||||
};
|
||||
|
||||
# services.tailscale.enable = true;
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
## main services
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue