Archived
0
0
Fork 0

run nix fmt

This commit is contained in:
Daryl Ronningen 2023-01-01 23:09:38 -08:00
parent e3368738e7
commit 3790812dbe
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
15 changed files with 423 additions and 424 deletions

View file

@ -1,5 +1,3 @@
{...}: {...}: {
services.flatpak.enable = true;
{
services.flatpak.enable = true;
} }

View file

@ -1,12 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: {
hardware.opengl.extraPackages = with pkgs; [
{ intel-compute-runtime
hardware.opengl.extraPackages = with pkgs; [ mesa_drivers
intel-compute-runtime vaapiIntel
mesa_drivers vaapiVdpau
vaapiIntel libvdpau-va-gl
vaapiVdpau intel-media-driver
libvdpau-va-gl ];
intel-media-driver
];
} }

View file

@ -1,10 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
fonts = {
{ enableDefaultFonts = true;
fonts = { enableGhostscriptFonts = true;
enableDefaultFonts = true; fontDir.enable = true;
enableGhostscriptFonts = true; fonts = [pkgs.nerdfonts];
fontDir.enable = true; };
fonts = [ pkgs.nerdfonts ];
};
} }

View file

@ -1,14 +1,12 @@
{...}: {...}: {
services = {
{ xserver = {
services = { desktopManager.gnome.enable = true;
xserver = { displayManager.gdm.enable = true;
desktopManager.gnome.enable = true; };
displayManager.gdm.enable = true; gnome = {
}; core-utilities.enable = false;
gnome = { gnome-browser-connector.enable = true;
core-utilities.enable = false; };
gnome-browser-connector.enable = true; };
};
};
} }

View file

@ -1,14 +1,12 @@
{ ... }: {...}: {
sound.enable = true;
{ hardware.pulseaudio.enable = false;
sound.enable = true; security.rtkit.enable = true;
hardware.pulseaudio.enable = false; services.pipewire = {
security.rtkit.enable = true; enable = true;
services.pipewire = { alsa.enable = true;
enable = true; alsa.support32Bit = true;
alsa.enable = true; pulse.enable = true;
alsa.support32Bit = true; jack.enable = true;
pulse.enable = true; };
jack.enable = true;
};
} }

View file

@ -1,9 +1,7 @@
{ pkgs, ... }: {pkgs, ...}: {
services.xserver = {
{ enable = true;
services.xserver = { autorun = true;
enable = true; excludePackages = [pkgs.xterm];
autorun = true; };
excludePackages = [ pkgs.xterm ];
};
} }

View file

@ -1,5 +1,3 @@
{...}: {...}: {
virtualisation.docker.enable = true;
{
virtualisation.docker.enable = true;
} }

View file

@ -1,16 +1,15 @@
{ {
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
}; };
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = ["root" "relms"]; trusted-users = ["root" "relms"];
}; };
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
}; };
} }

View file

@ -1,15 +1,13 @@
{ pkgs, ... }: {pkgs, ...}: {
users.users.relms = {
isNormalUser = true;
description = "Daryl Ronningen";
extraGroups = ["networkmanager" "wheel" "docker" "adbusers"];
shell = pkgs.fish;
};
{ programs = {
users.users.relms = { fish.enable = true;
isNormalUser = true; adb.enable = true;
description = "Daryl Ronningen"; };
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" ];
shell = pkgs.fish;
};
programs = {
fish.enable = true;
adb.enable = true;
};
} }

View file

@ -1,29 +1,27 @@
{pkgs, ...}: {pkgs, ...}: {
boot = {
loader = {
grub = {
enable = true;
device = "nodev";
useOSProber = true;
efiSupport = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
kernelPackages = pkgs.linuxPackages_latest;
};
{ hardware = {
boot = { xpadneo.enable = true;
loader = { };
grub = {
enable = true;
device = "nodev";
useOSProber = true;
efiSupport = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
kernelPackages = pkgs.linuxPackages_latest;
};
hardware = { time.timeZone = "America/Los_Angeles";
xpadneo.enable = true;
};
time.timeZone = "America/Los_Angeles"; zramSwap.enable = true;
zramSwap.enable = true; system.stateVersion = "23.05";
system.stateVersion = "23.05";
} }

View file

@ -1,21 +1,24 @@
{ config, pkgs, lib, ... }:
{ {
networking.hostName = "skynet"; config,
pkgs,
lib,
...
}: {
networking.hostName = "skynet";
services.fprintd.enable = true; services.fprintd.enable = true;
systemd.services.fprintd = { systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
serviceConfig.Type = "simple"; serviceConfig.Type = "simple";
}; };
services.fwupd.enable = true; services.fwupd.enable = true;
services.fwupd.enableTestRemote = true; services.fwupd.enableTestRemote = true;
services.fwupd.extraRemotes = [ "lvfs-testing" ]; services.fwupd.extraRemotes = ["lvfs-testing"];
environment.etc."fwupd/uefi_capsule.conf".text = lib.mkForce '' environment.etc."fwupd/uefi_capsule.conf".text = lib.mkForce ''
[uefi_capsule] [uefi_capsule]
DisableCapsuleUpdateOnDisk=true DisableCapsuleUpdateOnDisk=true
OverrideESPMountPoint=/boot/efi OverrideESPMountPoint=/boot/efi
''; '';
} }

View file

@ -1,30 +1,33 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
kernelModules = []; kernelModules = [];
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = ["kvm-intel"];
extraModulePackages = []; extraModulePackages = [];
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/d0dfd8f7-355c-4d81-a20b-52b522914b96"; device = "/dev/disk/by-uuid/d0dfd8f7-355c-4d81-a20b-52b522914b96";
fsType = "xfs"; fsType = "xfs";
}; };
"/boot/efi" = { "/boot/efi" = {
device = "/dev/disk/by-uuid/FD80-0AEA"; device = "/dev/disk/by-uuid/FD80-0AEA";
fsType = "vfat"; fsType = "vfat";
}; };
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,15 +1,13 @@
{ pkgs, ... }: {pkgs, ...}: {
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "relms";
startMenuLaunchers = true;
nativeSystemd = true;
};
{ networking.hostName = "wsl";
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "relms";
startMenuLaunchers = true;
nativeSystemd = true;
};
networking.hostName = "wsl"; system.stateVersion = "22.11";
system.stateVersion = "22.11";
} }

167
flake.nix
View file

@ -1,87 +1,98 @@
{ {
description = "The nix flake for all my systems"; description = "The nix flake for all my systems";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
neovim.url = "github:neovim/neovim?dir=contrib";
neovim.inputs.nixpkgs.follows = "nixpkgs";
neovim.inputs.flake-utils.follows = "utils";
home-manager.url = "github:nix-community/home-manager"; neovim.url = "github:neovim/neovim?dir=contrib";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; neovim.inputs.nixpkgs.follows = "nixpkgs";
neovim.inputs.flake-utils.follows = "utils";
nur.url = "github:nix-community/NUR"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; nur.url = "github:nix-community/NUR";
nixos-wsl.url = "github:nix-community/nixos-wsl"; utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.inputs.flake-utils.follows = "utils";
};
outputs = { self, nixpkgs, utils, home-manager, neovim, nur, nixos-wsl, ... }: let
modules = {
home = [
./users/relms/home.nix
];
nixos = {
common = [
./common/personal.nix
./common/nix.nix
./devices/common.nix
];
dev = [
./common/dev/docker.nix
];
desktops = {
common = [
./common/desktop/apps.nix
./common/desktop/fonts.nix
./common/desktop/media.nix
./common/desktop/xorg.nix
];
gnome = [
./common/desktop/gnome.nix
];
};
};
};
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [nur.overlay (utils.lib.genPkgOverlay neovim "neovim")];
};
in {
nixosConfigurations = {
skynet = nixpkgs.lib.nixosSystem {
inherit pkgs;
system = "x86_64-linux";
modules =
modules.nixos.common
++ modules.nixos.dev
++ modules.nixos.desktops.common
++ modules.nixos.desktops.gnome
++ [
./common/desktop/drivers/skynet.nix
./devices/skynet/base.nix
./devices/skynet/hardware.nix
];
};
wsl = nixpkgs.lib.nixosSystem { nixos-wsl.url = "github:nix-community/nixos-wsl";
inherit pkgs; nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
system = "x86_64-linux"; nixos-wsl.inputs.flake-utils.follows = "utils";
modules = [ };
nixos-wsl.nixosModules.wsl outputs = {
./common/personal.nix self,
./common/nix.nix nixpkgs,
./devices/wsl/base.nix utils,
]; home-manager,
}; neovim,
}; nur,
nixos-wsl,
...
}: let
modules = {
home = [
./users/relms/home.nix
];
nixos = {
common = [
./common/personal.nix
./common/nix.nix
./devices/common.nix
];
dev = [
./common/dev/docker.nix
];
desktops = {
common = [
./common/desktop/apps.nix
./common/desktop/fonts.nix
./common/desktop/media.nix
./common/desktop/xorg.nix
];
gnome = [
./common/desktop/gnome.nix
];
};
};
};
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [nur.overlay (utils.lib.genPkgOverlay neovim "neovim")];
};
in {
nixosConfigurations = {
skynet = nixpkgs.lib.nixosSystem {
inherit pkgs;
system = "x86_64-linux";
modules =
modules.nixos.common
++ modules.nixos.dev
++ modules.nixos.desktops.common
++ modules.nixos.desktops.gnome
++ [
./common/desktop/drivers/skynet.nix
./devices/skynet/base.nix
./devices/skynet/hardware.nix
];
};
homeConfigurations.relms = home-manager.lib.homeManagerConfiguration { wsl = nixpkgs.lib.nixosSystem {
inherit pkgs; inherit pkgs;
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.wsl
./common/personal.nix
./common/nix.nix
./devices/wsl/base.nix
];
};
};
modules = modules.home; homeConfigurations.relms = home-manager.lib.homeManagerConfiguration {
}; inherit pkgs;
};
modules = modules.home;
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
};
} }

View file

@ -1,201 +1,204 @@
{ lib, config, pkgs, ... }:
{ {
# Home Manager needs a bit of information about you and the lib,
# paths it should manage. config,
home.username = "relms"; pkgs,
home.homeDirectory = "/home/relms"; ...
}: {
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "relms";
home.homeDirectory = "/home/relms";
# Some user packages # Some user packages
home.packages = with pkgs; [ home.packages = with pkgs; [
gnome.nautilus gnome.nautilus
gnome.gnome-tweaks gnome.gnome-tweaks
gnome.gnome-software gnome.gnome-software
adw-gtk3 adw-gtk3
numix-icon-theme-circle numix-icon-theme-circle
gcc12 gcc12
xsel xsel
wget wget
rustup rustup
tree-sitter tree-sitter
]; ];
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards # when a new Home Manager release introduces backwards
# incompatible changes. # incompatible changes.
# #
# You can update Home Manager without changing this value. See # You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "22.11"; home.stateVersion = "22.11";
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.htop.enable = true; programs.htop.enable = true;
programs.hyfetch.enable = true; programs.hyfetch.enable = true;
programs.hyfetch.settings = { programs.hyfetch.settings = {
preset = "genderfluid"; preset = "genderfluid";
mode = "rgb"; mode = "rgb";
color_align = { color_align = {
mode = "horizontal"; mode = "horizontal";
}; };
}; };
programs.exa.enable = true; programs.exa.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
programs.fish.shellAliases = { programs.fish.shellAliases = {
ls = "exa -laFghHUum@ --sort name --group-directories-first --git --icons"; ls = "exa -laFghHUum@ --sort name --group-directories-first --git --icons";
tree = "exa -laFghHUumRT@ --sort name --group-directories-first --git --icons"; tree = "exa -laFghHUumRT@ --sort name --group-directories-first --git --icons";
nixos-rebuild = "sudo nixos-rebuild --flake ~/git/flake#"; nixos-rebuild = "sudo nixos-rebuild --flake ~/git/flake#";
home-manager = "home-manager --flake ~/git/flake#relms"; home-manager = "home-manager --flake ~/git/flake#relms";
}; };
programs.bash.enable = true; programs.bash.enable = true;
programs.bash.enableVteIntegration = true; programs.bash.enableVteIntegration = true;
programs.firefox.enable = true; programs.firefox.enable = true;
programs.firefox.package = pkgs.firefox.override { programs.firefox.package = pkgs.firefox.override {
cfg = { cfg = {
enableGnomeExtensions = true; enableGnomeExtensions = true;
enableTridactylNative = true; enableTridactylNative = true;
}; };
}; };
programs.starship.enable = true; programs.starship.enable = true;
programs.starship.enableFishIntegration = true; programs.starship.enableFishIntegration = true;
programs.starship.enableBashIntegration = true; programs.starship.enableBashIntegration = true;
programs.starship.settings = { programs.starship.settings = {
add_newline = true; add_newline = true;
format = lib.concatStrings [ "$username@$hostname" " " "$directory" " " "$all$character" ]; format = lib.concatStrings ["$username@$hostname" " " "$directory" " " "$all$character"];
right_format = "$cmd_duration"; right_format = "$cmd_duration";
directory = { directory = {
format = "[$path]($style)[$read_only]($read_only_style)"; format = "[$path]($style)[$read_only]($read_only_style)";
read_only = " 🔒"; read_only = " 🔒";
}; };
hostname = { hostname = {
ssh_only = false; ssh_only = false;
format = "[$hostname]($style)"; format = "[$hostname]($style)";
}; };
username = { username = {
show_always = true; show_always = true;
format = "[$user]($style)"; format = "[$user]($style)";
}; };
shell = { shell = {
disabled = false; disabled = false;
}; };
time = { time = {
disabled = false; disabled = false;
}; };
status = { status = {
disabled = false; disabled = false;
}; };
}; };
programs.autorandr.enable = true; programs.autorandr.enable = true;
programs.autorandr.profiles = { programs.autorandr.profiles = {
laptop = { laptop = {
fingerprint = { fingerprint = {
eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb"; eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb";
}; };
config = { config = {
eDP-1 = { eDP-1 = {
enable = true; enable = true;
primary = true; primary = true;
position = "0x0"; position = "0x0";
mode = "2256x1504"; mode = "2256x1504";
crtc = 0; crtc = 0;
rate = "60.00"; rate = "60.00";
transform = [[1.500000 0.000000 0.000000] [0.000000 1.500000 0.000000] [0.000000 0.000000 1.000000]]; transform = [[1.500000 0.000000 0.000000] [0.000000 1.500000 0.000000] [0.000000 0.000000 1.000000]];
}; };
}; };
}; };
}; };
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.gitAndTools.gitFull;
userEmail = "relms@relms.dev"; userEmail = "relms@relms.dev";
userName = "Daryl Ronningen"; userName = "Daryl Ronningen";
delta = { delta = {
enable = true; enable = true;
options = { options = {
navigate = true; navigate = true;
light = false; light = false;
line-numbers = true; line-numbers = true;
side-by-side = true; side-by-side = true;
}; };
}; };
extraConfig = { extraConfig = {
init = { init = {
defaultBranch = "main"; defaultBranch = "main";
}; };
pull = { pull = {
rebase = false; rebase = false;
}; };
credential = { credential = {
helper = "store"; helper = "store";
}; };
core = { core = {
editor = "nvim"; editor = "nvim";
}; };
}; };
signing = { signing = {
signByDefault = true; signByDefault = true;
key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B"; key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B";
}; };
}; };
programs.neovim = { programs.neovim = {
enable = true; enable = true;
package = pkgs.neovim; package = pkgs.neovim;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
withNodeJs = true; withNodeJs = true;
withPython3 = true; withPython3 = true;
withRuby = true; withRuby = true;
}; };
programs.gnome-terminal = { programs.gnome-terminal = {
enable = true; enable = true;
profile = { profile = {
default = { default = {
default = true; default = true;
font = "FiraCode Nerd Font Mono"; font = "FiraCode Nerd Font Mono";
visibleName = "Default"; visibleName = "Default";
}; };
}; };
}; };
programs.direnv.enable = true; programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
programs.lazygit.enable = true; programs.lazygit.enable = true;
programs.lazygit.settings = { programs.lazygit.settings = {
gui = { gui = {
showIcons = true; showIcons = true;
}; };
git = { git = {
paging = { paging = {
colorArg = "always"; colorArg = "always";
pager = "delta --dark --paging=never"; pager = "delta --dark --paging=never";
}; };
commit = { commit = {
signOff = true; signOff = true;
}; };
parseEmoji = true; parseEmoji = true;
}; };
}; };
programs.gpg.enable = true; programs.gpg.enable = true;
services.gpg-agent.enable = true; services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = true; services.gpg-agent.enableSshSupport = true;
services.gpg-agent.pinentryFlavor = "gnome3"; services.gpg-agent.pinentryFlavor = "gnome3";
services.gnome-keyring.enable = true; services.gnome-keyring.enable = true;
services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"]; services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"];
} }