formatting

This commit is contained in:
caandt 2024-10-27 12:34:49 -05:00
parent 6d04251eb7
commit e6f2aa347e
24 changed files with 152 additions and 145 deletions

View file

@ -14,12 +14,19 @@
};
};
outputs = { nixpkgs, nixpkgs-stable, home-manager, flake-programs-sqlite, ... }@inputs:
let
outputs = {
nixpkgs,
nixpkgs-stable,
home-manager,
flake-programs-sqlite,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
in with builtins; with nixpkgs.lib.attrsets; {
in
with builtins;
with nixpkgs.lib.attrsets; {
nixosConfigurations = mapAttrs' (host: _: {
name = host;
value = nixpkgs.lib.nixosSystem {
@ -31,9 +38,13 @@
modules = [(./hosts + "/${host}")];
};
}) (readDir ./hosts);
homeConfigurations = foldl' (a: b: a//b) {} (map (host: let users = ./hosts + "/${host}/users"; in
homeConfigurations = foldl' (a: b: a // b) {} (map (
host: let
users = ./hosts + "/${host}/users";
in
if pathExists users
then mapAttrs' (user: _: {
then
mapAttrs' (user: _: {
name = "${user}@${host}";
value = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
@ -41,7 +52,8 @@
inherit pkgs-stable;
};
modules = [(users + "/${user}")];
};}) (readDir users)
};
}) (readDir users)
else {}
) (attrNames (readDir ./hosts)));
};

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
../../system
./hardware-configuration.nix

View file

@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
@ -13,13 +17,13 @@
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/37229430-3b89-413e-9f9d-f36b3d2935bf";
fileSystems."/" = {
device = "/dev/disk/by-uuid/37229430-3b89-413e-9f9d-f36b3d2935bf";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1FF4-8F2A";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/1FF4-8F2A";
fsType = "vfat";
};

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
imports = [
../../../../user
];

View file

@ -1,6 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
imports = [
../common
./hardware-configuration.nix

View file

@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
@ -13,24 +17,24 @@
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6c86675c-7428-4a34-98e2-7fa2b423b53e";
fileSystems."/" = {
device = "/dev/disk/by-uuid/6c86675c-7428-4a34-98e2-7fa2b423b53e";
fsType = "ext4";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/d376771f-3dd5-4d8a-94d3-dcb75aae146d";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/d376771f-3dd5-4d8a-94d3-dcb75aae146d";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4F3D-4702";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4F3D-4702";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/8049404d-f5fb-4387-bb75-f308a7f7126f"; }
swapDevices = [
{device = "/dev/disk/by-uuid/8049404d-f5fb-4387-bb75-f308a7f7126f";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
services.pipewire = {
enable = true;
alsa.enable = true;

View file

@ -1,6 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
programs.bash = {
completion.enable = true;
promptInit = ''PS1="[\u \W] \[\e[32;1m\]\$\[\e[0m\] "'';

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
boot.loader = {
grub.enable = true;
grub.device = "nodev";

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, flake-programs-sqlite, ... }:
{
config,
pkgs,
lib,
flake-programs-sqlite,
...
}: {
nix.settings = {
experimental-features = ["nix-command" "flakes"];
use-xdg-base-directories = true;
@ -36,4 +40,3 @@
system.stateVersion = "24.05";
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./audio.nix
./bash.nix

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
services.xserver = {
enable = true;
autorun = false;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.partition-manager = {
enable = true;
package = pkgs.libsForQt5.partitionmanager;

View file

@ -1,10 +1,11 @@
{ ... }:
{
{...}: {
security.doas = {
enable = true;
extraRules = [
{ groups = [ "wheel" ]; persist = true; }
{
groups = ["wheel"];
persist = true;
}
];
};
security.polkit.enable = true;

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
users.users.ahnwuoa = {
isNormalUser = true;
extraGroups = ["wheel" "podman"];

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
virtualisation.containers.enable = true;
virtualisation = {
podman = {

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
deps = {
bell = [pkgs.pipewire pkgs.libnotify];
nsxiv-rifle = [pkgs.nsxiv];
@ -8,12 +10,14 @@ let
};
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}";
in {
home.file = builtins.listToAttrs (map
home.file = builtins.listToAttrs (
map
(x: {
name = ".local/bin/${x}";
value = {source = mkln x;};
})
(builtins.filter
(
builtins.filter
(x: x != "default.nix")
(builtins.attrNames (builtins.readDir ./.))
)

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./bin
./home.nix

View file

@ -1,6 +1,9 @@
{ config, pkgs, pkgs-stable, ... }:
{
config,
pkgs,
pkgs-stable,
...
}: {
home.packages = with pkgs; [
(pkgs.symlinkJoin {
name = "firefox";

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./nsxiv-rifle.nix
];

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
xdg.desktopEntries."nsxiv-rifle" = {
exec = "nsxiv-rifle %F";
icon = "nsxiv";

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
qt = {
enable = true;
platformTheme.name = "qtct";

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/${x}";
in {
xdg.configFile.alacritty.source = mkln "config/alacritty";
@ -22,7 +24,9 @@ in {
xdg.configFile.readline.source = config/readline;
xdg.configFile."starship.toml".source = config/starship.toml;
xdg.configFile.sx.source = mkln "config/sx";
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile config/tmux/tmux.conf) + ''
xdg.configFile."tmux/tmux.conf".text =
(builtins.readFile config/tmux/tmux.conf)
+ ''
run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp}
run ${pkgs.tmuxPlugins.sessionist.rtp}
'';