Reducing common
This commit is contained in:
parent
f7baafbc1e
commit
834e4c77ec
7 changed files with 110 additions and 39 deletions
|
@ -112,7 +112,11 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
base = mkNixosSystem "x86_64-linux" [./nixos/base] [outputs.homeManagerModules.base];
|
||||
in {
|
||||
base = base;
|
||||
nixos = base; # alias
|
||||
dragon = mkNixosSystem "x86_64-linux" [./nixos/dragon] (with outputs.homeManagerModules; [
|
||||
dragon
|
||||
]);
|
||||
|
|
5
modules/home-manager/base.nix
Normal file
5
modules/home-manager/base.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{outputs, ...}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
];
|
||||
}
|
|
@ -62,14 +62,15 @@
|
|||
];
|
||||
};
|
||||
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
# TODO: not common?
|
||||
# programs.password-store = {
|
||||
# enable = true;
|
||||
# package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
# };
|
||||
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
};
|
||||
# programs.gitui = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
@ -97,6 +98,7 @@
|
|||
# fileWidgetOptions = ["--preview 'head {}'"];
|
||||
};
|
||||
|
||||
# TODO: regular cron or something?
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
htop = import ./htop.nix;
|
||||
senpai = import ./senpai.nix;
|
||||
|
||||
base = import ./base.nix;
|
||||
dragon = import ./dragon.nix;
|
||||
thinker = import ./thinker.nix;
|
||||
foxtrot = import ./foxtrot.nix;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
output = {
|
||||
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
||||
mode = "3840x2160@120Hz";
|
||||
position = "0,0";
|
||||
position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
||||
};
|
||||
|
||||
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||
|
@ -39,7 +39,7 @@
|
|||
mode = "3840x2160@60Hz";
|
||||
transform = "90";
|
||||
scale = "1.5";
|
||||
position = "3840,0";
|
||||
position = "0,0";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = lib.mkDefault "nixoslyte";
|
||||
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
@ -26,51 +28,51 @@
|
|||
|
||||
systemPackages = with pkgs;
|
||||
[
|
||||
age
|
||||
bat
|
||||
bc
|
||||
bind
|
||||
bottom
|
||||
btrfs-progs
|
||||
cue
|
||||
# age
|
||||
# bat
|
||||
# bc
|
||||
# bind
|
||||
# bottom
|
||||
# btrfs-progs
|
||||
# cue
|
||||
curl
|
||||
dogdns
|
||||
# dogdns
|
||||
dua
|
||||
eza
|
||||
fd
|
||||
file
|
||||
fzf
|
||||
gnumake
|
||||
gron
|
||||
hexyl
|
||||
# gron
|
||||
# hexyl
|
||||
iputils
|
||||
jq
|
||||
# jq
|
||||
killall
|
||||
less
|
||||
mosh
|
||||
nmap
|
||||
# nmap
|
||||
nettools
|
||||
openssl
|
||||
pciutils
|
||||
pv
|
||||
rclone
|
||||
restic
|
||||
# pciutils
|
||||
# pv
|
||||
# rclone
|
||||
# restic
|
||||
ripgrep
|
||||
rsync
|
||||
rtx
|
||||
# rtx
|
||||
sd
|
||||
sops
|
||||
# sops
|
||||
smartmontools
|
||||
sqlite
|
||||
skim
|
||||
sysstat
|
||||
# sqlite
|
||||
# skim
|
||||
# sysstat
|
||||
unzip
|
||||
usbutils
|
||||
watchexec
|
||||
# usbutils
|
||||
# watchexec
|
||||
wget
|
||||
xh
|
||||
# xh
|
||||
zellij
|
||||
zstd
|
||||
# zstd
|
||||
]
|
||||
++ (with inputs.home-manager.packages.${system}; [
|
||||
home-manager
|
||||
|
@ -168,6 +170,7 @@
|
|||
allowedUDPPorts = lib.mkDefault [];
|
||||
};
|
||||
|
||||
# TODO: podman equivalent?
|
||||
extraHosts = ''
|
||||
::1 host.docker.internal
|
||||
127.0.0.1 host.docker.internal
|
||||
|
@ -245,9 +248,10 @@
|
|||
defaultUserShell = pkgs.fish;
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# https://betaflight.com/docs/wiki/archive/Installing-Betaflight#step-1
|
||||
# ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"
|
||||
# ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"'
|
||||
'';
|
||||
# TODO: should not be in common?
|
||||
# services.udev.extraRules = ''
|
||||
# # https://betaflight.com/docs/wiki/archive/Installing-Betaflight#step-1
|
||||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"
|
||||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"'
|
||||
# '';
|
||||
}
|
||||
|
|
55
nixos/base/default.nix
Normal file
55
nixos/base/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
flake,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.disko.nixosModules.disko
|
||||
flake.diskoConfigurations.standard
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
desktop-usage
|
||||
wifi
|
||||
]);
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
# not necessarily "base", but all my machines are UEFI so...
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
Loading…
Reference in a new issue