This commit is contained in:
cnst
2024-10-26 19:10:54 +02:00
parent 9e904b70bc
commit 22287da647
13 changed files with 187 additions and 189 deletions

70
flake.lock generated
View File

@@ -154,11 +154,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1729751566, "lastModified": 1729924178,
"narHash": "sha256-99u/hrgBdi8bxSXZc9ZbNkR5EL1htrkbd3lsbKzS60g=", "narHash": "sha256-ZhDqOYZwx0kYg1vPrmZ2fJm/wem739eNSSK+GlzdeqA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "f32a2d484091a6dc98220b1f4a2c2d60b7c97c64", "rev": "e831b4d256526cc56bd37c7c579842866410bebc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -461,11 +461,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729716953, "lastModified": 1729894599,
"narHash": "sha256-FbRKGRRd0amsk/WS/UV9ukJ8jT1dZ2pJBISxkX+uq6A=", "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a4353cc43d1b4dd6bdeacea90eb92a8b7b78a9d7", "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -592,19 +592,17 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1729781453, "lastModified": 1729905757,
"narHash": "sha256-vSZSNXXNEPN5JJcUobCBl6FaDvXjmLHhAJWoX3ZmHUQ=", "narHash": "sha256-4KlQKI/SqiF25pMr7tLZbqHXFdEeoT1KZF+b/6Af7yw=",
"ref": "refs/heads/main", "owner": "hyprwm",
"rev": "3cec45d82113051d35e846e5d80719d8ea0f7002", "repo": "hyprland",
"revCount": 5372, "rev": "0b29caf9ab86518ff474eed5e7d19c12f96ebbd0",
"submodules": true, "type": "github"
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}, },
"original": { "original": {
"submodules": true, "owner": "hyprwm",
"type": "git", "repo": "hyprland",
"url": "https://github.com/hyprwm/Hyprland" "type": "github"
} }
}, },
"hyprland-contrib": { "hyprland-contrib": {
@@ -702,11 +700,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729555766, "lastModified": 1729890296,
"narHash": "sha256-sUIsjWpZLplSJXWyJcDZdvDweksXLH5r9GSkwg0kgBw=", "narHash": "sha256-7xSf7awy/cvYPlky8Bkh69N6eZUpR8PYMH52wJPznQg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlock", "repo": "hyprlock",
"rev": "a093a9eefda2db2430dd1612b2858a55daf14738", "rev": "ae3bb0fd43d6129520ec4b1f022976e7b929dcde",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -736,11 +734,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725200438, "lastModified": 1729890887,
"narHash": "sha256-3Cqu8jz19YyWqhneac6QFfadlyxZ4s3saSLmmpYMOe4=", "narHash": "sha256-Vg98Dm6MaglEUNNTRgLF2Lxy02FrU5ntnlwsMkBSTKg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprpaper", "repo": "hyprpaper",
"rev": "1c18ad65032adb891b341292a1edf9e13adf4751", "rev": "3f8cc92109209364e9d39789b3631e9ac109987a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -976,11 +974,11 @@
}, },
"nixpkgs-small": { "nixpkgs-small": {
"locked": { "locked": {
"lastModified": 1729766066, "lastModified": 1729939720,
"narHash": "sha256-QLeNRaGsoIFfv2Kfd4rw2l1TTDb1i4gQzvClSmrk1l4=", "narHash": "sha256-F7jTiYAxLF0Hcv92Xa5dIufzH1plmS9nbwO50j/9Kxw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8b052aac04356e25b6ec1058c86de8792440362d", "rev": "c93e398e719021a9ad9da56af1589d23029f3cea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1151,11 +1149,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1729788406, "lastModified": 1729953915,
"narHash": "sha256-qLeBo7fvq56YbgHMgV+n8p284WlDoGI5jF8Jnq45+N8=", "narHash": "sha256-h/YwhMlIfFJyNQmbNgkwVyBCF6j0zQAyGaKJM+451VY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "9ffdd336415bc60c0a3341f981d735ab8ef14f95", "rev": "3070deb34475f92fff996245f31a888ca70cfc4f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1247,11 +1245,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1729715509, "lastModified": 1729845655,
"narHash": "sha256-jUDN4e1kObbksb4sc+57NEeujBEDRdLCOu9wiE3RZdM=", "narHash": "sha256-6I3gJLnOLnUIWFUlEnvC0FdzX8Xwu+y3Vo0q4VB6Wbk=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "40492e15d49b89cf409e2c5536444131fac49429", "rev": "f4466718b838de706d74e2c13f20a41c034d87a5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1422,11 +1420,11 @@
}, },
"locked": { "locked": {
"dir": "packaging/nix", "dir": "packaging/nix",
"lastModified": 1729665556, "lastModified": 1729899621,
"narHash": "sha256-eTIvUa/cnwFaR8Em8AfkmgF7wK/d5gyPcWnYH0e+Pdw=", "narHash": "sha256-nyGycAl1Dwa1BO1mCN9+TR26jmdheYHUxEQtBEVuLCc=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "6e8e53c452f06c9932fb9dd9130149414416ade3", "rev": "785bccedbd0e8e9cf5427a511cd935a74d582d06",
"revCount": 823, "revCount": 824,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/" "url": "https://github.com/Open-Wine-Components/umu-launcher/"

View File

@@ -52,7 +52,8 @@
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
# Hyprland environment # Hyprland environment
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "github:hyprwm/hyprland";
hyprland-contrib = { hyprland-contrib = {
url = "github:hyprwm/contrib"; url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "hyprland/nixpkgs"; inputs.nixpkgs.follows = "hyprland/nixpkgs";

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: { {
nixos = { nixos = {
boot = { boot = {
loader = { loader = {
@@ -51,11 +51,7 @@
graphics = { graphics = {
amd = { amd = {
enable = true; enable = true;
extraPackages = false; packageSet = "chaotic";
chaotic = {
enable = true;
extraPackages = true;
};
}; };
nvidia = { nvidia = {
enable = false; enable = false;
@@ -188,7 +184,6 @@
xdg = { xdg = {
enable = true; enable = true;
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
}; };
}; };
utils = { utils = {

View File

@@ -34,11 +34,7 @@
graphics = { graphics = {
amd = { amd = {
enable = true; enable = true;
extraPackages = true; packageSet = "standard";
chaotic = {
enable = false;
extraPackages = false;
};
}; };
nvidia = { nvidia = {
enable = false; enable = false;

View File

@@ -17,12 +17,12 @@
}; };
}; };
gaming = { gaming = {
# steam = { steam = {
# enable = true; enable = true;
# }; };
# gamescope = { gamescope = {
# enable = true; enable = true;
# }; };
lutris = { lutris = {
enable = true; enable = true;
}; };
@@ -135,7 +135,9 @@
}; };
greetd = { greetd = {
enable = true; enable = true;
gnomeKeyring.enable = false; gnomeKeyring = {
enable = false;
};
autologin = { autologin = {
enable = false; enable = false;
user = "toothpick"; user = "toothpick";
@@ -198,7 +200,9 @@
}; };
misc = { misc = {
enable = true; enable = true;
desktop.enable = true; desktop = {
enable = true;
};
}; };
nh = { nh = {
enable = true; enable = true;

View File

@@ -30,7 +30,7 @@ in {
background = [ background = [
{ {
monitor = ""; monitor = "";
path = "~/media/images/dunes.png"; path = "~/media/images/l_int06_big.jpg";
} }
]; ];
input-field = [ input-field = [

View File

@@ -24,6 +24,10 @@ in {
splash_offset = 2.0; splash_offset = 2.0;
preload = [ preload = [
"~/media/images/l_ash08_big.jpg"
"~/media/images/l_ash09_big.jpg"
"~/media/images/l_int06_big.jpg"
"~/media/images/by_housevisit_2560.jpg"
"~/media/images/nix.png" "~/media/images/nix.png"
"~/media/images/stacks.png" "~/media/images/stacks.png"
"~/media/images/ship.png" "~/media/images/ship.png"
@@ -38,9 +42,9 @@ in {
wallpaper = [ wallpaper = [
# cnix # cnix
"DP-3,~/media/images/dunes.png" "DP-3,~/media/images/l_ash08_big.jpg"
# adampad # adampad
"eDP-1,~/media/images/dunes.png" "eDP-1,~/media/images/l_ash08_big.jpg"
# toothpc # toothpc
"DVI-D-1,~/media/images/dunes.png" "DVI-D-1,~/media/images/dunes.png"
# "DP-1,/share/wallpapers/cat_pacman.png" # "DP-1,/share/wallpapers/cat_pacman.png"

View File

@@ -13,6 +13,9 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lutris lutris
bottles
wineWowPackages.waylandFull
wineWowPackages.stagingFull
]; ];
}; };
} }

View File

@@ -4,66 +4,57 @@
lib, lib,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption mkOption mkMerge optional; inherit (lib) mkIf mkOption types mkEnableOption mkMerge;
cfg = config.nixos.hardware.graphics.amd; cfg = config.nixos.hardware.graphics.amd;
in { in {
options = { options = {
nixos.hardware.graphics.amd = { nixos.hardware.graphics.amd = {
enable = mkEnableOption "Enables AMD graphics"; enable = mkEnableOption "AMD graphics support";
extraPackages = mkOption { packageSet = mkOption {
type = lib.types.bool; type = types.enum ["standard" "chaotic" "minimal"];
default = false; default = "minimal";
description = "Whether to install AMD-specific extra packages."; description = ''
}; Which set of AMD graphics packages to use:
- minimal: Only basic drivers and libraries
chaotic = { - standard: Additional AMD-specific tools and utilities
enable = mkEnableOption "Enables chaotic mesa version"; - chaotic: Chaotic Mesa git version with additional optimizations
extraPackages = mkOption { '';
type = lib.types.bool;
default = false;
description = "Whether to install AMD-specific chaotic extra packages.";
};
}; };
}; };
}; };
config = mkIf cfg.enable (mkMerge [ config = mkIf cfg.enable (mkMerge [
{ {
assertions = [ # Base configuration that applies regardless of package set
{
assertion = !(cfg.extraPackages && cfg.chaotic.extraPackages);
message = ''
Only one type of extraPackages can be set to true at the same time.
'';
}
];
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
};
}
extraPackages = optional cfg.extraPackages (with pkgs; [ (mkIf (cfg.packageSet == "standard") {
hardware.graphics = {
extraPackages = with pkgs; [
libva libva
vaapiVdpau vaapiVdpau
libvdpau-va-gl libvdpau-va-gl
amdvlk amdvlk
vulkan-tools vulkan-tools
]); ];
extraPackages32 = with pkgs.pkgsi686Linux; [
extraPackages32 = optional cfg.extraPackages (with pkgs.pkgsi686Linux; [
vaapiVdpau vaapiVdpau
libvdpau-va-gl libvdpau-va-gl
]); ];
}; };
} })
(mkIf cfg.chaotic.enable (mkMerge [
{ (mkIf (cfg.packageSet == "chaotic") {
chaotic.scx.enable = true;
}
(mkIf cfg.chaotic.extraPackages {
chaotic = { chaotic = {
scx.scheduler = "scx_lavd"; scx = {
enable = true;
scheduler = "scx_lavd";
};
mesa-git = { mesa-git = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
@@ -98,6 +89,5 @@ in {
}; };
}; };
}) })
]))
]); ]);
} }

View File

@@ -7,17 +7,13 @@
cfg = config.nixos.hardware.network; cfg = config.nixos.hardware.network;
in { in {
options = { options = {
nixos = { nixos.hardware.network = {
hardware = {
network = {
enable = mkEnableOption "Enable the custom networking module"; enable = mkEnableOption "Enable the custom networking module";
hostName = mkOption { hostName = mkOption {
type = types.str; type = types.str;
default = "default-hostname"; default = "default-hostname";
description = "Hostname for the nixos."; description = "Hostname for the nixos.";
}; };
interfaces = mkOption { interfaces = mkOption {
type = types.attrsOf (types.submodule { type = types.attrsOf (types.submodule {
options = { options = {
@@ -26,6 +22,11 @@ in {
default = []; default = [];
description = "List of allowed TCP ports for this interface."; description = "List of allowed TCP ports for this interface.";
}; };
allowedUDPPorts = mkOption {
type = types.listOf types.int;
default = [];
description = "List of allowed UDP ports for this interface.";
};
}; };
}); });
default = {}; default = {};
@@ -41,10 +42,15 @@ in {
}; };
}; };
}; };
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.interfaces != {} -> config.networking.networkmanager.enable;
message = "Network interfaces configured but NetworkManager is not enabled";
}
];
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
inherit (cfg) hostName; inherit (cfg) hostName;
@@ -54,6 +60,12 @@ in {
inherit (cfg) interfaces; inherit (cfg) interfaces;
}; };
}; };
systemd.services.NetworkManager = {
wants = ["nftables.service"];
after = ["nftables.service"];
};
programs.nm-applet = { programs.nm-applet = {
enable = cfg.nm-applet.enable; enable = cfg.nm-applet.enable;
indicator = cfg.nm-applet.indicator; indicator = cfg.nm-applet.indicator;

View File

@@ -15,11 +15,6 @@ in {
default = true; default = true;
description = "Use xdg-open via the portal."; description = "Use xdg-open via the portal.";
}; };
extraPortals = mkOption {
type = types.listOf types.package;
default = [pkgs.xdg-desktop-portal-gtk];
description = "List of extra portals to include.";
};
}; };
}; };
@@ -28,10 +23,10 @@ in {
enable = true; enable = true;
xdgOpenUsePortal = cfg.xdgOpenUsePortal; xdgOpenUsePortal = cfg.xdgOpenUsePortal;
config = { config = {
common.default = ["gtk"]; common.default = "*";
hyprland.default = ["gtk" "hyprland"]; hyprland.default = ["hyprland" "gtk"];
}; };
extraPortals = cfg.extraPortals; extraPortals = [pkgs.xdg-desktop-portal-gtk];
}; };
}; };
} }

View File

@@ -48,17 +48,17 @@ in {
# enable = true; # enable = true;
# }; # };
# }; # };
gaming = { # gaming = {
steam = { # steam = {
enable = mkForce false; # enable = mkForce false;
}; # };
# mangohud = { # # mangohud = {
# enable = true; # # enable = true;
# # };
# lutris = {
# enable = mkForce false;
# };
# }; # };
lutris = {
enable = mkForce false;
};
};
# cli = { # cli = {
# alacritty = { # alacritty = {
# enable = true; # enable = true;

View File

@@ -34,14 +34,14 @@
enable = true; enable = true;
}; };
}; };
gaming = { # gaming = {
steam = { # steam = {
enable = true; # enable = true;
}; # };
# mangohud = { # mangohud = {
# enable = false; # enable = false;
# }; # };
}; # };
cli = { cli = {
alacritty = { alacritty = {
enable = true; enable = true;