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, ... }:
{
hardware.opengl.extraPackages = with pkgs; [
intel-compute-runtime
mesa_drivers
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
{pkgs, ...}: {
hardware.opengl.extraPackages = with pkgs; [
intel-compute-runtime
mesa_drivers
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
}

View file

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

View file

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

View file

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

View file

@ -1,9 +1,7 @@
{ pkgs, ... }:
{
services.xserver = {
enable = true;
autorun = true;
excludePackages = [ pkgs.xterm ];
};
{pkgs, ...}: {
services.xserver = {
enable = true;
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 = {
allowUnfree = true;
};
nixpkgs.config = {
allowUnfree = true;
};
nix = {
settings = {
auto-optimise-store = true;
trusted-users = ["root" "relms"];
};
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nix = {
settings = {
auto-optimise-store = true;
trusted-users = ["root" "relms"];
};
extraOptions = ''
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;
};
{
users.users.relms = {
isNormalUser = true;
description = "Daryl Ronningen";
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" ];
shell = pkgs.fish;
};
programs = {
fish.enable = true;
adb.enable = true;
};
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;
};
{
boot = {
loader = {
grub = {
enable = true;
device = "nodev";
useOSProber = true;
efiSupport = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
kernelPackages = pkgs.linuxPackages_latest;
};
hardware = {
xpadneo.enable = true;
};
hardware = {
xpadneo.enable = true;
};
time.timeZone = "America/Los_Angeles";
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;
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
};
services.fprintd.enable = true;
systemd.services.fprintd = {
wantedBy = ["multi-user.target"];
serviceConfig.Type = "simple";
};
services.fwupd.enable = true;
services.fwupd.enableTestRemote = true;
services.fwupd.extraRemotes = [ "lvfs-testing" ];
services.fwupd.enable = true;
services.fwupd.enableTestRemote = true;
services.fwupd.extraRemotes = ["lvfs-testing"];
environment.etc."fwupd/uefi_capsule.conf".text = lib.mkForce ''
[uefi_capsule]
DisableCapsuleUpdateOnDisk=true
OverrideESPMountPoint=/boot/efi
'';
environment.etc."fwupd/uefi_capsule.conf".text = lib.mkForce ''
[uefi_capsule]
DisableCapsuleUpdateOnDisk=true
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 = {
initrd = {
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
kernelModules = [];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [];
};
boot = {
initrd = {
availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
kernelModules = [];
};
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d0dfd8f7-355c-4d81-a20b-52b522914b96";
fsType = "xfs";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/FD80-0AEA";
fsType = "vfat";
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d0dfd8f7-355c-4d81-a20b-52b522914b96";
fsType = "xfs";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/FD80-0AEA";
fsType = "vfat";
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
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;
};
{
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "relms";
startMenuLaunchers = true;
nativeSystemd = true;
};
networking.hostName = "wsl";
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";
inputs = {
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";
description = "The nix flake for all my systems";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
neovim.url = "github:neovim/neovim?dir=contrib";
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";
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
];
};
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
wsl = nixpkgs.lib.nixosSystem {
inherit pkgs;
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.wsl
./common/personal.nix
./common/nix.nix
./devices/wsl/base.nix
];
};
};
nixos-wsl.url = "github:nix-community/nixos-wsl";
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
];
};
homeConfigurations.relms = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
wsl = nixpkgs.lib.nixosSystem {
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
# paths it should manage.
home.username = "relms";
home.homeDirectory = "/home/relms";
lib,
config,
pkgs,
...
}: {
# 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
home.packages = with pkgs; [
gnome.nautilus
gnome.gnome-tweaks
gnome.gnome-software
adw-gtk3
numix-icon-theme-circle
gcc12
xsel
wget
rustup
tree-sitter
];
# Some user packages
home.packages = with pkgs; [
gnome.nautilus
gnome.gnome-tweaks
gnome.gnome-software
adw-gtk3
numix-icon-theme-circle
gcc12
xsel
wget
rustup
tree-sitter
];
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.11";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.htop.enable = true;
programs.htop.enable = true;
programs.hyfetch.enable = true;
programs.hyfetch.settings = {
preset = "genderfluid";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
programs.hyfetch.enable = true;
programs.hyfetch.settings = {
preset = "genderfluid";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
programs.exa.enable = true;
programs.exa.enable = true;
programs.fish.enable = true;
programs.fish.shellAliases = {
ls = "exa -laFghHUum@ --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#";
home-manager = "home-manager --flake ~/git/flake#relms";
};
programs.fish.enable = true;
programs.fish.shellAliases = {
ls = "exa -laFghHUum@ --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#";
home-manager = "home-manager --flake ~/git/flake#relms";
};
programs.bash.enable = true;
programs.bash.enableVteIntegration = true;
programs.bash.enable = true;
programs.bash.enableVteIntegration = true;
programs.firefox.enable = true;
programs.firefox.package = pkgs.firefox.override {
cfg = {
enableGnomeExtensions = true;
enableTridactylNative = true;
};
};
programs.firefox.enable = true;
programs.firefox.package = pkgs.firefox.override {
cfg = {
enableGnomeExtensions = true;
enableTridactylNative = true;
};
};
programs.starship.enable = true;
programs.starship.enableFishIntegration = true;
programs.starship.enableBashIntegration = true;
programs.starship.settings = {
add_newline = true;
format = lib.concatStrings [ "$username@$hostname" " " "$directory" " " "$all$character" ];
right_format = "$cmd_duration";
directory = {
format = "[$path]($style)[$read_only]($read_only_style)";
read_only = " 🔒";
};
hostname = {
ssh_only = false;
format = "[$hostname]($style)";
};
username = {
show_always = true;
format = "[$user]($style)";
};
shell = {
disabled = false;
};
time = {
disabled = false;
};
status = {
disabled = false;
};
};
programs.starship.enable = true;
programs.starship.enableFishIntegration = true;
programs.starship.enableBashIntegration = true;
programs.starship.settings = {
add_newline = true;
format = lib.concatStrings ["$username@$hostname" " " "$directory" " " "$all$character"];
right_format = "$cmd_duration";
directory = {
format = "[$path]($style)[$read_only]($read_only_style)";
read_only = " 🔒";
};
hostname = {
ssh_only = false;
format = "[$hostname]($style)";
};
username = {
show_always = true;
format = "[$user]($style)";
};
shell = {
disabled = false;
};
time = {
disabled = false;
};
status = {
disabled = false;
};
};
programs.autorandr.enable = true;
programs.autorandr.profiles = {
laptop = {
fingerprint = {
eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb";
};
config = {
eDP-1 = {
enable = true;
primary = true;
position = "0x0";
mode = "2256x1504";
crtc = 0;
rate = "60.00";
transform = [[1.500000 0.000000 0.000000] [0.000000 1.500000 0.000000] [0.000000 0.000000 1.000000]];
};
};
};
};
programs.autorandr.enable = true;
programs.autorandr.profiles = {
laptop = {
fingerprint = {
eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb";
};
config = {
eDP-1 = {
enable = true;
primary = true;
position = "0x0";
mode = "2256x1504";
crtc = 0;
rate = "60.00";
transform = [[1.500000 0.000000 0.000000] [0.000000 1.500000 0.000000] [0.000000 0.000000 1.000000]];
};
};
};
};
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userEmail = "relms@relms.dev";
userName = "Daryl Ronningen";
delta = {
enable = true;
options = {
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = false;
};
credential = {
helper = "store";
};
core = {
editor = "nvim";
};
};
signing = {
signByDefault = true;
key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B";
};
};
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userEmail = "relms@relms.dev";
userName = "Daryl Ronningen";
delta = {
enable = true;
options = {
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = false;
};
credential = {
helper = "store";
};
core = {
editor = "nvim";
};
};
signing = {
signByDefault = true;
key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B";
};
};
programs.neovim = {
enable = true;
package = pkgs.neovim;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
};
programs.neovim = {
enable = true;
package = pkgs.neovim;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
};
programs.gnome-terminal = {
enable = true;
profile = {
default = {
default = true;
font = "FiraCode Nerd Font Mono";
visibleName = "Default";
};
};
};
programs.gnome-terminal = {
enable = true;
profile = {
default = {
default = true;
font = "FiraCode Nerd Font Mono";
visibleName = "Default";
};
};
};
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.lazygit.enable = true;
programs.lazygit.settings = {
gui = {
showIcons = true;
};
git = {
paging = {
colorArg = "always";
pager = "delta --dark --paging=never";
};
commit = {
signOff = true;
};
parseEmoji = true;
};
};
programs.lazygit.enable = true;
programs.lazygit.settings = {
gui = {
showIcons = true;
};
git = {
paging = {
colorArg = "always";
pager = "delta --dark --paging=never";
};
commit = {
signOff = true;
};
parseEmoji = true;
};
};
programs.gpg.enable = true;
services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = true;
services.gpg-agent.pinentryFlavor = "gnome3";
programs.gpg.enable = true;
services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = true;
services.gpg-agent.pinentryFlavor = "gnome3";
services.gnome-keyring.enable = true;
services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"];
services.gnome-keyring.enable = true;
services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"];
}