chore: remove last uses of with lib

This commit is contained in:
oddlama 2023-05-08 14:49:28 +02:00
parent 1b9d9fc58a
commit 7ecbb69ff8
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 16 additions and 25 deletions

View file

@ -1,8 +1,4 @@
{
pkgs,
stateVersion,
...
}: {
{pkgs, ...}: {
imports = [
./modules/uid.nix

View file

@ -2,19 +2,18 @@
lib,
pkgs,
...
}:
with lib; {
}: {
# FIXME: ctrl-del not working
# FIXME: DEL also deletes to the left :(
# FIXME: ignore certain history entries (" .*", ...)
programs.fish = {
enable = true;
interactiveShellInit = mkMerge [
(mkBefore ''
interactiveShellInit = lib.mkMerge [
(lib.mkBefore ''
set -g ATUIN_NOBIND true
set -g fish_greeting
'')
(mkAfter ''
(lib.mkAfter ''
bind \cr _atuin_search
atuin gen-completions --shell fish | source

View file

@ -2,11 +2,10 @@
config,
lib,
...
}:
with lib; {
}: {
options = {
home.uid = mkOption {
type = types.int;
home.uid = lib.mkOption {
type = lib.types.int;
example = 1000;
description = "The user's uid.";
};

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
with lib; {
}: {
programs.zsh = {
enable = true;
envExtra = ''
@ -15,11 +14,11 @@ with lib; {
save = 0;
size = 0;
};
initExtra = mkMerge [
(mkBefore ''
initExtra = lib.mkMerge [
(lib.mkBefore ''
unset HISTFILE
'')
(mkAfter (''
(lib.mkAfter (''
function atuin-prefix-search() {
local out
if out=$(${pkgs.sqlite}/bin/sqlite3 -readonly ~/.local/share/atuin/history.db \
@ -31,7 +30,7 @@ with lib; {
fi
}; zle -N atuin-prefix-search
''
+ readFile ./zshrc))
+ lib.readFile ./zshrc))
];
plugins = [
{

View file

@ -5,8 +5,7 @@
secrets,
stateVersion,
...
}:
with lib; let
}: let
inherit (secrets) myuser;
in {
users.groups.${myuser}.gid = config.users.users.${myuser}.uid;
@ -17,7 +16,7 @@ in {
group = myuser;
extraGroups =
["wheel" "input" "video"]
++ optionals config.sound.enable ["audio"];
++ lib.optionals config.sound.enable ["audio"];
isNormalUser = true;
shell = pkgs.zsh;
};

View file

@ -4,8 +4,7 @@
pkgs,
stateVersion,
...
}:
with lib; {
}: {
users.users.root = {
hashedPassword = "$6$EBo/CaxB.dQoq2W8$lo2b5vKgJlLPdGGhEqa08q3Irf1Zd1PcFBCwJOrG8lqjwbABkn1DEhrMh1P3ezwnww2HusUBuZGDSMa4nvSQg1";
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"];