From 7e343c4ed7f4c95433973dac8f0921e40734ddb8 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Thu, 14 Mar 2024 13:11:43 -0500 Subject: [PATCH] desktop stuff --- hosts/desktop/configuration.nix | 64 +++++++++++++++++++++++++-------- hosts/desktop/home.nix | 1 + share/amd/default.nix | 18 ++++++++-- share/amd/options.nix | 5 +++ 4 files changed, 72 insertions(+), 16 deletions(-) diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index dc6f249..eb2daff 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -17,8 +17,7 @@ in { share.hardware.amd = { enable = true; - corectrl.enable = true; - corectrl.enablePolkit = true; + lact.enable = true; }; share.gaming.enable = true; @@ -139,26 +138,33 @@ in { # List packages installed in system profile. To search, run: # $ nix search wget systemPackages = with pkgs; [ - vim - wget - nano - os-prober - efibootmgr - sbctl - gparted - pciutils - papirus-icon-theme - vulkan-tools + aha aspell aspellDicts.en aspellDicts.en-computers aspellDicts.en-science - aha + borgbackup clinfo + efibootmgr + fishPlugins.bass + fishPlugins.sponge + gparted + lact + nano + os-prober + papirus-icon-theme + pciutils + sbctl + vim + vulkan-tools + wget + # winetricks (all versions) + winetricks + # native wayland support (unstable) + wineWowPackages.waylandFull ]; }; - # Configure nixpkgs nixpkgs.config.permittedInsecurePackages = [ # allow insecure electron for etcher @@ -172,6 +178,36 @@ in { shell = pkgs.fish; }; + services.borgbackup.jobs.home-matt = { + paths = "/home/matt"; + encryption.mode = "none"; + # environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519"; + repo = "/media/nas/backup/desktop-nix/home"; + compression = "auto,zstd"; + exclude = [ + "/home/matt/Games" + "/home/matt/1TB" + ]; + }; + + fileSystems."/media/nas/backup" = { + device = "//10.0.1.18/Backup"; + fsType = "cifs"; + options = [ "sec=none" "x-systemd.automount" "auto" "rw" "file_mode=0775" "dir_mode=0775" "uid=matt" "gid=wheel" ]; + }; + + fileSystems."/media/nas/isos" = { + device = "//10.0.1.18/isos"; + fsType = "cifs"; + options = [ "sec=none" "x-systemd.automount" "auto" "rw" "file_mode=0775" "dir_mode=0775" "uid=matt" "gid=wheel" ]; + }; + + fileSystems."/media/nas/3d_printer" = { + device = "//10.0.1.18/3d_printer"; + fsType = "cifs"; + options = [ "sec=none" "x-systemd.automount" "auto" "rw" "file_mode=0775" "dir_mode=0775" "uid=matt" "gid=wheel" ]; + }; + # This option defines the first version of NixOS you have installed on this particular machine, # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. # diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index b968ddd..baeee67 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -48,6 +48,7 @@ python3 virt-manager orca-slicer + protonvpn-gui nixfmt deadnix ]; diff --git a/share/amd/default.nix b/share/amd/default.nix index 5558322..2737a52 100644 --- a/share/amd/default.nix +++ b/share/amd/default.nix @@ -6,7 +6,7 @@ in { config = mkIf cfg.enable { boot.kernelParams = [ - (if cfg.corectrl.enable then "amdgpu.ppfeaturemask=0xffffffff" else "") + (if cfg.enable then "amdgpu.ppfeaturemask=0xffffffff" else null) ]; # Configure programs @@ -30,7 +30,7 @@ in { # Configure polkit security.polkit = { - enable = cfg.corectrl.enablePolkit; + # enable = cfg.corectrl.enablePolkit; extraConfig = '' polkit.addRule(function(action, subject) { if ((action.id == "org.corectrl.helper.init" || @@ -43,5 +43,19 @@ in { }); ''; }; + + # nixpkg is broken so need to manually define + systemd.services.lactd = mkIf cfg.lact.enable { + description = "AMDGPU Control Daemon"; + path = [ pkgs.bash pkgs.lact ]; + script = '' + lact daemon + ''; + wantedBy = [ "multi-user.target" ]; + after = [ "multi-user.target" ]; + }; + + # Configure environment + environment.systemPackages = mkIf cfg.lact.enable [ pkgs.lact ]; }; } diff --git a/share/amd/options.nix b/share/amd/options.nix index efd7a40..09cea98 100644 --- a/share/amd/options.nix +++ b/share/amd/options.nix @@ -17,5 +17,10 @@ with lib; { type = types.str; default = "wheel"; }; + + lact.enable = mkOption { + type = types.bool; + default = false; + }; }; }