summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-02 22:37:06 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-02 22:37:06 -0500
commit9d1b3f23a64506988608143f4bca8ab4c5141d3e (patch)
tree0955588a5f4bcb3f802b6398a537a83cdb0091e0
parent4730b215fdc4095800fedfdf690c12fec994bb6b (diff)
downloadnixos-9d1b3f23a64506988608143f4bca8ab4c5141d3e.tar.xz
nixos-9d1b3f23a64506988608143f4bca8ab4c5141d3e.zip
update moreee
-rw-r--r--flake.nix13
-rw-r--r--modules/root/default.nix17
-rw-r--r--modules/root/resources/x11/xinit-startx-xdg.patch (renamed from modules/root/x11/xinit-startx-xdg.patch)0
-rw-r--r--modules/root/software.nix90
-rw-r--r--modules/root/software/default.nix23
-rw-r--r--modules/root/software/desktop-extra.nix16
-rw-r--r--modules/root/software/desktop.nix22
-rw-r--r--modules/root/software/dev-extra.nix16
-rw-r--r--modules/root/software/dev.nix23
-rw-r--r--modules/root/software/utils.nix30
-rw-r--r--modules/root/x11.nix (renamed from modules/root/x11/default.nix)2
11 files changed, 118 insertions, 134 deletions
diff --git a/flake.nix b/flake.nix
index e69a67b..fbf3bc1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,10 +19,18 @@
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
+ userDetails = {
+ username = "timmy";
+ email = "tjkeller.xyz";
+ fullname = "Tim Keller";
+ };
in {
nixosConfigurations.T430 = nixpkgs.lib.nixosSystem {
inherit system;
- specialArgs = { inherit inputs; };
+ specialArgs = {
+ inherit inputs;
+ inherit userDetails;
+ };
modules = [
./modules/hosts/T430/configuration.nix
./modules/root
@@ -31,6 +39,9 @@
homeConfigurations.timmy = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
+ extraSpecialArgs = {
+ inherit userDetails;
+ };
modules = [
./modules/home
inputs.arkenfox.hmModules.arkenfox
diff --git a/modules/root/default.nix b/modules/root/default.nix
index dd518d2..05453b4 100644
--- a/modules/root/default.nix
+++ b/modules/root/default.nix
@@ -10,10 +10,10 @@
./localization.nix
./nix.nix
./pipewire.nix
- ./software
+ ./software.nix
./virtualisation.nix
./wifi.nix
- ./x11
+ ./x11.nix
];
cups.enable = lib.mkDefault true;
@@ -29,6 +29,19 @@
};
home-manager.enable = lib.mkDefault true;
pipewire.enable = lib.mkDefault true;
+ software = {
+ desktop = {
+ enable = lib.mkDefault true;
+ extra.enable = lib.mkDefault false;
+ };
+ dev = {
+ enable = lib.mkDefault true;
+ extra.enable = lib.mkDefault false;
+ };
+ utils = {
+ enable = lib.mkDefault true;
+ };
+ };
virtualisation.enable = lib.mkDefault false;
wifi.enable = lib.mkDefault true;
xserver.awesome.enable = lib.mkDefault true;
diff --git a/modules/root/x11/xinit-startx-xdg.patch b/modules/root/resources/x11/xinit-startx-xdg.patch
index c1bca97..c1bca97 100644
--- a/modules/root/x11/xinit-startx-xdg.patch
+++ b/modules/root/resources/x11/xinit-startx-xdg.patch
diff --git a/modules/root/software.nix b/modules/root/software.nix
new file mode 100644
index 0000000..c991456
--- /dev/null
+++ b/modules/root/software.nix
@@ -0,0 +1,90 @@
+{ pkgs, lib, config, ... }: {
+ options = {
+ software = {
+ desktop = {
+ enable = lib.mkEnableOption "enables desktop apps";
+ extra.enable = lib.mkEnableOption "enables extra desktop apps";
+ };
+ dev = {
+ enable = lib.mkEnableOption "enables development utilities";
+ extra.enable = lib.mkEnableOption "enables extra development utilities";
+ };
+ utils = {
+ enable = lib.mkEnableOption "enables general utilities";
+ };
+ };
+ };
+
+ config = {
+ environment.systemPackages = with pkgs; pkgs.lib.optionals config.software.desktop.enable [
+ # Desktop
+ alacritty
+ arandr
+ dmenu
+ firefox
+ mpv
+ pavucontrol
+ pcmanfm
+ redshift
+ sxiv
+ zathura
+ ] ++ pkgs.lib.optionals config.software.desktop.extra.enable [
+ # Desktop Extra
+ geeqie
+ gimp
+ inkscape
+ qbittorrent
+ qdirstat
+ ungoogled-chromium
+ ] ++ pkgs.lib.optionals config.software.dev.enable [
+ # Development
+ dash # TODO should be default /bin/sh
+ entr
+ gcc
+ git
+ gnumake
+ jq
+ lm_sensors
+ nmap
+ openssl
+ python3
+ sassc
+ sslscan
+ wget
+ ] ++ pkgs.lib.optionals config.software.dev.extra.enable [
+ # Development Extra
+ android-tools
+ cargo
+ hugo
+ #python-pip # TODO figure this one out
+ uhubctl
+ wireguard-tools
+ ] ++ pkgs.lib.optionals config.software.utils.enable [
+ # Utilities
+ ddcutil # TODO
+ fastfetch
+ htop
+ light
+ neovim
+ p7zip
+ powertop
+ pv
+ rsync
+ screen
+ scrot
+ smartmontools
+ stress
+ testdisk
+ tmux
+ xxHash
+ ];
+
+ # More desktop
+ programs.dconf.enable = lib.mkIf config.software.desktop.enable true; # For home-manager to configure gtk TODO this should be there instead
+
+ # More utilities
+ programs.zsh.enable = lib.mkIf config.software.utils.enable true;
+ users.defaultUserShell = lib.mkIf config.software.utils.enable pkgs.zsh;
+ services.openssh.enable = lib.mkIf config.software.utils.enable true;
+ };
+}
diff --git a/modules/root/software/default.nix b/modules/root/software/default.nix
deleted file mode 100644
index 0ceef7f..0000000
--- a/modules/root/software/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ lib, ... }: {
- imports = [
- ./desktop.nix
- ./desktop-extra.nix
- ./dev.nix
- ./dev-extra.nix
- ./utils.nix
- ];
-
- software = {
- desktop = {
- enable = lib.mkDefault true;
- extra.enable = lib.mkDefault false;
- };
- dev = {
- enable = lib.mkDefault true;
- extra.enable = lib.mkDefault false;
- };
- utils = {
- enable = lib.mkDefault true;
- };
- };
-}
diff --git a/modules/root/software/desktop-extra.nix b/modules/root/software/desktop-extra.nix
deleted file mode 100644
index a3bf8fb..0000000
--- a/modules/root/software/desktop-extra.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- software.desktop.extra.enable = lib.mkEnableOption "enables extra desktop apps";
- };
-
- config = lib.mkIf config.software.desktop.extra.enable {
- environment.systemPackages = with pkgs; [
- geeqie
- gimp
- inkscape
- qbittorrent
- qdirstat
- ungoogled-chromium
- ];
- };
-}
diff --git a/modules/root/software/desktop.nix b/modules/root/software/desktop.nix
deleted file mode 100644
index 195d742..0000000
--- a/modules/root/software/desktop.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- software.desktop.enable = lib.mkEnableOption "enables desktop apps";
- };
-
- config = lib.mkIf config.software.desktop.enable {
- programs.dconf.enable = true; # For home-manager to configure gtk
-
- environment.systemPackages = with pkgs; [
- alacritty
- arandr
- dmenu
- firefox
- mpv
- pavucontrol
- pcmanfm
- redshift
- sxiv
- zathura
- ];
- };
-}
diff --git a/modules/root/software/dev-extra.nix b/modules/root/software/dev-extra.nix
deleted file mode 100644
index b027b37..0000000
--- a/modules/root/software/dev-extra.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- software.dev.extra.enable = lib.mkEnableOption "enables extra dev apps";
- };
-
- config = lib.mkIf config.software.dev.extra.enable {
- environment.systemPackages = with pkgs; [
- android-tools
- cargo
- hugo
- #python-pip
- uhubctl
- wireguard-tools
- ];
- };
-}
diff --git a/modules/root/software/dev.nix b/modules/root/software/dev.nix
deleted file mode 100644
index b0dabcc..0000000
--- a/modules/root/software/dev.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- software.dev.enable = lib.mkEnableOption "enables dev apps";
- };
-
- config = lib.mkIf config.software.dev.enable {
- environment.systemPackages = with pkgs; [
- dash # TODO should be default /bin/sh
- entr
- gcc
- git
- gnumake
- jq
- lm_sensors
- nmap
- openssl
- python3
- sassc
- sslscan
- wget
- ];
- };
-}
diff --git a/modules/root/software/utils.nix b/modules/root/software/utils.nix
deleted file mode 100644
index 1efdb18..0000000
--- a/modules/root/software/utils.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- software.utils.enable = lib.mkEnableOption "enables dev apps";
- };
-
- config = lib.mkIf config.software.utils.enable {
- programs.zsh.enable = true;
- users.defaultUserShell = pkgs.zsh;
- services.openssh.enable = true;
-
- environment.systemPackages = with pkgs; [
- ddcutil # TODO
- fastfetch
- htop
- light
- neovim
- p7zip
- powertop
- pv
- rsync
- screen
- scrot
- smartmontools
- stress
- testdisk
- tmux
- xxHash
- ];
- };
-}
diff --git a/modules/root/x11/default.nix b/modules/root/x11.nix
index 8fa1d27..fd15c52 100644
--- a/modules/root/x11/default.nix
+++ b/modules/root/x11.nix
@@ -22,7 +22,7 @@
# Patch startx to be compliant with xdg base dir spec
(xorg.xinit.overrideAttrs (old: rec {
patches = [
- ./xinit-startx-xdg.patch
+ ./resources/x11/xinit-startx-xdg.patch
];
}))
];