From ce24c83fbbfe7ce615181f6bc8da8ccbabcc10a2 Mon Sep 17 00:00:00 2001 From: Steven Carpenter Date: Sun, 12 Feb 2023 16:54:09 -0500 Subject: [PATCH] house cleaning and defaulted to zsh shell for myself --- .../desktop/applications/speccon18.nix | 13 +++ .../features/desktop/environments/gnome.nix | 17 +++- .modules/users/speccon18.nix | 1 + hosts/creatorforge.nix | 81 +++++++++---------- 4 files changed, 65 insertions(+), 47 deletions(-) create mode 100644 .modules/features/desktop/applications/speccon18.nix diff --git a/.modules/features/desktop/applications/speccon18.nix b/.modules/features/desktop/applications/speccon18.nix new file mode 100644 index 0000000..4b71266 --- /dev/null +++ b/.modules/features/desktop/applications/speccon18.nix @@ -0,0 +1,13 @@ +{ config, pkgs, lib, ... }: +{ + environment.systemPackages = with pkgs; [ + tailscale + firefox + vscodium-fhs + alacritty + starship + ]; + programs = { + zsh.enable = lib.mkDefault true; + }; +} \ No newline at end of file diff --git a/.modules/features/desktop/environments/gnome.nix b/.modules/features/desktop/environments/gnome.nix index 8c7b360..e5305c3 100644 --- a/.modules/features/desktop/environments/gnome.nix +++ b/.modules/features/desktop/environments/gnome.nix @@ -1,5 +1,10 @@ { config, pkgs, lib, ... }: { + # Gnome extensions + environment.systemPackages = with pkgs; [ + gnomeExtensions.dock-from-dash + gnomeExtensions.pop-shell + ]; services = { gnome = { core-utilities.enable = false; @@ -11,9 +16,13 @@ layout = "us"; xkbVariant = ""; displayManager = { - gdm.enable = true; - gdm.wayland = true; - # defaultSession = lib.mkDefault "gnome"; + gdm = { + enable = true; + wayland = true; + }; + enable = true; + wayland = true; + defaultSession = lib.mkDefault "gnome"; }; desktopManager = { xterm.enable = lib.mkForce false; @@ -28,4 +37,4 @@ xdg.portal = { enable = lib.mkDefault true; }; -} \ No newline at end of file +} diff --git a/.modules/users/speccon18.nix b/.modules/users/speccon18.nix index 2ec2439..fad4d60 100644 --- a/.modules/users/speccon18.nix +++ b/.modules/users/speccon18.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, ... }: { users.users.speccon18 = { + shell = pkgs.zsh; isNormalUser = true; initialHashedPassword = "$6$pJB0TDUj8IS8hQNJ$GfENlHg89lsUjRiSaePWJeqX1pevTTZOuEw5KgcVEpyPw9lyiAifz5ZiuOQnYxUAMhAiCmF/pCjaWSy6m5sWM/"; openssh.authorizedKeys.keys = [ diff --git a/hosts/creatorforge.nix b/hosts/creatorforge.nix index 51af798..bef18c8 100644 --- a/hosts/creatorforge.nix +++ b/hosts/creatorforge.nix @@ -2,48 +2,44 @@ { 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; + # 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 + ../.modules/features/desktop/applications/speccon18.nix + ]; + # Allow non opensource software to be installed + nixpkgs.config.allowUnfree = true; + + nix = { + ## NIX FLAKES ## + package = pkgs.nixUnstable; # or versioned attributes like nix_2_4 + # enable flakes + extraOptions = ''experimental-features = nix-command flakes''; + # auto maintainence + settings.auto-optimise-store = lib.mkDefault true; + # prevent tampering + readOnlyStore = true; + # garbage collections + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; }; - # base packages - environment.systemPackages = with pkgs; [ - htop - bat - exa - zsh - vim - micro - tailscale - firefox - vscodium-fhs - alacritty - starship - # Gnome Extensions - gnomeExtensions.dock-from-dash - gnomeExtensions.pop-shell - ]; + }; + # base packages + environment.systemPackages = with pkgs; [ + htop + bat + exa + zsh + vim + micro + direnv + uutils-coreutils + ]; networking = { firewall.checkReversePath = "loose"; @@ -65,8 +61,7 @@ system.stateVersion = "22.11"; ### testing ### - boot.initrd.availableKernelModules = - [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; } \ No newline at end of file