Compare commits
13 Commits
55f370c9d1
...
f571e82c28
Author | SHA1 | Date | |
---|---|---|---|
|
f571e82c28 | ||
|
2baae66b09 | ||
|
6e48cac798 | ||
|
7859115187 | ||
|
fa66653655 | ||
|
1ebd0a3975 | ||
|
f433081a8e | ||
|
12eb35233f | ||
|
23d55f00f5 | ||
|
42f12f6714 | ||
|
26eaa20559 | ||
|
63bf91a95a | ||
|
e231bb701a |
32
flake.lock
generated
32
flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717527182,
|
"lastModified": 1720042825,
|
||||||
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "845a5c4c073f74105022533907703441e0464bc3",
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"local-unstable": {
|
"local-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-jZsJ1OJKLBDPlEfP3JMm+268g82AJFG8uIbS77UCzLQ=",
|
"narHash": "sha256-PARdSJzALMcRaXMHS/dZaJ+NDRQBvAhhPV4Bhlbh9gY=",
|
||||||
"path": "/home/giulio/dev/nixpkgs",
|
"path": "/home/giulio/dev/nixpkgs",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
@ -35,27 +35,27 @@
|
|||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717244666,
|
"lastModified": 1721163745,
|
||||||
"narHash": "sha256-ulXScQazlg5gIPbxQ4ZmxuItAaVS/ECee/tUULu3W3Y=",
|
"narHash": "sha256-YrMzZTjGJk+giMTT+FxOlumSj+8Ph84REHG0dvr0u1Y=",
|
||||||
"owner": "r-ryantm",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "239c8ca5385287a05ececa3a029354561b88b9f9",
|
"rev": "fd29c411f73776b4a10c917e17f25ad0a942173b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "r-ryantm",
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "239c8ca5385287a05ececa3a029354561b88b9f9",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717533996,
|
"lastModified": 1721162132,
|
||||||
"narHash": "sha256-bBHBsdTaxfsldfvTzGGMyq3NCAd+mGjN5GsnL7/D5Kw=",
|
"narHash": "sha256-kH2unTqd/LlqG1NGbuUlRkDmXwCf80PNLNCjO3acQqI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ce4901de3c01fa0e8de0f92c39e5b585ff83e037",
|
"rev": "265595f550a572703d10a9db94a9ded793f21dfc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -73,11 +73,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714473972,
|
"lastModified": 1720463530,
|
||||||
"narHash": "sha256-J1o+D45PXCmPZHvGpA8mhzb7BolvBv0wWY8vYo+WMp8=",
|
"narHash": "sha256-oHFul4EmOfWVEuo7lbdjSZ6UAzRVOlYMyYj1H4ZTTLk=",
|
||||||
"owner": "icewind1991",
|
"owner": "icewind1991",
|
||||||
"repo": "nvidia-patch-nixos",
|
"repo": "nvidia-patch-nixos",
|
||||||
"rev": "0baf075bedfc84dc488000ae6c7cb4ed56967e2f",
|
"rev": "2877c51b2b40a51a04c432dced00ee280fc932d2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
12
flake.nix
12
flake.nix
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
|
||||||
nixos-unstable.url = "github:r-ryantm/nixpkgs/239c8ca5385287a05ececa3a029354561b88b9f9";
|
nixos-unstable.url = "github:NixOS/nixpkgs/master";
|
||||||
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
@ -25,23 +25,29 @@
|
|||||||
inherit cudaSupport;
|
inherit cudaSupport;
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extOverlays = [
|
||||||
|
(nvidia-patch.overlays.default)
|
||||||
|
];
|
||||||
in
|
in
|
||||||
import nixpkgs rec {
|
import nixpkgs rec {
|
||||||
inherit system config;
|
inherit system config;
|
||||||
|
|
||||||
unstablePkgs = import nixos-unstable {
|
unstablePkgs = import nixos-unstable {
|
||||||
inherit system config;
|
inherit system config;
|
||||||
|
|
||||||
|
overlays = extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
localPkgs = import local-unstable {
|
localPkgs = import local-unstable {
|
||||||
inherit system config;
|
inherit system config;
|
||||||
|
overlays = extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: { inherit unstablePkgs; })
|
(final: prev: { inherit unstablePkgs; })
|
||||||
(final: prev: { inherit localPkgs; })
|
(final: prev: { inherit localPkgs; })
|
||||||
(nvidia-patch.overlays.default)
|
] ++ extOverlays;
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wrapUtils = { pkgs, system }:
|
wrapUtils = { pkgs, system }:
|
||||||
|
@ -84,8 +84,6 @@ in
|
|||||||
"ip=${devices.architect.address}::${devices.router.address}:255.255.255.0::${interface}:off"
|
"ip=${devices.architect.address}::${devices.router.address}:255.255.255.0::${interface}:off"
|
||||||
];
|
];
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages;
|
|
||||||
|
|
||||||
kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
|
kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
@ -111,8 +109,6 @@ in
|
|||||||
address = devices.architect.address;
|
address = devices.architect.address;
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}];
|
||||||
# enp6s0.useDHCP = false;
|
|
||||||
# wlp4s0.useDHCP = false;
|
|
||||||
};
|
};
|
||||||
extraHosts = (generateDeviceStrings config.architect.networks.lan.devices) + ''
|
extraHosts = (generateDeviceStrings config.architect.networks.lan.devices) + ''
|
||||||
|
|
||||||
@ -147,8 +143,6 @@ in
|
|||||||
das_watchdog.enable = true;
|
das_watchdog.enable = true;
|
||||||
zfs.autoScrub.enable = true;
|
zfs.autoScrub.enable = true;
|
||||||
|
|
||||||
# TODO: put NVIDIA related in another module
|
|
||||||
# xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1,12 +1,22 @@
|
|||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "reddit.giugl.io";
|
domain = "reddit.giugl.io";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
systemd.services.libreddit.environment = {
|
||||||
|
REDLIB_ROBOTS_DISABLE_INDEXING = "on";
|
||||||
|
REDLIB_DEFAULT_THEME = "dracula";
|
||||||
|
REDLIB_DEFAULT_SHOW_NSFW = "on";
|
||||||
|
REDLIB_DEFAULT_BLUR_NSFW = "off";
|
||||||
|
REDLIB_DEFAULT_USE_HLS = "on";
|
||||||
|
REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on";
|
||||||
|
};
|
||||||
|
|
||||||
services.libreddit = {
|
services.libreddit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 9090;
|
port = 9090;
|
||||||
|
package = pkgs.unstablePkgs.redlib;
|
||||||
};
|
};
|
||||||
|
|
||||||
architect.vhost.${domain} = {
|
architect.vhost.${domain} = {
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# nvidia package to patch
|
|
||||||
nvidiaPackage = config.boot.kernelPackages.nvidiaPackages.latest;
|
|
||||||
|
|
||||||
user = "sunshine";
|
user = "sunshine";
|
||||||
resolutionScript = pkgs.writeTextFile {
|
resolutionScript = pkgs.writeTextFile {
|
||||||
name = "sunshine-resolution-script";
|
name = "sunshine-resolution-script";
|
||||||
@ -20,15 +17,15 @@ let
|
|||||||
mode_alias="''${width}x''${height}"
|
mode_alias="''${width}x''${height}"
|
||||||
|
|
||||||
echo "xrandr setting new mode ''${mode_alias} ''${xrandr_mode_str}"
|
echo "xrandr setting new mode ''${mode_alias} ''${xrandr_mode_str}"
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --rmmode ''${mode_alias}
|
${pkgs.xorg.xrandr}/bin/xrandr --rmmode ''${mode_alias} || echo error
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --newmode ''${mode_alias} ''${xrandr_mode_str}
|
${pkgs.xorg.xrandr}/bin/xrandr --newmode ''${mode_alias} ''${xrandr_mode_str} || echo error
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --addmode DP-0 ''${mode_alias}
|
${pkgs.xorg.xrandr}/bin/xrandr --addmode DP-0 ''${mode_alias} || echo error
|
||||||
|
|
||||||
# Apply new xrandr mode
|
# Apply new xrandr mode
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --mode ''${mode_alias} --pos 0x0 --rotate normal
|
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --mode ''${mode_alias} --pos 0x0 --rotate normal || echo error
|
||||||
|
|
||||||
${config.boot.kernelPackages.nvidia_x11.settings}/bin/nvidia-settings -a 'SyncToVBlank=0'
|
${config.boot.kernelPackages.nvidia_x11.settings}/bin/nvidia-settings -a 'SyncToVBlank=0' || echo error
|
||||||
${config.boot.kernelPackages.nvidia_x11.bin}/bin/nvidia-smi --persistence-mode=ENABLED
|
${config.boot.kernelPackages.nvidia_x11.bin}/bin/nvidia-smi --persistence-mode=ENABLED || echo error
|
||||||
'';
|
'';
|
||||||
executable = true;
|
executable = true;
|
||||||
destination = "/bin/resolution.sh";
|
destination = "/bin/resolution.sh";
|
||||||
@ -83,7 +80,6 @@ in
|
|||||||
powerManagement.finegrained = false;
|
powerManagement.finegrained = false;
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = with pkgs; nvidia-patch.patch-nvenc (nvidia-patch.patch-fbc nvidiaPackage);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
ydiff
|
ydiff
|
||||||
nix-index
|
nix-index
|
||||||
pipenv
|
pipenv
|
||||||
python3
|
|
||||||
htop
|
htop
|
||||||
glances
|
glances
|
||||||
tree
|
tree
|
||||||
|
@ -10,8 +10,14 @@ let
|
|||||||
yaml-language-server
|
yaml-language-server
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
bash-language-server
|
bash-language-server
|
||||||
pyright
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
py3 = actualPkgs.python3.withPackages (ps: with ps; [
|
||||||
|
python-lsp-server
|
||||||
|
python-lsp-ruff
|
||||||
|
pylsp-rope
|
||||||
|
rope
|
||||||
|
]);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
@ -23,14 +29,13 @@ in
|
|||||||
nil
|
nil
|
||||||
texlab
|
texlab
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
ruff
|
|
||||||
ruff-lsp
|
|
||||||
mypy
|
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
gopls
|
gopls
|
||||||
golangci-lint
|
golangci-lint
|
||||||
golangci-lint-langserver
|
golangci-lint-langserver
|
||||||
|
py3
|
||||||
|
ruff
|
||||||
gh
|
gh
|
||||||
gofumpt
|
gofumpt
|
||||||
] ++ nodePkgs;
|
] ++ nodePkgs;
|
||||||
@ -70,6 +75,10 @@ in
|
|||||||
name = "nix"
|
name = "nix"
|
||||||
formatter = { command = "nixpkgs-fmt" }
|
formatter = { command = "nixpkgs-fmt" }
|
||||||
|
|
||||||
|
[language-server.pylsp.config.pylsp.plugins]
|
||||||
|
ruff = {enabled = true}
|
||||||
|
rope = {enabled = true}
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "bash"
|
name = "bash"
|
||||||
formatter = { command = "shfmt", args = ["-s", "-ci", "-sr"] }
|
formatter = { command = "shfmt", args = ["-s", "-ci", "-sr"] }
|
||||||
|
Loading…
Reference in New Issue
Block a user