1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

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, ...}: {
pkgs,
stateVersion,
...
}: {
imports = [ imports = [
./modules/uid.nix ./modules/uid.nix

View file

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

View file

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

View file

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

View file

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

View file

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