Skip to content

Commit

Permalink
feat: better polkit config
Browse files Browse the repository at this point in the history
  • Loading branch information
Suya1671 committed May 31, 2024
1 parent fda48f0 commit 1fb31bc
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 69 deletions.
84 changes: 42 additions & 42 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions systems/GAMER-PC/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
glib-networking.enable = true;
};

udev.packages = with pkgs; [
gnome.gnome-settings-daemon
];

openssh = {
enable = true;
# require public key authentication for better security
Expand Down
5 changes: 5 additions & 0 deletions systems/GAMER-PC/hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
fsType = "vfat";
};

fileSystems."/mnt/BulkStorage" = {
device = "/dev/disk/by-uuid/36F2637DF263406B";
fsType = "ntfs";
};

# 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
Expand Down
29 changes: 28 additions & 1 deletion systems/modules/core/security.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{...}: {
{pkgs, ...}: {
security.pam.loginLimits = [
# Unlimited amount of processes for root
{
Expand All @@ -13,4 +13,31 @@
value = "unlimited";
}
];

security.polkit.enable = true;

systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};

services.udev.packages = with pkgs; [
gnome.gnome-settings-daemon
qmk-udev-rules
vial
];

# add nushell to list of valid shells
environment.shells = [ pkgs.nushell ];
}
2 changes: 1 addition & 1 deletion systems/modules/niri.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
enable = true;
package = pkgs.niri-unstable;
};

systemd.user.services.niri-flake-polkit.enable = false;
services.gnome.sushi.enable = true;
}
42 changes: 21 additions & 21 deletions users/modules/helix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@
"ui.virtual.inlay-hint.type" = { fg = "base04"; };
"ui.virtual.jump-label" = { fg = "base0F"; };
};
languages = {
language-server.copilot = {
command = "${pkgs.helix-gpt}/bin/helix-gpt --handler copilot --copilotKey $(cat /run/secrets/copilot/key)";
};
# languages = {
# language-server.copilot = {
# command = "${pkgs.helix-gpt}/bin/helix-gpt --handler copilot --copilotKey $(cat /run/secrets/copilot/key)";
# };

language = [
{
name = "rust";
language-servers = [
"rust-analyzer"
"copilot"
];
}
{
name = "typescript";
language-servers = [
"typescript-language-server"
"copilot"
];
}
];
};
# language = [
# {
# name = "rust";
# language-servers = [
# "rust-analyzer"
# "copilot"
# ];
# }
# {
# name = "typescript";
# language-servers = [
# "typescript-language-server"
# "copilot"
# ];
# }
# ];
# };
settings = {
theme = lib.mkForce "stylix-edit";
editor = {
Expand Down

0 comments on commit 1fb31bc

Please sign in to comment.