This commit is contained in:
DashieTM 2024-07-11 01:33:07 +02:00
parent 755392bdb8
commit 27511925f3
22 changed files with 198 additions and 1650 deletions

View file

@ -29,8 +29,8 @@
seahorse
upower
(lib.mkIf config.conf.streamdeck.enable (callPackage
../override/streamdeck.nix
{ }))
../override/streamdeck.nix
{ }))
];
gtk.iconCache.enable = false;

View file

@ -29,7 +29,9 @@ in
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.browsing = true;
services.printing.drivers = [ pkgs.hplip ];
# fucking fun
# TODO: https://github.com/NixOS/nixpkgs/pull/325825 ....
# services.printing.drivers = [ pkgs.hplip ];
services.printing.startWhenNeeded = true; # optional
services.avahi = {
enable = true;

1444
nix/flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -45,45 +45,41 @@
system = "x86_64-linux";
overlays = [
inputs.nur.overlay
# DUDE FOR FUCK SAKE
# https://github.com/NixOS/nixpkgs/pull/325825 ....
# fucking fun
# TODO: https://github.com/NixOS/nixpkgs/pull/325825 ....
(_: prev: {
python312 = prev.python312.override { packageOverrides = _: pysuper: { nose = pysuper.pynose; }; };
})
];
config = {
allowUnfree = true;
};
};
base_imports = [
inputs.home-manager.nixosModules.home-manager
./base/default.nix
./programs
];
in
{
nixosConfigurations."marmo" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs;
mod = ./hardware/marmo/base_config.nix;
};
modules = [
./hardware/marmo/default.nix
] ++ base_imports;
};
nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs;
mod = ./hardware/overheating/base_config.nix;
};
modules = [
./hardware/overheating/default.nix
] ++ base_imports;
};
nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs;
mod = ./hardware/spaceship/base_config.nix;
};
modules = [
./hardware/spaceship/default.nix
] ++ base_imports;
};
nixosConfigurations = (builtins.listToAttrs (map
(name: {
name = name;
value =
let
mod = ./hardware/${name}/configuration.nix;
in
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs mod;
};
modules = [
mod
inputs.home-manager.nixosModules.home-manager
./base/default.nix
./programs
] ++ inputs.nixpkgs.lib.optional (builtins.pathExists ./hardware/${name}/${name}.nix) ./hardware/${name}/${name}.nix
++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod;
};
}) [ "marmo" "overheating" "spaceship" ]));
};
nixConfig = {

View file

@ -1,12 +0,0 @@
{
imports = [
../../modules
];
wayland.windowManager.hyprland.settings.monitor = [
# default
"DP-1,1920x1080@144,0x0,1"
# all others
",highrr,auto,1"
];
conf.monitor = "DP-1";
}

View file

@ -10,5 +10,11 @@
device = 1;
};
hostname = "marmo";
hyprland.monitor = [
# default
"DP-1,1920x1080@144,0x0,1"
# all others
",highrr,auto,1"
];
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./marmo.nix
./configuration.nix
];
}

View file

@ -1,19 +0,0 @@
{
imports = [
../../modules
];
wayland.windowManager.hyprland.settings.monitor = [
# default
"eDP-1,2944x1840@90,0x0,2"
# all others
",highres,auto,1"
];
conf = {
monitor = "eDP-1";
battery = [
{ type = "upower"; class = "memory-usage"; }
];
};
programs.hyprland.extra_autostart = [ "hyprdock --server" ];
}

View file

@ -9,6 +9,19 @@
scale = "2.0";
hostname = "overheating";
boot_params = [ "rtc_cmos.use_acpi_alarm=1" ];
ironbar.modules = [
{ type = "upower"; class = "memory-usage"; }
];
hyprland = {
monitor = [
# default
"eDP-1,2944x1840@90,0x0,2"
# all others
",highres,auto,1"
];
extra_autostart = [ "hyprdock --server" ];
};
};
hardware.bluetooth.enable = true;

View file

@ -1,6 +0,0 @@
{
imports = [
./overheating.nix
./configuration.nix
];
}

View file

@ -1,51 +0,0 @@
{ config, ... }:
let
username = config.conf.username;
in
{
imports = [
../../modules
];
wayland.windowManager.hyprland.settings.monitor = [
# default
"DP-2,2560x1440@165,0x0,1"
"DP-1,3440x1440@180,2560x0,1,vrr,1"
"HDMI-A-1,1920x1200@60,6000x0,1"
"HDMI-A-1,transform,1"
# all others
",highrr,auto,1"
];
wayland.windowManager.hyprland.settings.workspace = [
# workspaces
# monitor middle
"2,monitor:DP-1, default:true"
"4,monitor:DP-1"
"6,monitor:DP-1"
"8,monitor:DP-1"
"9,monitor:DP-1"
"10,monitor:DP-1"
# monitor left
"1,monitor:DP-2, default:true"
"5,monitor:DP-2"
"7,monitor:DP-2"
# monitor right
"3,monitor:HDMI-A-1, default:true"
];
conf.monitor = "DP-1";
programs.hyprland.hyprpaper = ''
#load
preload = /home/${username}/Pictures/backgrounds/shinobu_2k.jpg
preload = /home/${username}/Pictures/backgrounds/shino_wide.png
preload = /home/${username}/Pictures/backgrounds/shinobu_1200.jpg
#set
wallpaper = DP-2,/home/${username}/Pictures/backgrounds/shinobu_2k.jpg
wallpaper = DP-1,/home/${username}/Pictures/backgrounds/shino_wide.png
wallpaper = HDMI-A-1,/home/${username}/Pictures/backgrounds/shinobu_1200.jpg
splash = true
'';
programs.hyprland.extra_autostart = [ "streamdeck -n" ];
}

View file

@ -1,4 +1,7 @@
{ pkgs, lib, ... }:
{ config, ... }:
let
username = config.conf.username;
in
{
imports = [
../../modules/conf.nix
@ -12,28 +15,48 @@
};
streamdeck.enable = true;
hostname = "spaceship";
};
hyprland = {
monitor = [
# default
"DP-2,2560x1440@165,0x0,1"
"DP-1,3440x1440@180,2560x0,1,vrr,1"
"HDMI-A-1,1920x1200@60,6000x0,1"
"HDMI-A-1,transform,1"
virtualisation.virtualbox.host.enable = true;
# all others
",highrr,auto,1"
];
workspace = [
# workspaces
# monitor middle
"2,monitor:DP-1, default:true"
"4,monitor:DP-1"
"6,monitor:DP-1"
"8,monitor:DP-1"
"9,monitor:DP-1"
"10,monitor:DP-1"
# enable hardware acceleration and rocm
hardware.xone.enable = true;
hardware.graphics.extraPackages = with pkgs; [
libvdpau-va-gl
vaapiVdpau
rocmPackages.clr.icd
rocm-opencl-runtime
];
hardware.graphics = {
enable = true;
enable32Bit = lib.mkDefault true;
};
networking.firewall = {
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
# monitor left
"1,monitor:DP-2, default:true"
"5,monitor:DP-2"
"7,monitor:DP-2"
# monitor right
"3,monitor:HDMI-A-1, default:true"
];
hyprpaper = ''
#load
preload = /home/${username}/Pictures/backgrounds/shinobu_2k.jpg
preload = /home/${username}/Pictures/backgrounds/shino_wide.png
preload = /home/${username}/Pictures/backgrounds/shinobu_1200.jpg
#set
wallpaper = DP-2,/home/${username}/Pictures/backgrounds/shinobu_2k.jpg
wallpaper = DP-1,/home/${username}/Pictures/backgrounds/shino_wide.png
wallpaper = HDMI-A-1,/home/${username}/Pictures/backgrounds/shinobu_1200.jpg
splash = true
'';
extra_autostart = [ "streamdeck -n" ];
};
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./spaceship.nix
./configuration.nix
];
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ pkgs, config, lib, modulesPath, ... }:
{
imports =
[
@ -32,4 +32,29 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.fstrim.enable = lib.mkDefault true;
nix.settings.auto-optimise-store = true;
virtualisation.virtualbox.host.enable = true;
# enable hardware acceleration and rocm
hardware.xone.enable = true;
hardware.graphics.extraPackages = with pkgs; [
libvdpau-va-gl
vaapiVdpau
# DUDE FOR FUCK SAKE
# TODO:
# rocmPackages.clr.icd
# rocm-opencl-runtime
];
hardware.graphics = {
enable = true;
enable32Bit = lib.mkDefault true;
};
networking.firewall = {
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
}

View file

@ -8,6 +8,7 @@
main monitor
'';
};
scale = lib.mkOption {
default = "1.0";
example = "1.0";
@ -16,9 +17,18 @@
Scale for the monitor
'';
};
battery = lib.mkOption {
default = [ ];
example = [ ];
ironbar = {
modules = lib.mkOption {
default = [ ];
example = [
{ type = "upower"; class = "memory-usage"; }
];
type = with lib.types; listOf attrs;
description = ''
Adds modules to ironbar.
'';
};
};
amdGpu = lib.mkOption {
@ -33,6 +43,7 @@
boot_params = lib.mkOption {
default = [ ];
example = [ "resume=something" ];
type = with lib.types; listOf str;
description = ''
Boot params
'';
@ -51,6 +62,7 @@
device = lib.mkOption {
default = 0;
example = 0;
type = lib.types.int;
description = ''
GPU device number
'';
@ -71,7 +83,7 @@
kernel = lib.mkOption {
default = pkgs.linuxPackages_latest;
example = pkgs.linuxPackages_xanmod_latest;
# type = lib.types.package;
type = with lib.types; nullOr attrs;
description = ''
kernel to be used
'';
@ -87,13 +99,54 @@
};
username = lib.mkOption {
default = "dashie";
example = "pingpang";
type = lib.types.str;
default = "dashie";
example = "pingpang";
type = lib.types.str;
description = ''
The username.
'';
};
hyprland = {
monitor = lib.mkOption {
default = [ ];
example = [
"DP-1,3440x1440@180,2560x0,1,vrr,1"
];
type = with lib.types; listOf str;
description = ''
The username.
The monitor configuration for hyprland.
'';
};
workspace = lib.mkOption {
default = [ ];
example = [
"2,monitor:DP-1, default:true"
];
type = with lib.types; listOf str;
description = ''
The workspace configuration for hyprland.
'';
};
hyprpaper = lib.mkOption {
default = '''';
example = ''
hyprpaper stuff
'';
type = lib.types.lines;
description = ''
hyprpaper
'';
};
extra_autostart = lib.mkOption {
default = [ ];
example = [ "your application" ];
type = lib.types.listOf lib.types.str;
description = ''
Extra exec_once.
'';
};
};
};
config = {

View file

@ -1,6 +0,0 @@
{
imports = [
./hyprpaper_config.nix
./conf.nix
];
}

View file

@ -1,22 +0,0 @@
{ lib, ... }: {
options.programs.hyprland = {
hyprpaper = lib.mkOption {
default = '''';
example = ''
hyprpaper stuff
'';
type = lib.types.lines;
description = ''
hyprpaper
'';
};
extra_autostart = lib.mkOption {
default = [ ];
example = [ "your application" ];
type = lib.types.listOf lib.types.str;
description = ''
Extra exec_once.
'';
};
};
}

View file

@ -48,7 +48,6 @@ in
playerctl
ncspot
poppler_utils
neofetch
brave
greetd.regreet
sops

View file

@ -1,4 +1,4 @@
{ inputs, pkgs, mod, config, ... }:
{ inputs, pkgs, config, lib, mod, ... }:
let
base_imports = [
inputs.anyrun.homeManagerModules.default
@ -14,7 +14,6 @@ let
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.sops-nix.homeManagerModules.sops
];
username = config.conf.username;
in
{
xdg.portal.config.common.default = "*";
@ -26,12 +25,13 @@ in
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.${username} = {
home-manager.users.${config.conf.username} = {
imports = [
{
_module = { args = { inherit inputs username; }; };
}
./hyprland/default.nix
./flatpak.nix
./common.nix
@ -42,7 +42,7 @@ in
./oxi/default.nix
./themes/default.nix
./individual_configs/default.nix
mod
] ++ base_imports;
] ++ base_imports
++ lib.optional (builtins.pathExists mod) mod;
};
}

View file

@ -178,6 +178,9 @@
workspace_swipe = true;
};
monitor = config.conf.hyprland.monitor;
workspace = config.conf.hyprland.workspace;
env = [
"GTK_CSD,0"
"TERM,\"kitty /bin/fish\""
@ -243,7 +246,7 @@
"oxipaste_daemon"
"nextcloud --background"
"oxinoti"
] ++ config.programs.hyprland.extra_autostart;
] ++ config.conf.hyprland.extra_autostart;
# plugin = {
# hyprspace = {

View file

@ -1,5 +1,5 @@
{ config, ... }: {
xdg.configFile."hypr/hyprpaper.conf" = {
text = config.programs.hyprland.hyprpaper;
text = config.conf.hyprland.hyprpaper;
};
}

View file

@ -146,7 +146,7 @@ in
];
config = {
monitors."${config.conf.monitor}" = {
end = config.conf.battery ++ [
end = config.conf.ironbar.modules ++ [
{
type = "sys_info";
format = [