unstable-overlay and hardware encoding #1
19
audio.nix
19
audio.nix
@ -17,18 +17,19 @@
|
||||
spotify
|
||||
];
|
||||
|
||||
hardware.pulseaudio.enable = false; # Use Pipewire, the modern sound subsystem
|
||||
|
||||
security.rtkit.enable = true; # Enable RealtimeKit for audio purposes
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
# Uncomment the following line if you want to use JACK applications
|
||||
# jack.enable = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
# Uncomment the following line if you want to use JACK applications
|
||||
# jack.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
{
|
||||
pkgs,
|
||||
outputs,
|
||||
...
|
||||
}:
|
||||
|
||||
@ -22,6 +23,8 @@
|
||||
./sddm.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
@ -44,6 +47,7 @@
|
||||
# Tells Electron apps to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_CONFIG_PATH = "/etc/nixos";
|
||||
LIBVA_DRIVER_NAME = "iHD"; # For hardware acceleration
|
||||
};
|
||||
|
||||
fonts = {
|
||||
@ -129,7 +133,13 @@
|
||||
|
||||
hardware = {
|
||||
# Enable OpenGL
|
||||
graphics.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||
];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
|
132
flake.lock
generated
132
flake.lock
generated
@ -74,11 +74,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728330715,
|
||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
||||
"lastModified": 1735644329,
|
||||
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
||||
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -125,11 +125,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"lastModified": 1735774679,
|
||||
"narHash": "sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq+raipRI=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"rev": "f2f7418ce0ab4a5309a4596161d154cfc877af66",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -203,18 +203,45 @@
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735882644,
|
||||
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks_2": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"stylix",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"stylix",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734797603,
|
||||
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
|
||||
"lastModified": 1731363552,
|
||||
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
|
||||
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -245,6 +272,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -269,11 +318,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735053786,
|
||||
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
|
||||
"lastModified": 1736013363,
|
||||
"narHash": "sha256-P4lsS2Y5GzBfC8OfXtD/xWEucX6oHGTjOzjEjEJbXfc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
|
||||
"rev": "0d7908bd09165db6699908b7e3970f137327cbf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -290,11 +339,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734862405,
|
||||
"narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=",
|
||||
"lastModified": 1735979091,
|
||||
"narHash": "sha256-WpFjt6+8UD81EP386c269ZTqpEmlGJgcPw+OB4b7EBs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cb27edb5221d2f2920a03155f8becc502cf60e35",
|
||||
"rev": "11ab08541e61ac3bbf2ab27229f68622629401df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -311,11 +360,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733085484,
|
||||
"narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=",
|
||||
"lastModified": 1735774425,
|
||||
"narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163",
|
||||
"rev": "5f6aa268e419d053c3d5025da740e390b12ac936",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -360,11 +409,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733570843,
|
||||
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
|
||||
"lastModified": 1735956190,
|
||||
"narHash": "sha256-svzx3yVXD5tbBJZCn3Lt1RriH8GHo6CyVUPTHejf7sU=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
|
||||
"rev": "3feaf376d75d3d58ebf7e9a4f584d00628548ad9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -375,11 +424,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"lastModified": 1735834308,
|
||||
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -391,16 +440,16 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1732238832,
|
||||
"narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=",
|
||||
"lastModified": 1735648875,
|
||||
"narHash": "sha256-fQ4k/hyQiH9RRPznztsA9kbcDajvwV1sRm01el6Sr3c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
|
||||
"rev": "47e29c20abef74c45322eca25ca1550cdf5c3b50",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@ -420,11 +469,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735254735,
|
||||
"narHash": "sha256-byFeQzjeTLgWkk2xEhTYqYvUsID7H2QAkzuFKIL2Stc=",
|
||||
"lastModified": 1736025907,
|
||||
"narHash": "sha256-OopQbnOMP5YCl2aVEQQmPeze8wDmofZjzU6URCFEPQU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "1671f8618fa347d8a0cd62506df386d58d7608f3",
|
||||
"rev": "e07a482fd86eed90fd9378b97a2f938f07da1499",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -443,11 +492,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733773348,
|
||||
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=",
|
||||
"lastModified": 1735854821,
|
||||
"narHash": "sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9",
|
||||
"rev": "836908e3bddd837ae0f13e215dd48767aee355f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -472,6 +521,7 @@
|
||||
"base16-vim": "base16-vim",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"git-hooks": "git-hooks_2",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
@ -481,11 +531,11 @@
|
||||
"tinted-tmux": "tinted-tmux"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735253599,
|
||||
"narHash": "sha256-aKLAUkdeMH2N5gMDNiOC7KghRNy1necLtLa9+zUcj1g=",
|
||||
"lastModified": 1736011580,
|
||||
"narHash": "sha256-8gmk/i9ZA5C6LGRnqHb5sZ8UKaqT5GnS6XxeSPMSz+s=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "963e77a3a4fc2be670d5a9a6cbeb249b8a43808a",
|
||||
"rev": "7dfcdb410118dcd02ba1d85a2179a6f1c877403f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -582,11 +632,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734704479,
|
||||
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
|
||||
"lastModified": 1735905407,
|
||||
"narHash": "sha256-1hKMRIT+QZNWX46e4gIovoQ7H8QRb7803ZH4qSKI45o=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
|
||||
"rev": "29806abab803e498df96d82dd6f34b32eb8dd2c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
13
flake.nix
13
flake.nix
@ -16,6 +16,7 @@
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self, # Get a ref to outputs
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
stylix,
|
||||
@ -23,12 +24,15 @@
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
inherit (self) outputs;
|
||||
in
|
||||
{
|
||||
# Adds the nix fmt command to format nix files
|
||||
formatter."${system}" = nixpkgs.legacyPackages."${system}".nixfmt-rfc-style;
|
||||
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
specialArgs = { inherit outputs; }; # Pass args to modules
|
||||
modules = [
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
@ -46,5 +50,14 @@
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
|
||||
overlays = {
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
glib
|
||||
adwaita-icon-theme
|
||||
gnomeExtensions.appindicator
|
||||
gnome-extension-manager
|
||||
# gnome-extension-manager
|
||||
loupe
|
||||
gnome-calculator
|
||||
gnome-disk-utility
|
||||
|
@ -1,25 +1,36 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
# Time in seconds
|
||||
lockAfter = 1200;
|
||||
suspendAfter = 7200;
|
||||
in
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # Avoid running multiple instances of hyprlock
|
||||
};
|
||||
|
||||
listener = [
|
||||
# Lock
|
||||
{
|
||||
timeout = 900; # 15 min
|
||||
on-timeout = "hyprlock";
|
||||
timeout = lockAfter;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# Turn off screens TODO buggy main monitor, turns off and on after resume
|
||||
# {
|
||||
# timeout = 120;
|
||||
# on-timeout = "hyprctl dispatch dpms off";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
# Suspend
|
||||
{
|
||||
timeout = suspendAfter;
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
# {
|
||||
# timeout = 1200;
|
||||
# on-timeout = "hyprctl dispatch dpms off";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -253,6 +253,9 @@ misc {
|
||||
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
|
||||
}
|
||||
|
||||
debug {
|
||||
disable_logs = false
|
||||
}
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
@ -392,3 +395,8 @@ windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
|
||||
# Avoid locking in fullscreen
|
||||
windowrulev2 = idleinhibit fullscreen, class:^(*)$
|
||||
windowrulev2 = idleinhibit fullscreen, title:^(*)$
|
||||
windowrulev2 = idleinhibit fullscreen, fullscreen:1
|
||||
|
Loading…
x
Reference in New Issue
Block a user