diff options
author | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
commit | c81dc5a13b469c511fac6fa2390b70422d1b4da5 (patch) | |
tree | 4dab5909006ab5c25da6bd9fde6a714c7719ded7 /modules/common | |
parent | 2025-02-17 (diff) |
Diffstat (limited to '')
-rw-r--r-- | modules/common/home-manager.nix | 2 | ||||
-rw-r--r-- | modules/common/secrets.nix | 6 | ||||
-rw-r--r-- | modules/common/security.nix | 21 | ||||
-rw-r--r-- | modules/common/shell/default.nix | 29 | ||||
-rw-r--r-- | modules/common/users.nix | 1 |
5 files changed, 18 insertions, 41 deletions
diff --git a/modules/common/home-manager.nix b/modules/common/home-manager.nix index 31a11f6..54e580d 100644 --- a/modules/common/home-manager.nix +++ b/modules/common/home-manager.nix @@ -6,7 +6,7 @@ }: { imports = [ - inputs.home-manager.nixosModule + inputs.home-manager.nixosModules.home-manager (lib.mkAliasOptionModule [ "hm" ] [ diff --git a/modules/common/secrets.nix b/modules/common/secrets.nix index 2b8082e..600b128 100644 --- a/modules/common/secrets.nix +++ b/modules/common/secrets.nix @@ -21,11 +21,9 @@ config = { age.identityPaths = if this.isHeadful then - [ "${config.my.home}/.ssh/id_${lib.my.ssh.type}" ] + [ "${config.my.home}/.ssh/${this.hostname}_ed25519" ] else - config.services.openssh.hostKeys - |> lib.filter (attr: attr.type == lib.my.ssh.type) - |> map (attr: attr.path); + config.services.openssh.hostKeys |> lib.filter (x: x.type == "ed25519") |> map (x: x.path); environment.systemPackages = with pkgs; [ age diff --git a/modules/common/security.nix b/modules/common/security.nix deleted file mode 100644 index acfc9cc..0000000 --- a/modules/common/security.nix +++ /dev/null @@ -1,21 +0,0 @@ -_: { - security = { - sudo.wheelNeedsPassword = false; - - polkit = { - enable = true; - extraConfig = '' - /* - * Allow members of the wheel group to execute any actions - * without password authentication, similar to "sudo NOPASSWD:". - * - * https://wiki.archlinux.org/title/Polkit#Bypass_password_prompt - */ - polkit.addRule(function(action, subject) { - if (subject.isInGroup('wheel')) - return polkit.Result.YES; - }); - ''; - }; - }; -} diff --git a/modules/common/shell/default.nix b/modules/common/shell/default.nix index 7c6c835..2e81d45 100644 --- a/modules/common/shell/default.nix +++ b/modules/common/shell/default.nix @@ -80,16 +80,17 @@ in let pkg = if this.isHeadful then - pkgs.coreutils.overrideAttrs ( - _: super: { - patches = (super.patches or [ ]) ++ [ - (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/jarun/advcpmv/1e2b1c6b74fa0974896bf94604279a3f74b37a63/advcpmv-0.9-9.5.patch"; - hash = "sha256-LRfb4heZlAUKiXl/hC/HgoqeGMxCt8ruBYZUrbzSH+Y="; - }) - ]; - } - ) + pkgs.coreutils + # pkgs.coreutils.overrideAttrs ( + # _: super: { + # patches = (super.patches or [ ]) ++ [ + # (pkgs.fetchpatch { + # url = "https://raw.githubusercontent.com/jarun/advcpmv/1e2b1c6b74fa0974896bf94604279a3f74b37a63/advcpmv-0.9-9.5.patch"; + # hash = "sha256-LRfb4heZlAUKiXl/hC/HgoqeGMxCt8ruBYZUrbzSH+Y="; + # }) + # ]; + # } + # ) else pkgs.coreutils; in @@ -98,6 +99,8 @@ in ) ( let + # progressBar = lib.optionalString this.isHeadful "--progress-bar"; + mkAlias = { name ? lib.head command, @@ -107,8 +110,6 @@ in inherit name; value = lib.concatStringsSep " " command; }; - - progressBar = lib.optionalString this.isHeadful "--progress-bar"; in [ (mkAlias { @@ -116,14 +117,14 @@ in "cp" "--interactive" "--recursive" - progressBar + # progressBar ]; }) (mkAlias { command = [ "mv" "--interactive" - progressBar + # progressBar ]; }) (mkAlias { diff --git a/modules/common/users.nix b/modules/common/users.nix index ffe6234..c81f2c1 100644 --- a/modules/common/users.nix +++ b/modules/common/users.nix @@ -31,7 +31,6 @@ in description = lib.my.fullname; inherit home; inherit (lib.my) hashedPassword; - openssh.authorizedKeys.keys = [ lib.my.ssh.key ]; extraGroups = [ "wheel" ]; }; }; |