diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/home/resources/activation-scripts/clone-repos.sh | 16 | ||||
-rw-r--r-- | modules/hosts/hp-envy-office/configuration.nix | 36 | ||||
-rw-r--r-- | modules/hosts/hp-envy-office/hardware-configuration.nix | 48 | ||||
-rw-r--r-- | modules/hosts/hp-envy-office/home.nix | 7 | ||||
-rw-r--r-- | modules/root/default.nix | 2 | ||||
-rw-r--r-- | modules/root/nas.nix | 29 | ||||
-rw-r--r-- | modules/root/software/desktop.nix | 1 |
7 files changed, 120 insertions, 19 deletions
diff --git a/modules/home/resources/activation-scripts/clone-repos.sh b/modules/home/resources/activation-scripts/clone-repos.sh index 4ed142f..887968b 100644 --- a/modules/home/resources/activation-scripts/clone-repos.sh +++ b/modules/home/resources/activation-scripts/clone-repos.sh @@ -14,11 +14,11 @@ clonemissing() { run ln -sf $VERBOSE_ARG "$2"/* "$3" } -# # repo # clone to # link to -clonemissing scripts.git $HOME/docs/src/scripts $HOME/.local/bin -clonemissing dotconfig.git $HOME/docs/src/config $HOME/.config -clonemissing userscripts $HOME/docs/src/userscripts '' -clonemissing nixos.git $HOME/docs/src/nixos '' -clonemissing awesome $HOME/.config/awesome '' -clonemissing nvim $HOME/.config/nvim '' -clonemissing zsh $HOME/.config/zsh '' +# # repo # clone to # link to +clonemissing scripts $HOME/docs/src/scripts $HOME/.local/bin +clonemissing dotconfig $HOME/docs/src/config $HOME/.config +clonemissing userscripts $HOME/docs/src/userscripts '' +clonemissing nixos $HOME/docs/src/nixos '' +clonemissing awesome $HOME/.config/awesome '' +clonemissing nvim $HOME/.config/nvim '' +clonemissing zsh $HOME/.config/zsh '' diff --git a/modules/hosts/hp-envy-office/configuration.nix b/modules/hosts/hp-envy-office/configuration.nix new file mode 100644 index 0000000..b6142c7 --- /dev/null +++ b/modules/hosts/hp-envy-office/configuration.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ]; + networking.hostName = "hp-envy-office"; + + # Enable extra software pkgs + software.desktop = { + chromium.enable = true; + cad.enable = false; + crypto.enable = false; + graphics.enable = true; + office.enable = true; + utilities.enable = true; + }; + software.development = { + docker.enable = true; + }; + + # Enable network drives + nas.enable = true; + nas.office.enable = true; + nas.home.enable = false; + + networking.hosts = { + "192.168.77.3" = [ "devel" ]; + }; + + # Use amdgpu driver for x11 + services.xserver.videoDrivers = [ "amdgpu" ]; + + # Enable bluetooth + bluetooth.enable = true; + + system.stateVersion = "24.11"; +} diff --git a/modules/hosts/hp-envy-office/hardware-configuration.nix b/modules/hosts/hp-envy-office/hardware-configuration.nix new file mode 100644 index 0000000..22a8c24 --- /dev/null +++ b/modules/hosts/hp-envy-office/hardware-configuration.nix @@ -0,0 +1,48 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ums_realtek" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/5749d84b-690b-43a2-b834-f94675003189"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/4a617e54-4800-4474-b1fd-3bca5f66e55a"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/5749d84b-690b-43a2-b834-f94675003189"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5E93-7CE3"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/hosts/hp-envy-office/home.nix b/modules/hosts/hp-envy-office/home.nix new file mode 100644 index 0000000..1df168c --- /dev/null +++ b/modules/hosts/hp-envy-office/home.nix @@ -0,0 +1,7 @@ +{ ... }: { + imports = [ ../../home ]; + + theme.mint.theme.color = "Dark-Red"; + theme.mint.icons.color = "Red"; + wallpapers.enable = true; +} diff --git a/modules/root/default.nix b/modules/root/default.nix index c3d2dc1..e108318 100644 --- a/modules/root/default.nix +++ b/modules/root/default.nix @@ -31,7 +31,9 @@ nas = { enable = lib.mkDefault false; home.enable = lib.mkDefault true; + home.automount = lib.mkDefault false; office.enable = lib.mkDefault false; + office.automount = lib.mkDefault false; }; bootloader = { mode = lib.mkDefault "bios"; diff --git a/modules/root/nas.nix b/modules/root/nas.nix index 0e11196..525456e 100644 --- a/modules/root/nas.nix +++ b/modules/root/nas.nix @@ -1,29 +1,36 @@ { lib, config, ... } : let - mkNetworkFileSystem = device : { + mkNetworkFileSystem = device: automount: { device = "${device}"; fsType = "nfs"; - options = [ "noauto" "defaults" ]; + options = [ "defaults" ] ++ lib.optionals automount [ "noauto" ]; }; in { options = { nas = { enable = lib.mkEnableOption "enable network shares"; - home.enable = lib.mkEnableOption "enable home network shares"; - office.enable = lib.mkEnableOption "enable office network shares"; + home = { + enable = lib.mkEnableOption "enable home network shares"; + automount = lib.mkEnableOption "automount home network shares"; + }; + office = { + enable = lib.mkEnableOption "enable office network shares"; + automount = lib.mkEnableOption "automount home network shares"; + }; }; }; config = lib.mkIf config.nas.enable { fileSystems = lib.optionalAttrs config.nas.home.enable { - "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media"; - "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups"; - "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes"; - "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos"; + "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media" config.nas.home.automount; + "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups" config.nas.home.automount; + "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes" config.nas.home.automount; + "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos" config.nas.home.automount; } // lib.optionalAttrs config.nas.office.enable { - "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx"; - "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller"; - "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans"; + "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx" config.nas.office.automount; + "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller" config.nas.office.automount; + "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans" config.nas.office.automount; }; + # TODO auto mkdirz }; } diff --git a/modules/root/software/desktop.nix b/modules/root/software/desktop.nix index eb0a5ff..4f7aca9 100644 --- a/modules/root/software/desktop.nix +++ b/modules/root/software/desktop.nix @@ -55,6 +55,7 @@ inkscape ] ++ pkgs.lib.optionals config.software.desktop.office.enable [ # Office + libreoffice thunderbird ] ++ pkgs.lib.optionals config.software.desktop.utilities.enable [ # Misc Utilities |