desktop stuff

This commit is contained in:
mjallen18
2024-03-14 13:11:43 -05:00
parent eceb599970
commit 7e343c4ed7
4 changed files with 72 additions and 16 deletions

View File

@@ -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.
#

View File

@@ -48,6 +48,7 @@
python3
virt-manager
orca-slicer
protonvpn-gui
nixfmt
deadnix
];

View File

@@ -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 ];
};
}

View File

@@ -17,5 +17,10 @@ with lib; {
type = types.str;
default = "wheel";
};
lact.enable = mkOption {
type = types.bool;
default = false;
};
};
}