Compare commits

..

13 Commits

Author SHA1 Message Date
Giulio De Pasquale
f571e82c28 Merge branch 'master' of ssh://git.giugl.io/peperunas/nixos 2024-07-16 23:49:33 +01:00
Giulio De Pasquale
2baae66b09 fix(helix): fixed python lsp, golangci-lint use repo defaults 2024-07-16 23:47:08 +01:00
Giulio De Pasquale
6e48cac798 Bump lock 2024-07-16 22:59:01 +01:00
Giulio De Pasquale
7859115187 fix(architect): removed junk 2024-07-16 22:01:33 +01:00
Giulio De Pasquale
fa66653655 fix(flake): apply overalays to each pkg group 2024-07-16 22:01:14 +01:00
Giulio De Pasquale
1ebd0a3975 Bump lock 2024-07-13 14:30:22 +01:00
Giulio De Pasquale
f433081a8e fix(nvidia): remove nvidia patch (upcoming sunshine doesn't need it) 2024-07-13 14:27:43 +01:00
Giulio De Pasquale
12eb35233f Revert "Bump lock"
This reverts commit 23d55f00f5.
2024-07-13 14:15:28 +01:00
Giulio De Pasquale
23d55f00f5 Bump lock 2024-07-13 01:19:44 +01:00
Giulio De Pasquale
42f12f6714 fix(flake): revert to master nixpkgs for unstable 2024-06-30 17:45:54 +01:00
Giulio De Pasquale
26eaa20559 fix(helix): add missing language server for Python development
- Added `pyright` to the list of language servers in the Helix configuration
2024-06-30 17:45:40 +01:00
Giulio De Pasquale
63bf91a95a fix(sunshine): error out on scripts 2024-06-30 17:44:43 +01:00
Giulio De Pasquale
e231bb701a fix(libreddit): configure service with default settings and use unstable redlib package 2024-06-30 17:44:30 +01:00
7 changed files with 55 additions and 41 deletions

32
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1717527182,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "845a5c4c073f74105022533907703441e0464bc3",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github"
},
"original": {
@ -24,7 +24,7 @@
"local-unstable": {
"locked": {
"lastModified": 0,
"narHash": "sha256-jZsJ1OJKLBDPlEfP3JMm+268g82AJFG8uIbS77UCzLQ=",
"narHash": "sha256-PARdSJzALMcRaXMHS/dZaJ+NDRQBvAhhPV4Bhlbh9gY=",
"path": "/home/giulio/dev/nixpkgs",
"type": "path"
},
@ -35,27 +35,27 @@
},
"nixos-unstable": {
"locked": {
"lastModified": 1717244666,
"narHash": "sha256-ulXScQazlg5gIPbxQ4ZmxuItAaVS/ECee/tUULu3W3Y=",
"owner": "r-ryantm",
"lastModified": 1721163745,
"narHash": "sha256-YrMzZTjGJk+giMTT+FxOlumSj+8Ph84REHG0dvr0u1Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "239c8ca5385287a05ececa3a029354561b88b9f9",
"rev": "fd29c411f73776b4a10c917e17f25ad0a942173b",
"type": "github"
},
"original": {
"owner": "r-ryantm",
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"rev": "239c8ca5385287a05ececa3a029354561b88b9f9",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1717533996,
"narHash": "sha256-bBHBsdTaxfsldfvTzGGMyq3NCAd+mGjN5GsnL7/D5Kw=",
"lastModified": 1721162132,
"narHash": "sha256-kH2unTqd/LlqG1NGbuUlRkDmXwCf80PNLNCjO3acQqI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce4901de3c01fa0e8de0f92c39e5b585ff83e037",
"rev": "265595f550a572703d10a9db94a9ded793f21dfc",
"type": "github"
},
"original": {
@ -73,11 +73,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1714473972,
"narHash": "sha256-J1o+D45PXCmPZHvGpA8mhzb7BolvBv0wWY8vYo+WMp8=",
"lastModified": 1720463530,
"narHash": "sha256-oHFul4EmOfWVEuo7lbdjSZ6UAzRVOlYMyYj1H4ZTTLk=",
"owner": "icewind1991",
"repo": "nvidia-patch-nixos",
"rev": "0baf075bedfc84dc488000ae6c7cb4ed56967e2f",
"rev": "2877c51b2b40a51a04c432dced00ee280fc932d2",
"type": "github"
},
"original": {

View File

@ -1,7 +1,7 @@
{
inputs = {
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";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
@ -25,23 +25,29 @@
inherit cudaSupport;
allowUnfree = true;
};
extOverlays = [
(nvidia-patch.overlays.default)
];
in
import nixpkgs rec {
inherit system config;
unstablePkgs = import nixos-unstable {
inherit system config;
overlays = extOverlays;
};
localPkgs = import local-unstable {
inherit system config;
overlays = extOverlays;
};
overlays = [
(final: prev: { inherit unstablePkgs; })
(final: prev: { inherit localPkgs; })
(nvidia-patch.overlays.default)
];
] ++ extOverlays;
};
wrapUtils = { pkgs, system }:

View File

@ -84,8 +84,6 @@ in
"ip=${devices.architect.address}::${devices.router.address}:255.255.255.0::${interface}:off"
];
kernelPackages = pkgs.linuxPackages;
kernel.sysctl = { "net.ipv4.ip_forward" = 1; };
loader = {
@ -111,8 +109,6 @@ in
address = devices.architect.address;
prefixLength = 24;
}];
# enp6s0.useDHCP = false;
# wlp4s0.useDHCP = false;
};
extraHosts = (generateDeviceStrings config.architect.networks.lan.devices) + ''
@ -147,8 +143,6 @@ in
das_watchdog.enable = true;
zfs.autoScrub.enable = true;
# TODO: put NVIDIA related in another module
# xserver.videoDrivers = [ "nvidia" ];
openssh = {
enable = true;

View File

@ -1,12 +1,22 @@
{ config, ... }:
{ config, pkgs, ... }:
let
domain = "reddit.giugl.io";
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 = {
enable = true;
port = 9090;
package = pkgs.unstablePkgs.redlib;
};
architect.vhost.${domain} = {

View File

@ -1,9 +1,6 @@
{ config, pkgs, ... }:
let
# nvidia package to patch
nvidiaPackage = config.boot.kernelPackages.nvidiaPackages.latest;
user = "sunshine";
resolutionScript = pkgs.writeTextFile {
name = "sunshine-resolution-script";
@ -20,15 +17,15 @@ let
mode_alias="''${width}x''${height}"
echo "xrandr setting new mode ''${mode_alias} ''${xrandr_mode_str}"
${pkgs.xorg.xrandr}/bin/xrandr --rmmode ''${mode_alias}
${pkgs.xorg.xrandr}/bin/xrandr --newmode ''${mode_alias} ''${xrandr_mode_str}
${pkgs.xorg.xrandr}/bin/xrandr --addmode DP-0 ''${mode_alias}
${pkgs.xorg.xrandr}/bin/xrandr --rmmode ''${mode_alias} || echo error
${pkgs.xorg.xrandr}/bin/xrandr --newmode ''${mode_alias} ''${xrandr_mode_str} || echo error
${pkgs.xorg.xrandr}/bin/xrandr --addmode DP-0 ''${mode_alias} || echo error
# 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.bin}/bin/nvidia-smi --persistence-mode=ENABLED
${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 || echo error
'';
executable = true;
destination = "/bin/resolution.sh";
@ -83,7 +80,6 @@ in
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = with pkgs; nvidia-patch.patch-nvenc (nvidia-patch.patch-fbc nvidiaPackage);
};
};

View File

@ -17,7 +17,6 @@
ydiff
nix-index
pipenv
python3
htop
glances
tree

View File

@ -10,8 +10,14 @@ let
yaml-language-server
typescript-language-server
bash-language-server
pyright
];
py3 = actualPkgs.python3.withPackages (ps: with ps; [
python-lsp-server
python-lsp-ruff
pylsp-rope
rope
]);
in
{
home = {
@ -23,14 +29,13 @@ in
nil
texlab
nixpkgs-fmt
ruff
ruff-lsp
mypy
shellcheck
shfmt
gopls
golangci-lint
golangci-lint-langserver
py3
ruff
gh
gofumpt
] ++ nodePkgs;
@ -70,6 +75,10 @@ in
name = "nix"
formatter = { command = "nixpkgs-fmt" }
[language-server.pylsp.config.pylsp.plugins]
ruff = {enabled = true}
rope = {enabled = true}
[[language]]
name = "bash"
formatter = { command = "shfmt", args = ["-s", "-ci", "-sr"] }