don't set trusted-users AND allowed-users

allowed-users will override trusted-users
This commit is contained in:
Gerg-L 2023-02-15 22:53:36 -05:00
parent dc2db4a9bc
commit 50c3198e03
6 changed files with 29 additions and 23 deletions

12
flake.lock generated
View file

@ -115,11 +115,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1676507325, "lastModified": 1676518424,
"narHash": "sha256-DXQkbOlKV+mYOvxpprWqEKYe3a3K4yHyI6flLyv9mJ8=", "narHash": "sha256-OsJSBwl9Hayh/bmxDtUyxm2U6btaBHuLvviE9KpMmwQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "705cb7dbcb5b9aaf2202ee3493865aec470f4b79", "rev": "a592a97fcedae7a06b8506623b25fd38a032ad13",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,11 +250,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1676345796, "lastModified": 1676518460,
"narHash": "sha256-MmnPogmVVzNRyh2oMfqQAeLTeEFH6pAzDW4AziJ8WXA=", "narHash": "sha256-RS0QNSofkjv+4zpxzgvxJ9yd9syhB9Vv4qMQ7m+DSbc=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"rev": "0a98d7046f0bf7785f38af4eeeefbd1ef39e9476", "rev": "e8c8de7c88722a73e3fa73e35e6af50cf7ccb3ff",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +1,5 @@
{ {
inputs = { inputs = rec {
#channels #channels
master.url = "github:NixOS/nixpkgs"; master.url = "github:NixOS/nixpkgs";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable";

View file

@ -34,12 +34,12 @@
#paste link trick #paste link trick
pastebin = "curl -F 'clbin=<-' https://clbin.com"; pastebin = "curl -F 'clbin=<-' https://clbin.com";
#nix stuff #nix stuff
update = "nix flake update /etc/nixos/#"; nix-update = "nix flake update /etc/nixos/# ";
switch = "nixos-rebuild switch"; nix-switch = "nixos-rebuild switch --use-remote-sudo";
boot = "nixos-rebuild boot"; nix-boot = "nixos-rebuild boot --use-remote-sudo";
clean = "nix-collect-garbage -d"; nix-clean = "nix-collect-garbage -d";
gc-force = "rm /nix/var/nix/gcroots/auto/*"; nix-gc-force = "rm /nix/var/nix/gcroots/auto/*";
gc-check = "find -H /nix/var/nix/gcroots/auto -type l | xargs -I {} sh -c 'readlink {}; realpath {}; echo' | page"; nix-gc-check = "sudo nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
#vim stuff #vim stuff
vi = "nvim"; vi = "nvim";
vim = "nvim"; vim = "nvim";

View file

@ -2,13 +2,9 @@
pkgs, pkgs,
settings, settings,
... ...
}: let }:{
mpkgs = import master {
inherit (pkgs) system;
};
in {
environment.systemPackages = [ environment.systemPackages = [
mpkgs.maim #screenshooter master.legacyPackages.${pkgs.system}.maim #screenshooter
pkgs.brightnessctl #brightness control for laptop pkgs.brightnessctl #brightness control for laptop
pkgs.playerctl #music control pkgs.playerctl #music control
pkgs.xclip pkgs.xclip

View file

@ -26,7 +26,7 @@ _: {
}; };
}; };
environment = { environment = {
systemPackages = with pkgs; [virt-manager]; systemPackages = [pkgs.virt-manager];
shellAliases = { shellAliases = {
vm-start = "virsh start Windows"; vm-start = "virsh start Windows";
vm-stop = "virsh shutdown Windows"; vm-stop = "virsh shutdown Windows";

16
nix.nix
View file

@ -1,4 +1,8 @@
{nix, ...}: { {
nix,
unstable,
...
}: {
inputs, inputs,
lib, lib,
pkgs, pkgs,
@ -6,7 +10,7 @@
... ...
}: { }: {
nix = { nix = {
package = lib.mkDefault nix.packages.${pkgs.system}.nix; package = nix.packages.${pkgs.system}.nix;
#automatically get registry from input flakes #automatically get registry from input flakes
registry = registry =
( (
@ -25,7 +29,7 @@
) )
// {system = {flake = self;};}; // {system = {flake = self;};};
#automatically add registry entries to nixPath #automatically add registry entries to nixPath
nixPath = (lib.mapAttrsToList (name: value: name + "=" + value) inputs) ++ [("system=" + ./.)]; nixPath = (lib.mapAttrsToList (name: value: name + "=" + value) inputs) ++ ["system=${self}" "nixpkgs=${unstable}"];
settings = { settings = {
experimental-features = ["nix-command" "flakes" "repl-flake"]; experimental-features = ["nix-command" "flakes" "repl-flake"];
auto-optimise-store = true; auto-optimise-store = true;
@ -33,6 +37,12 @@
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}''; flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
keep-outputs = true; keep-outputs = true;
keep-derivations = true; keep-derivations = true;
trusted-users = [
"root"
"@wheel"
];
allowed-users = [
];
}; };
}; };
environment.etc."booted-system".source = self; environment.etc."booted-system".source = self;