Compare commits
2 commits
09becef7a9
...
1b71633b9b
Author | SHA1 | Date | |
---|---|---|---|
1b71633b9b | |||
cb0744c298 |
6 changed files with 126 additions and 29 deletions
66
flake.lock
generated
66
flake.lock
generated
|
@ -50,11 +50,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730190761,
|
||||
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=",
|
||||
"lastModified": 1732742778,
|
||||
"narHash": "sha256-i+Uw8VOHzQe9YdNwKRbzvaPWLE07tYVqUDzSFTXhRgk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "3979285062d6781525cded0f6c4ff92e71376b55",
|
||||
"rev": "341482e2f4d888e3f60cae1c12c3df896e7230d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -70,11 +70,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -111,11 +111,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730016908,
|
||||
"narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=",
|
||||
"lastModified": 1732793095,
|
||||
"narHash": "sha256-6TrknJ8CpvSSF4gviQSeD+wyj3siRcMvdBKhOXkEMKU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e83414058edd339148dc142a8437edb9450574c8",
|
||||
"rev": "2f7739d01080feb4549524e8f6927669b61c6ee3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -124,6 +124,35 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprgraphics": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprlock",
|
||||
"hyprutils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprlock",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprlock",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732808127,
|
||||
"narHash": "sha256-jwqYmLVfvoLPu8UScEzZgdbbiNU3ioYcrsthjEEnGqI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "4d927a52be7e15e0846456f2aa1b0ad76b5bf059",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprlang": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
|
@ -155,6 +184,7 @@
|
|||
},
|
||||
"hyprlock": {
|
||||
"inputs": {
|
||||
"hyprgraphics": "hyprgraphics",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"nixpkgs": [
|
||||
|
@ -163,11 +193,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730053985,
|
||||
"narHash": "sha256-jh7PhejwT+XqkkYnpZ6K/Gkqy4tvjN7g/ZBTvlS+Q9Y=",
|
||||
"lastModified": 1732812191,
|
||||
"narHash": "sha256-/gYMXqhjvOcjhaYjzb1iqjpoCDqO5lkkqjG93oMMo60=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlock",
|
||||
"rev": "edbecc87081756b45bdbea16b63e413473659dcd",
|
||||
"rev": "4667f721be47ff6f5cf2a7ee64513f818fb764a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -221,11 +251,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1730161780,
|
||||
"narHash": "sha256-z5ILcmwMtiCoHTXS1KsQWqigO7HJO8sbyK7f7wn9F/E=",
|
||||
"lastModified": 1732483221,
|
||||
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "07d15e8990d5d86a631641b4c429bc0a7400cfb8",
|
||||
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -253,11 +283,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1729880355,
|
||||
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
|
||||
"lastModified": 1732521221,
|
||||
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
|
||||
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mapAttrs;
|
||||
in
|
||||
lib.mkIf osConfig.programs.sway.enable {
|
||||
|
||||
services.swayidle.enable = true;
|
||||
|
@ -199,14 +202,12 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
};
|
||||
#: }}}
|
||||
#: Output {{{
|
||||
output = {
|
||||
eDP-1 = {
|
||||
scale = "2";
|
||||
pos = "0 0";
|
||||
res = "3840x2400";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
};
|
||||
output = mapAttrs (name: value: {
|
||||
scale = toString value.scale;
|
||||
pos = "${toString value.posX} ${toString value.posY}";
|
||||
res = "${toString value.resX}x${toString value.resY}";
|
||||
adaptive_sync = "on";
|
||||
}) osConfig.modules.system.outputs;
|
||||
#: }}}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,9 +32,23 @@
|
|||
};
|
||||
|
||||
modules = {
|
||||
system.networking = {
|
||||
wifi.enable = true;
|
||||
bluetooth.enable = true;
|
||||
system = {
|
||||
outputs = {
|
||||
"DP-2" = {
|
||||
resX = 1920;
|
||||
resY = 1080;
|
||||
};
|
||||
"HDMI-A-1" = {
|
||||
posX = 1920;
|
||||
resX = 1920;
|
||||
resY = 1080;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
wifi.enable = true;
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
@ -81,6 +95,7 @@
|
|||
firefox.enable = true;
|
||||
thunderbird.enable = true;
|
||||
sway.enable = true;
|
||||
hyprland.enable = true;
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
media.enableAll = true;
|
||||
|
||||
system = {
|
||||
outputs = {
|
||||
eDP-1 = {
|
||||
resX = 3840;
|
||||
resY = 2400;
|
||||
scale = 2.0;
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
bluetooth.enable = true;
|
||||
wifi.enable = true;
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
imports = [
|
||||
./networking
|
||||
./roles
|
||||
./outputs.nix
|
||||
];
|
||||
}
|
||||
|
|
43
options/system/outputs.nix
Normal file
43
options/system/outputs.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.types)
|
||||
attrsOf
|
||||
submodule
|
||||
int
|
||||
float
|
||||
str
|
||||
;
|
||||
in
|
||||
{
|
||||
options.modules.system.outputs = mkOption {
|
||||
type = attrsOf (
|
||||
submodule (
|
||||
{ name, config, ... }:
|
||||
{
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = str;
|
||||
default = name;
|
||||
};
|
||||
scale = mkOption {
|
||||
type = float;
|
||||
default = 1.0;
|
||||
};
|
||||
posX = mkOption {
|
||||
type = int;
|
||||
default = 0;
|
||||
};
|
||||
posY = mkOption {
|
||||
type = int;
|
||||
default = 0;
|
||||
};
|
||||
resX = mkOption { type = int; };
|
||||
resY = mkOption { type = int; };
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue