formatted everything with nixfmt

This commit is contained in:
Gabriella Bere 2024-10-23 21:59:06 +01:00
parent 3675fbdcc1
commit b42a379322
20 changed files with 343 additions and 240 deletions

107
flake.nix
View file

@ -44,55 +44,66 @@
musnix.url = "github:musnix/musnix";
};
outputs = { self, nixpkgs, stablepkgs, home-manager, ... } @ inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
stablepkgs = stablepkgs.legacyPacakges.${system};
in
{
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
# Import nixos modules here
./hosts/gabbielaptop/configuration.nix
./modules/nh.nix
./modules/waydroid.nix
./modules/packages.nix
./modules/aagl.nix
inputs.aagl.nixosModules.default
inputs.lanzaboote.nixosModules.lanzaboote
inputs.musnix.nixosModules.musnix
# inputs.stylix.nixosModules.stylix
{ nix.settings = inputs.aagl.nixConfig; } # Setup cachix for aagl projects
# Imports home-manager module for use within nixos, not reccomended for use WITH standalone version
# inputs.home-manager.nixosModules.default
];
};
nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem {
outputs =
{
self,
nixpkgs,
stablepkgs,
home-manager,
...
}@inputs:
let
system = "x86_64-linux";
modules = [
inputs.disko.nixosModules.disko
inputs.satisfactory-server.nixosModules.satisfactory
./hosts/biggerpi/configuration.nix
./modules/satisfactory-server.nix
];
};
pkgs = nixpkgs.legacyPackages.${system};
stablepkgs = stablepkgs.legacyPacakges.${system};
in
{
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
# Import nixos modules here
./hosts/gabbielaptop/configuration.nix
./modules/nh.nix
./modules/waydroid.nix
./modules/packages.nix
./modules/aagl.nix
inputs.aagl.nixosModules.default
inputs.lanzaboote.nixosModules.lanzaboote
inputs.musnix.nixosModules.musnix
# inputs.stylix.nixosModules.stylix
{ nix.settings = inputs.aagl.nixConfig; } # Setup cachix for aagl projects
# Standalone home-manager config
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs; };
# Import home-manager modules here
modules = [
./home-manager/home.nix
# ./home-manager/librewolf.nix
inputs.flatpaks.homeManagerModules.default
inputs.nixvim.homeManagerModules.default
inputs.stylix.homeManagerModules.stylix # Not compatible with NixOS module as they will interfere with one another, use this when building on a non-NixOS machine
];
# Imports home-manager module for use within nixos, not reccomended for use WITH standalone version
# inputs.home-manager.nixosModules.default
];
};
nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.disko.nixosModules.disko
inputs.satisfactory-server.nixosModules.satisfactory
./hosts/biggerpi/configuration.nix
./modules/satisfactory-server.nix
];
};
# Standalone home-manager config
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
};
# Import home-manager modules here
modules = [
./home-manager/home.nix
# ./home-manager/librewolf.nix
inputs.flatpaks.homeManagerModules.default
inputs.nixvim.homeManagerModules.default
inputs.stylix.homeManagerModules.stylix # Not compatible with NixOS module as they will interfere with one another, use this when building on a non-NixOS machine
];
};
};
};
}

View file

@ -1,3 +1,4 @@
{config, ... }:{
{ config, ... }:
{
programs.git.enable = true;
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
{
home.username = "blue";
@ -10,7 +16,7 @@
./swaync.nix
./flatpak.nix
./sober.nix
# ./librewolf.nix
# ./librewolf.nix
./zsh.nix
./eza.nix
./nixvim.nix
@ -22,31 +28,31 @@
# States home manager version that config was originally compatible with, do not change without reading all patch notes since this version and altering as needed
home.stateVersion = "24.05";
# services.pass-secret-service.enable = true; # for use with protonmail-bridge
# services.pass-secret-service.enable = true; # for use with protonmail-bridge
services.gnome-keyring.enable = true; # used for protonmail-bridge and nextcloud-client
# Cursor configuration that I hope to one day understand, currently has a scaling issue but thats probably my fault
# home.pointerCursor =
# let
# getFrom = url: hash: name: {
# gtk.enable = true;
# x11.enable = true;
# name = name;
# size = 24;
# package =
# pkgs.runCommand "moveUp" {} ''
# mkdir -p $out/share/icons
# ln -s ${pkgs.fetchzip {
# url = url;
# hash = hash;
# }} $out/share/icons/${name}
# '';
# };
# in
# getFrom
# "https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz"
# "sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk="
# "Fuchsia-Pop";
# home.pointerCursor =
# let
# getFrom = url: hash: name: {
# gtk.enable = true;
# x11.enable = true;
# name = name;
# size = 24;
# package =
# pkgs.runCommand "moveUp" {} ''
# mkdir -p $out/share/icons
# ln -s ${pkgs.fetchzip {
# url = url;
# hash = hash;
# }} $out/share/icons/${name}
# '';
# };
# in
# getFrom
# "https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz"
# "sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk="
# "Fuchsia-Pop";
# General use home packages that dont require a separate module
home.packages = with pkgs; [
@ -54,7 +60,7 @@
grimblast
powerline-fonts
nix-output-monitor
# bitwarden-desktop
# bitwarden-desktop
xwaylandvideobridge
virtualbox
wofi
@ -86,33 +92,33 @@
lines = 3;
columns = 200;
};
# font.normal = {
# family = "hack";
# };
# keyboard.bindings = [
# {
# key = "K";
# mods = "Control";
# chars = "\\u000c";
# }
# ];
# font.normal = {
# family = "hack";
# };
# keyboard.bindings = [
# {
# key = "K";
# mods = "Control";
# chars = "\\u000c";
# }
# ];
};
};
# programs.hyprpaper = {
# enable = true;
# settings = {
# ipc = "on";
# splash = false;
# splash_offset = 2.0;
# programs.hyprpaper = {
# enable = true;
# settings = {
# ipc = "on";
# splash = false;
# splash_offset = 2.0;
# preload = [ "~/Pictures/wallpaper.png" ];
# preload = [ "~/Pictures/wallpaper.png" ];
# wallpaper = [
# ",~/Pictures/wallpaper.png"
# ];
# };
# };
# wallpaper = [
# ",~/Pictures/wallpaper.png"
# ];
# };
# };
programs.hyprlock = {
enable = true;
settings = {
@ -142,8 +148,8 @@
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
# placeholder_text = "<span foreground="##cad3f5">Password...</span>";
# shadow_passes = 2;
# placeholder_text = "<span foreground="##cad3f5">Password...</span>";
# shadow_passes = 2;
}
];
};

View file

@ -10,12 +10,11 @@
systemd.enable = true;
settings = {
# Monitor config for home desk layout
monitor =
[
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
"DP-2, 1920x1080@119.98, -960x-1080, auto" # left external monitor
"DP-3, 1920x1080@119.98, 960x-1080, auto" # right external monitor
];
monitor = [
"eDP-2, 2560x1600@165, 0x0, auto" # main laptop monitor
"DP-2, 1920x1080@119.98, -960x-1080, auto" # left external monitor
"DP-3, 1920x1080@119.98, 960x-1080, auto" # right external monitor
];
# Define SUPER key as mod key
"$mod" = "SUPER";
@ -39,24 +38,23 @@
];
# Declare all keybinds
bind =
[
# Keybinds for starting programs
"$mod, F, exec, firefox"
"$mod, 1, exec, alacritty"
"$mod, D, exec, vesktop"
"$mod, space, exec, wofi --show drun, run"
bind = [
# Keybinds for starting programs
"$mod, F, exec, firefox"
"$mod, 1, exec, alacritty"
"$mod, D, exec, vesktop"
"$mod, space, exec, wofi --show drun, run"
# Screenshot tool
", Print, exec, grimblast copy area"
# Screenshot tool
", Print, exec, grimblast copy area"
# Screen locking tool
"$mod, l, exec, hyprlock"
# Screen locking tool
"$mod, l, exec, hyprlock"
# Window management
"$mod, x, killactive"
"$mod, tab, togglefloating"
];
# Window management
"$mod, x, killactive"
"$mod, tab, togglefloating"
];
# Prevent xwayland apps from looking pixellated, cursor scaling to compensate for this is defined in home.nix
xwayland = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, stablepkgs, ... }:
{
config,
pkgs,
stablepkgs,
...
}:
{
programs.librewolf = {
enable = true;

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
services.nextcloud-client = {
enable = true;
startInBackground = true;

View file

@ -1,7 +1,8 @@
{config, pkgs, ... }: {
{ config, pkgs, ... }:
{
programs.nixvim = {
enable = true;
# plugins.neotree.enable = true;
# plugins.neotree.enable = true;
};
}

View file

@ -3,7 +3,7 @@
services.flatpak = {
packages = [
"sober:/root/sober.flatpakref"
# https://sober.vinegarhq.org/sober.flatpakref
# https://sober.vinegarhq.org/sober.flatpakref
];
remotes = {
"sober" = "https://sober.vinegarhq.org/";

View file

@ -1,7 +1,8 @@
{ config, ... }: {
stylix = {
enable = true;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/icy.yaml";
image = ./wallpaper.png;
{ config, ... }:
{
stylix = {
enable = true;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/icy.yaml";
image = ./wallpaper.png;
};
}

View file

@ -1,4 +1,4 @@
{config, pkgs, ...}:
{ config, pkgs, ... }:
{
# Enables swaync and automatically includes systemd user service to auto-start on login, this cannot be disabled so I am using it instead of hyprland exec-once otherwise home-manager complains that the service failed to start
services.swaync = {

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
{
programs.waybar = {
enable = true;
@ -14,17 +20,25 @@
"DP-3"
];
modules-left = [ "wlr/taskbar" ];
modules-center = [ "clock" "custom/swaync" ];
modules-right = [ "pulseaudio/slider" "backlight/slider" "battery" "tray" ];
modules-center = [
"clock"
"custom/swaync"
];
modules-right = [
"pulseaudio/slider"
"backlight/slider"
"battery"
"tray"
];
"clock" = {
"format" = "{:%A %d %b %T}";
# "tooltip" = true;
# "tooltip-format" = "{=%A; %d %B %Y}\n<tt>{calendar}</tt>";
# "tooltip" = true;
# "tooltip-format" = "{=%A; %d %B %Y}\n<tt>{calendar}</tt>";
"interval" = 1;
};
"custom/swaync" = {
"tooltip" = false;
"format"= "{icon} {}";
"format" = "{icon} {}";
"format-icons" = {
"notification" = "🔔<span foreground='red'><sup>🔔</sup></span>";
"none" = "🔔";

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
programs.zsh = {

View file

@ -2,17 +2,25 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./disk-config.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./disk-config.nix
];
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
@ -45,21 +53,21 @@
};
# Define a user account. Don't forget to set a password with passwd. Please change the initialHashedPassword for each deployment to avoid a brute force attack on this password allowing login to the system before an actual password is set.
users.users.blue = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialHashedPassword = "$y$j9T$TbW09JXLRpNJ924xc5JEf1$YNroqf2T7AUnVzKi933eLRUp/0Bez8itOeMYsLw9g3A";
# packages = with pkgs; [
# neovim
# tree
# ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBqczzd/CZJMg+jmxqhl0NS7GTNymsddrxDXyTtoG9zo blue@gabbielaptop"
];
};
users.users.blue = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialHashedPassword = "$y$j9T$TbW09JXLRpNJ924xc5JEf1$YNroqf2T7AUnVzKi933eLRUp/0Bez8itOeMYsLw9g3A";
# packages = with pkgs; [
# neovim
# tree
# ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBqczzd/CZJMg+jmxqhl0NS7GTNymsddrxDXyTtoG9zo blue@gabbielaptop"
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
neovim
@ -89,4 +97,3 @@
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -1,14 +1,26 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

View file

@ -2,17 +2,22 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}:
{
imports =
[
imports = [
./hardware-configuration.nix
];
# Bootloader.
# boot.loader.efi.canTouchEfiVariables = true;
# boot.loader.efi.canTouchEfiVariables = true;
boot = {
initrd.systemd.enable = true;
@ -25,10 +30,13 @@
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# default kernel causes issues with wpa_supplicant meaning shutdown times are > 10 mins updating to kernel 69+ fixes this
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
# I was told that adding these helps but it doesnt seemt to work as monitors are still buggy at 144hz, may as well keep them
boot.kernelParams = [
@ -75,16 +83,16 @@
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
# services.xserver.enable = true;
# services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
# services.desktopManager.plasma6.enable = true;
# services.desktopManager.plasma6.enable = true;
# Enable the Hyprland WM functionality for NixOS (xdg portals etc.)
programs.hyprland.enable = true;
# programs.waybar.enable = true;
# programs.waybar.enable = true;
# Configure keymap in X11
services.xserver.xkb.layout = "gb";
@ -119,40 +127,47 @@
musnix.enable = true;
# pam.services = [
# { name = "gnome_keyring"
# text = ''
# auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# session optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so auto_start
#
# password optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# '';
# }
# ];
# pam.services = [
# { name = "gnome_keyring"
# text = ''
# auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# session optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so auto_start
#
# password optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
# '';
# }
# ];
services.gnome.gnome-keyring.enable = true;
nix.settings.trusted-users = [ "root" "blue" ];
nix.settings.trusted-users = [
"root"
"blue"
];
programs.zsh.enable = true;
users.users.blue = {
isNormalUser = true;
description = "Gabriella Bere";
extraGroups = [ "networkmanager" "wheel" "dialout" "audio" ];
extraGroups = [
"networkmanager"
"wheel"
"dialout"
"audio"
];
shell = pkgs.zsh;
};
# home-manager = {
# extraSpecialArgs = { inherit inputs; };
# users = {
# "blue" = import ../../home-manager/home.nix;
# };
# };
# home-manager = {
# extraSpecialArgs = { inherit inputs; };
# users = {
# "blue" = import ../../home-manager/home.nix;
# };
# };
# Enable fingerprint daemon
services.fprintd.enable = true;
# services.fprintd.tod.enable = true;
# services.fprintd.tod.enable = true;
# Enable bluetooth and blueman
hardware.bluetooth = {
@ -190,15 +205,15 @@
};
# protonmail daemon config
# systemd.user.services.protonmail-bridge = {
# enable = true;
# wantedBy = [ "default.target" ];
# description = "autostart protonmail-bridge on login as a daemon";
# serviceConfig = {
# Type = "simple";
# ExecStart = "${lib.getExe pkgs.protonmail-bridge} --noninteractive --no-window";
# };
# };
# systemd.user.services.protonmail-bridge = {
# enable = true;
# wantedBy = [ "default.target" ];
# description = "autostart protonmail-bridge on login as a daemon";
# serviceConfig = {
# Type = "simple";
# ExecStart = "${lib.getExe pkgs.protonmail-bridge} --noninteractive --no-window";
# };
# };
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.

View file

@ -1,33 +1,49 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c5c7a251-2bd1-4c10-99fa-17069bc66161";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/c5c7a251-2bd1-4c10-99fa-17069bc66161";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3650-CF80";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3650-CF80";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/7b70ea86-8c19-4089-ac1c-0fdcf24bfa8e";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/7b70ea86-8c19-4089-ac1c-0fdcf24bfa8e";
fsType = "ext4";
};
swapDevices = [ ];

View file

@ -1,3 +1,4 @@
{config, ... }: {
{ config, ... }:
{
programs.honkers-railway-launcher.enable = true;
}

View file

@ -1,4 +1,11 @@
{ config, lib, pkgs, stablepkgs, ... }: {
{
config,
lib,
pkgs,
stablepkgs,
...
}:
{
# All packaged needed from nixos-unstable
environment.systemPackages =
(with pkgs; [
@ -41,11 +48,11 @@
ardour
v4l-utils
libreoffice
])
])
++
++
(with stablepkgs; [
# librewolf
]);
(with stablepkgs; [
# librewolf
]);
}

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
services.satisfactory = {
enable = true;

View file

@ -1,7 +1,8 @@
{ config, ... }: {
{ config, ... }:
{
stylix = {
enable = true;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/icy.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/icy.yaml";
stylix.image = /home/blue/Pictures/wallpaper.png;
};
}