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,7 +29,9 @@ in
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
services.printing.browsing = 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.printing.startWhenNeeded = true; # optional
services.avahi = { services.avahi = {
enable = true; 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"; system = "x86_64-linux";
overlays = [ overlays = [
inputs.nur.overlay 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 = { config = {
allowUnfree = true; allowUnfree = true;
}; };
}; };
base_imports = [ in
{
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 inputs.home-manager.nixosModules.home-manager
./base/default.nix ./base/default.nix
./programs ./programs
]; ] ++ inputs.nixpkgs.lib.optional (builtins.pathExists ./hardware/${name}/${name}.nix) ./hardware/${name}/${name}.nix
in ++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod;
{
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;
}; };
}) [ "marmo" "overheating" "spaceship" ]));
}; };
nixConfig = { 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; device = 1;
}; };
hostname = "marmo"; 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"; scale = "2.0";
hostname = "overheating"; hostname = "overheating";
boot_params = [ "rtc_cmos.use_acpi_alarm=1" ]; 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; 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 = [ imports = [
../../modules/conf.nix ../../modules/conf.nix
@ -12,28 +15,48 @@
}; };
streamdeck.enable = true; streamdeck.enable = true;
hostname = "spaceship"; 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 # monitor left
hardware.xone.enable = true; "1,monitor:DP-2, default:true"
hardware.graphics.extraPackages = with pkgs; [ "5,monitor:DP-2"
libvdpau-va-gl "7,monitor:DP-2"
vaapiVdpau
rocmPackages.clr.icd # monitor right
rocm-opencl-runtime "3,monitor:HDMI-A-1, default:true"
]; ];
hardware.graphics = { hyprpaper = ''
enable = true; #load
enable32Bit = lib.mkDefault true; 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" ];
}; };
networking.firewall = {
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
}; };
} }

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 = imports =
[ [
@ -32,4 +32,29 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.fstrim.enable = lib.mkDefault true; services.fstrim.enable = lib.mkDefault true;
nix.settings.auto-optimise-store = 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 main monitor
''; '';
}; };
scale = lib.mkOption { scale = lib.mkOption {
default = "1.0"; default = "1.0";
example = "1.0"; example = "1.0";
@ -16,9 +17,18 @@
Scale for the monitor Scale for the monitor
''; '';
}; };
battery = lib.mkOption {
ironbar = {
modules = lib.mkOption {
default = [ ]; default = [ ];
example = [ ]; example = [
{ type = "upower"; class = "memory-usage"; }
];
type = with lib.types; listOf attrs;
description = ''
Adds modules to ironbar.
'';
};
}; };
amdGpu = lib.mkOption { amdGpu = lib.mkOption {
@ -33,6 +43,7 @@
boot_params = lib.mkOption { boot_params = lib.mkOption {
default = [ ]; default = [ ];
example = [ "resume=something" ]; example = [ "resume=something" ];
type = with lib.types; listOf str;
description = '' description = ''
Boot params Boot params
''; '';
@ -51,6 +62,7 @@
device = lib.mkOption { device = lib.mkOption {
default = 0; default = 0;
example = 0; example = 0;
type = lib.types.int;
description = '' description = ''
GPU device number GPU device number
''; '';
@ -71,7 +83,7 @@
kernel = lib.mkOption { kernel = lib.mkOption {
default = pkgs.linuxPackages_latest; default = pkgs.linuxPackages_latest;
example = pkgs.linuxPackages_xanmod_latest; example = pkgs.linuxPackages_xanmod_latest;
# type = lib.types.package; type = with lib.types; nullOr attrs;
description = '' description = ''
kernel to be used kernel to be used
''; '';
@ -94,6 +106,47 @@
The username. The username.
''; '';
}; };
hyprland = {
monitor = lib.mkOption {
default = [ ];
example = [
"DP-1,3440x1440@180,2560x0,1,vrr,1"
];
type = with lib.types; listOf str;
description = ''
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 = { 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 playerctl
ncspot ncspot
poppler_utils poppler_utils
neofetch
brave brave
greetd.regreet greetd.regreet
sops sops

View file

@ -1,4 +1,4 @@
{ inputs, pkgs, mod, config, ... }: { inputs, pkgs, config, lib, mod, ... }:
let let
base_imports = [ base_imports = [
inputs.anyrun.homeManagerModules.default inputs.anyrun.homeManagerModules.default
@ -14,7 +14,6 @@ let
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
]; ];
username = config.conf.username;
in in
{ {
xdg.portal.config.common.default = "*"; xdg.portal.config.common.default = "*";
@ -26,12 +25,13 @@ in
}; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.${username} = { home-manager.users.${config.conf.username} = {
imports = [ imports = [
{
_module = { args = { inherit inputs username; }; };
}
./hyprland/default.nix ./hyprland/default.nix
./flatpak.nix ./flatpak.nix
./common.nix ./common.nix
@ -42,7 +42,7 @@ in
./oxi/default.nix ./oxi/default.nix
./themes/default.nix ./themes/default.nix
./individual_configs/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; workspace_swipe = true;
}; };
monitor = config.conf.hyprland.monitor;
workspace = config.conf.hyprland.workspace;
env = [ env = [
"GTK_CSD,0" "GTK_CSD,0"
"TERM,\"kitty /bin/fish\"" "TERM,\"kitty /bin/fish\""
@ -243,7 +246,7 @@
"oxipaste_daemon" "oxipaste_daemon"
"nextcloud --background" "nextcloud --background"
"oxinoti" "oxinoti"
] ++ config.programs.hyprland.extra_autostart; ] ++ config.conf.hyprland.extra_autostart;
# plugin = { # plugin = {
# hyprspace = { # hyprspace = {

View file

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

View file

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