Skip to content

Commit

Permalink
Refactoring and adding config
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Mar 12, 2024
1 parent 64ed797 commit c1abac7
Show file tree
Hide file tree
Showing 24 changed files with 228 additions and 217 deletions.
4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
homeManagerModules = import ./home-modules;

nixosConfigurations = {
unikie = inputs.nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [./hosts/unikie/configuration.nix];
};
x1 = inputs.nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [./hosts/x1/configuration.nix];
Expand Down
3 changes: 2 additions & 1 deletion home-modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
slack
pavucontrol
pcmanfm
ffmpegthumbnailer # video thumbnails
obsidian
gimp
chromium
prusa-slicer
nsxiv

# cli apps
ffmpeg-full
glow # render markdown on the cli
];
}
8 changes: 2 additions & 6 deletions home-modules/discord.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
(discord.override {
withOpenASAR = true;
withVencord = true;
})
];
home.packages = [pkgs.vesktop];

xdg.configFile = {
"Vencord/settings/quickCss.css".text = ''
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
Expand Down
25 changes: 20 additions & 5 deletions home-modules/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
undodir = "/home/${user}/.vim/undodir";
};

files = {
"ftplugin/sh.lua" = {
options = {
expandtab = true;
shiftwidth = 4;
tabstop = 4;
};
};
};

colorschemes.dracula.enable = true;
highlightOverride = {
Normal.bg = "none";
Expand Down Expand Up @@ -206,6 +216,7 @@
sources = {
code_actions = {
statix.enable = true;
refactoring.enable = true;
};
diagnostics = {
deadnix.enable = true;
Expand All @@ -215,7 +226,15 @@
formatting = {
markdownlint.enable = true;
sqlfluff.enable = true;
shfmt.enable = true;
shfmt = {
enable = true;
withArgs = ''
{ extra_args = {
'-i', '4', '-ci'
} }
'';
};
black.enable = true;
stylua.enable = true;
terraform_fmt.enable = true;
};
Expand Down Expand Up @@ -258,10 +277,6 @@
enable = true;
settings.plugins = {
pylint.enabled = true;
pylsp_mypy = {
enabled = true;
live_mode = true;
};
isort.enabled = true;
black.enabled = true;
ruff.enabled = true;
Expand Down
12 changes: 11 additions & 1 deletion home-modules/xdg.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{user, ...}: {
{
user,
pkgs,
...
}: {
xdg = {
enable = true;
userDirs = {
Expand All @@ -18,5 +22,11 @@
exec = ''add-torrent %u'';
mimeType = ["x-scheme-handler/magnet"];
};

desktopEntries."nsxiv" = {
name = "nsxiv";
exec = ''${pkgs.nsxiv}/bin/nsxiv -a %F'';
mimeType = ["image/gif"];
};
};
}
13 changes: 9 additions & 4 deletions hosts/hetzner/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
(modulesPath + "/profiles/qemu-guest.nix")
(with outputs.nixosModules; [
common
syncthing
ssh-access
docker
nginx
ssh-access
syncthing
users
])
inputs.disko.nixosModules.disko
./disk-config.nix
Expand All @@ -32,7 +33,6 @@
};

security.sudo.wheelNeedsPassword = false;
networking.hostName = "hetzner";

systemd.network = {
enable = true;
Expand All @@ -42,9 +42,14 @@
};
};

networking = {
hostName = "hetzner";
useNetworkd = true;
};

environment.systemPackages = with pkgs; [
neovim
git
neovim
busybox
];

Expand Down
36 changes: 0 additions & 36 deletions hosts/unikie/configuration.nix

This file was deleted.

66 changes: 0 additions & 66 deletions hosts/unikie/hardware-configuration.nix

This file was deleted.

25 changes: 19 additions & 6 deletions hosts/x1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
}: {
imports = lib.flatten [
(with outputs.nixosModules; [
bin
bluetooth
bootloader
common
syncthing
docker
bootloader
laptop
bluetooth
fonts
gui
work-vpn
keyd
bin
laptop
networking
sound
syncthing
users
work-vpn
])
(with inputs.nixos-hardware.nixosModules; [
lenovo-thinkpad-x1-11th-gen
Expand All @@ -30,6 +34,15 @@
hostId = "c08d7d71";
};

hardware = {
opengl = {
extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
];
};
};

services = {
syncthing = {
settings.folders = {
Expand Down
2 changes: 1 addition & 1 deletion hosts/x1/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

boot = {
initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
initrd.kernelModules = [];
initrd.kernelModules = ["i915"];
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
Expand Down
19 changes: 12 additions & 7 deletions hosts/zeus/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
inputs,
outputs,
lib,
pkgs,
...
}: {
imports = lib.flatten [
(with outputs.nixosModules; [
bin
bluetooth
bootloader
common
syncthing
docker
bootloader
bluetooth
fonts
gaming
gui
work-vpn
keyd
bin
networking
sound
syncthing
transmission
users
work-vpn
])
(with inputs.nixos-hardware.nixosModules; [
common-cpu-amd
Expand Down Expand Up @@ -46,7 +51,7 @@
"work".enable = true;
};
};
};
};

services.xserver = {
videoDrivers = ["amdgpu"];
Expand Down
5 changes: 4 additions & 1 deletion modules/bluetooth.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
{pkgs, ...}: {
hardware = {
bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
powerOnBoot = false;
settings.General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true;
FastConnectable = true;
};
};
};
Expand Down
5 changes: 4 additions & 1 deletion modules/bootloader.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
boot = {
loader = {
systemd-boot.enable = true;
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi.canTouchEfiVariables = true;
};
};
Expand Down
Loading

0 comments on commit c1abac7

Please sign in to comment.