format all code with alejandra
This commit is contained in:
parent
fa0cda2673
commit
4f0d45e4d5
89 changed files with 1605 additions and 1298 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./gui-programs.nix
|
||||
./networking.nix
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
{ pkgs, lib, config, options, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
optional
|
||||
;
|
||||
in
|
||||
{
|
||||
;
|
||||
in {
|
||||
options.my.gui = {
|
||||
enable = mkEnableOption "System has some kind of screen attached";
|
||||
isNvidia = mkEnableOption "System a NVIDIA GPU";
|
||||
|
|
@ -19,8 +24,10 @@ in
|
|||
xserver = {
|
||||
enable = true;
|
||||
# NOTE: could use `mkOptionDefault` but this feels more explicit
|
||||
videoDrivers = if config.my.gui.isNvidia then [ "nvidia" ]
|
||||
else options.services.xserver.videoDrivers.default;
|
||||
videoDrivers =
|
||||
if config.my.gui.isNvidia
|
||||
then ["nvidia"]
|
||||
else options.services.xserver.videoDrivers.default;
|
||||
windowManager.i3.enable = true;
|
||||
layout = "fr";
|
||||
xkbVariant = "us";
|
||||
|
|
@ -31,7 +38,8 @@ in
|
|||
};
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
inherit
|
||||
(pkgs)
|
||||
element-desktop
|
||||
feh
|
||||
firefox
|
||||
|
|
@ -48,7 +56,7 @@ in
|
|||
thunderbird
|
||||
virt-manager
|
||||
zathura
|
||||
;
|
||||
;
|
||||
|
||||
inherit (pkgs.gnome) nautilus;
|
||||
|
||||
|
|
@ -60,11 +68,11 @@ in
|
|||
|
||||
dispatcherScripts = [
|
||||
{
|
||||
source =
|
||||
let
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
nmcli = "${pkgs.networkmanager}/bin/nmcli";
|
||||
in pkgs.writeShellScript "disable_wifi_on_ethernet" ''
|
||||
source = let
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
nmcli = "${pkgs.networkmanager}/bin/nmcli";
|
||||
in
|
||||
pkgs.writeShellScript "disable_wifi_on_ethernet" ''
|
||||
export LC_ALL=C
|
||||
|
||||
enable_disable_wifi ()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
{lib, ...}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
;
|
||||
in {
|
||||
options.my.networking.externalInterface = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixStable;
|
||||
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = [ "@wheel" ];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
trusted-users = ["@wheel"];
|
||||
substituters = [
|
||||
"https://alarsyo.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
gnupg.agent = {
|
||||
|
|
@ -20,8 +19,10 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
inherit
|
||||
(pkgs)
|
||||
# shell usage
|
||||
|
||||
fd
|
||||
ripgrep
|
||||
sd
|
||||
|
|
@ -29,8 +30,8 @@
|
|||
tokei
|
||||
tree
|
||||
wget
|
||||
|
||||
# development
|
||||
|
||||
alejandra
|
||||
git
|
||||
git-crypt
|
||||
|
|
@ -41,8 +42,8 @@
|
|||
pinentry-gnome
|
||||
python3
|
||||
vim
|
||||
|
||||
# terminal utilities
|
||||
|
||||
bottom
|
||||
dogdns
|
||||
du-dust
|
||||
|
|
@ -51,16 +52,16 @@
|
|||
tealdeer
|
||||
unzip
|
||||
zip
|
||||
|
||||
# nix pkgs lookup
|
||||
|
||||
nix-index
|
||||
|
||||
agenix
|
||||
;
|
||||
;
|
||||
|
||||
inherit (pkgs.llvmPackages_11)
|
||||
inherit
|
||||
(pkgs.llvmPackages_11)
|
||||
bintools
|
||||
clang
|
||||
;
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
secrets = config.my.secrets;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
secrets = config.my.secrets;
|
||||
in {
|
||||
users.mutableUsers = false;
|
||||
users.users.root = {
|
||||
passwordFile = config.age.secrets."users/root-hashed-password".path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue