Skip to content

Commit

Permalink
Add desktop config and restructure bin
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jan 12, 2024
1 parent a61a954 commit 7290771
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 53 deletions.
66 changes: 50 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,30 @@
bin,
} @ inputs: let
inherit (self) outputs;
specialArgs = {inherit inputs outputs;};
in {
nixosModules = import ./modules;
homeManagerModules = import ./home-modules;

nixosConfigurations = {
buutti = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [./hosts/buutti/configuration.nix];
};
unikie = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [./hosts/unikie/configuration.nix];
};
x1 = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [./hosts/x1/configuration.nix];
};
zeus = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [./hosts/zeus/configuration.nix];
};
hetzner = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
inherit specialArgs;
modules = [./hosts/hetzner/configuration.nix];
};
};
Expand Down
2 changes: 1 addition & 1 deletion home-modules/imv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
overlay_position_bottom = true;
};
binds = {
"w" = "exec setbg $imv_current_file";
"w" = ''exec setbg "$imv_current_file"'';
"<comma>" = "prev_frame";
};
};
Expand Down
1 change: 1 addition & 0 deletions home-modules/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
--os-format "{3} {12}" \
--memory-format "{/1}{-}{/}{/2}{-}{/}{} / {}"
'';
copy = "xclip -selection clipboard";
};

envExtra = ''
Expand Down
3 changes: 2 additions & 1 deletion hosts/buutti/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
...
}: let
user = "joonas";
system = "x86_64-linux";
in {
imports = lib.flatten [
(with outputs.nixosModules; [
Expand All @@ -17,6 +18,7 @@ in {
bluetooth
gui
work-vpn
(bin {inherit inputs system;})
])
(with inputs.nixos-hardware.nixosModules; [
common-cpu-amd
Expand Down Expand Up @@ -106,6 +108,5 @@ in {
libnotify
]
)
inputs.bin.all
];
}
1 change: 1 addition & 0 deletions hosts/unikie/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ in {
bluetooth
gui
work-vpn
(bin {inherit inputs system;})
])
./hardware-configuration.nix
];
Expand Down
3 changes: 2 additions & 1 deletion hosts/x1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
...
}: let
user = "joonas";
system = "x86_64-linux";
in {
imports = lib.flatten [
(with outputs.nixosModules; [
Expand All @@ -19,6 +20,7 @@ in {
work-vpn
keyd
trackpoint
(bin {inherit inputs system;})
])
(with inputs.nixos-hardware.nixosModules; [
lenovo-thinkpad-x1-11th-gen
Expand Down Expand Up @@ -112,6 +114,5 @@ in {
libnotify
]
)
inputs.bin.all
];
}
72 changes: 65 additions & 7 deletions hosts/zeus/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
...
}: let
user = "joonas";
system = "x86_64-linux";
in {
imports = lib.flatten [
(with outputs.nixosModules; [
Expand All @@ -17,10 +18,15 @@ in {
gui
work-vpn
keyd
(bin {inherit inputs system;})
])
# (with inputs.nixos-hardware.nixosModules; [
# ])
(import ./home.nix {inherit inputs outputs pkgs user;})
(with inputs.nixos-hardware.nixosModules; [
common-cpu-amd
common-gpu-amd
common-pc-ssd
common-pc
])
(import ./home.nix {inherit inputs outputs pkgs user lib;})
./hardware-configuration.nix
];

Expand All @@ -40,13 +46,63 @@ in {
syncthing = {
settings.folders = {
"code".enable = true;
# "notes".enable = true;
# "pictures".enable = true;
# "work".enable = true;
"notes".enable = true;
"pictures".enable = true;
"work".enable = true;
};
};
};

# Enable firmware update
services.fwupd.enable = true;

# better for steam proton games
systemd.extraConfig = "DefaultLimitNOFILE=1048576";

programs.gamemode.enable = true;

# Add opengl/vulkan support
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
libva
];
};

hardware.pulseaudio.daemon.config = {
default-sample-format = "float32le";
};

services.xserver = {
imwheel = {
enable = true;
rules = {
"^discord$" = ''
None, Up, Button4, 3
None, Down, Button5, 3
'';
};
};

libinput = {
enable = true;
mouse.accelProfile = "flat";
};

xrandrHeads = [
{
output = "DP-1";
primary = true;
monitorConfig = ''
Modeline "3440x1440_144.00" 1086.75 3440 3744 4128 4816 1440 1443 1453 1568 -hsync +vsync
Option "PreferredMode" "3440x1440_144.00"
'';
}
];
};

environment.systemPackages = lib.flatten [
(
with pkgs; [
Expand Down Expand Up @@ -89,11 +145,13 @@ in {
rsync
glow # render markdown on the cli
xclip
pciutils
usbutils
vulkan-tools

# libs
libnotify
]
)
inputs.bin.all
];
}
43 changes: 43 additions & 0 deletions hosts/zeus/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

fileSystems = {
"/" = {
device = "tank/root";
fsType = "zfs";
};

"/boot" = {
device = "/dev/disk/by-uuid/8386-EB84";
fsType = "vfat";
};
};

swapDevices = [];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
Loading

0 comments on commit 7290771

Please sign in to comment.