some more adjustments, tried to get vs code to work

This commit is contained in:
Remy Moll 2025-05-21 17:30:31 +02:00
parent d91ebe083d
commit b24d0f466a
19 changed files with 259 additions and 107 deletions

View File

@ -75,3 +75,6 @@ TODO - disable root user
- https://copeberg.org/bloxx12/nichts - https://copeberg.org/bloxx12/nichts
- https://github.com/fufexan/dotfiles - https://github.com/fufexan/dotfiles
- https://github.com/spikespaz/dotfiles - https://github.com/spikespaz/dotfiles
- https://github.com/luisnquin/nixos-config
- https://gitlab.com/fisuri/dotfiles
- https://github.com/NobbZ/nixos-config

139
flake.lock generated
View File

@ -100,25 +100,6 @@
"type": "github" "type": "github"
} }
}, },
"better-control": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1747462495,
"narHash": "sha256-1tL0AwbfmjWri0kBGEdc/vtoeFivfZe/Q5O+QCMpu5M=",
"owner": "rishabh5321",
"repo": "better-control-flake",
"rev": "e3d54fad4ada7dab63e1862f21fc2419378e1cb0",
"type": "github"
},
"original": {
"owner": "rishabh5321",
"repo": "better-control-flake",
"type": "github"
}
},
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -168,24 +149,6 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": [ "systems": [
"stylix", "stylix",
@ -352,6 +315,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_3": {
"inputs": {
"nixpkgs": [
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1747747328,
"narHash": "sha256-3Gc5CqAJqpvI4gIU1Oxbl5w440b+rY9HvDzs5C0ChBA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "65d2282ff6cf560f54997013bd1e575fbd0a7ebf",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@ -420,9 +404,9 @@
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2", "systems": "systems",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
@ -660,22 +644,6 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1747327360,
"narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1747335874, "lastModified": 1747335874,
"narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=", "narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=",
@ -691,7 +659,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1743703532, "lastModified": 1743703532,
"narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=",
@ -732,13 +700,14 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"better-control": "better-control",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"stylix": "stylix" "stylix": "stylix",
"superfreq": "superfreq",
"zen-browser": "zen-browser"
} }
}, },
"stylix": { "stylix": {
@ -749,12 +718,12 @@
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_3",
"systems": "systems_3", "systems": "systems_2",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux" "tinted-tmux": "tinted-tmux"
@ -774,22 +743,27 @@
"type": "github" "type": "github"
} }
}, },
"systems": { "superfreq": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1747578749,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-MR8NuCe3Xq2MNLPdKE3+4VVw2e+UlwwDTM3U3RMJRig=",
"owner": "nix-systems", "owner": "NotAShelf",
"repo": "default", "repo": "superfreq",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "6bdbc7e0ecd06866b940765942c6abe2fbad5ec7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "NotAShelf",
"repo": "default", "repo": "superfreq",
"type": "github" "type": "github"
} }
}, },
"systems_2": { "systems": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -804,7 +778,7 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -909,6 +883,27 @@
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"type": "github" "type": "github"
} }
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747747949,
"narHash": "sha256-Ax1S/YaEovDKz9M71AweVpDxqJiTn/tHowbbUTb4gSo=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "5f7f77c79f1e7512ead0bed4e8b4bbcef8d80b38",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -12,8 +12,17 @@
# hyprland, plugins and related utils # hyprland, plugins and related utils
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
stylix.url = "github:danth/stylix/release-24.11"; stylix.url = "github:danth/stylix/release-24.11";
# quicksettings widget # zen browser
better-control.url = "github:rishabh5321/better-control-flake"; zen-browser.url = "github:0xc000022070/zen-browser-flake";
# IMPORTANT: we're using "libgbm" and is only available in unstable so ensure
# to have it up-to-date or simply don't specify the nixpkgs input
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
# power management
superfreq = {
url = "github:NotAShelf/superfreq";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
@ -36,6 +45,7 @@
modules = [ modules = [
./hosts/spectre-x360-2018 ./hosts/spectre-x360-2018
stylix.nixosModules.stylix stylix.nixosModules.stylix
inputs.superfreq.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View File

@ -9,6 +9,7 @@
../../modules/nixos/flatpak.nix ../../modules/nixos/flatpak.nix
../../modules/nixos/fonts.nix ../../modules/nixos/fonts.nix
../../modules/nixos/hyprland.nix ../../modules/nixos/hyprland.nix
../../modules/nixos/ld.nix
../../modules/nixos/monitoring.nix ../../modules/nixos/monitoring.nix
../../modules/nixos/networking.nix ../../modules/nixos/networking.nix
../../modules/nixos/nh.nix ../../modules/nixos/nh.nix

View File

@ -1,4 +1,4 @@
{pkgs, ...}: {pkgs, inputs, ...}:
{ {
programs.firefox = { programs.firefox = {
## Enable the Firefox web browser ## Enable the Firefox web browser
@ -77,4 +77,68 @@
}; };
}; };
home.packages = with pkgs; [
inputs.zen-browser.packages."${system}".default
# inputs.zen-browser.packages."${system}".default.override {
# policies = {
# DisableAppUpdate = true;
# DisableTelemetry = true;
# OfferToSaveLogins = false;
# AutofillAddressEnabled = true;
# AutofillCreditCardEnabled = false;
# # BlockAboutConfig = true;
# DefaultDownloadDirectory = "\${home}/Downloads";
# ExtensionSettings = with builtins;
# let extension = shortId: uuid: {
# name = uuid;
# value = {
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
# installation_mode = "normal_installed";
# };
# };
# in listToAttrs [
# (extension "ublock-origin" "uBlock0@raymondhill.net")
# (extension "ghostery" "firefox@ghostery.com")
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
# ];
# };
# }
];
# programs.zen-browser = {
# enable = true;
# policies = {
# DisableAppUpdate = true;
# DisableTelemetry = true;
# OfferToSaveLogins = false;
# AutofillAddressEnabled = true;
# AutofillCreditCardEnabled = false;
# # BlockAboutConfig = true;
# DefaultDownloadDirectory = "\${home}/Downloads";
# ExtensionSettings = with builtins;
# let extension = shortId: uuid: {
# name = uuid;
# value = {
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
# installation_mode = "normal_installed";
# };
# };
# in listToAttrs [
# (extension "ublock-origin" "uBlock0@raymondhill.net")
# (extension "ghostery" "firefox@ghostery.com")
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
# ];
# };
# };
} }

View File

@ -25,15 +25,28 @@
# typst # typst
myriad-dreamin.tinymist myriad-dreamin.tinymist
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "jupyter-hub";
publisher = "ms-toolsai";
version = "2024.10.1002821224";
sha256 = "sha256-3YF91Wgw5je040xPpLHPdxQIEAetpmDz6La7bw2JM+g=";
}
]; ];
# };
keybindings = [ keybindings = [
# comment/uncomment line
{ {
key = "ctrl+#"; key = "ctrl+#";
command = "editor.action.commentLine"; command = "editor.action.commentLine";
when = "editorTextFocus"; when = "editorTextFocus";
} }
# run code cell in jupyter
{
key = "ctrl+enter";
command = "jupyter.runCell";
when = "editorTextFocus && editorHasSelection && jupyter.notebookEditorFocused";
}
]; ];
userSettings = { userSettings = {

View File

@ -13,7 +13,6 @@
"com.spotify.Client" "com.spotify.Client"
"io.podman_desktop.PodmanDesktop" "io.podman_desktop.PodmanDesktop"
"org.pipewire.Helvum" "org.pipewire.Helvum"
"io.github.zen_browser.zen"
"im.riot.Riot" "im.riot.Riot"
]; ];
} }

View File

@ -1,11 +0,0 @@
{
inputs,
pkgs,
...
}:
{
environment.systemPackages =
with pkgs; [
inputs.better-control.packages.${pkgs.system}.better-control
];
}

View File

@ -63,7 +63,7 @@
"$mod+Ctrl, left, movetoworkspace, -1" "$mod+Ctrl, left, movetoworkspace, -1"
"$mod+Ctrl, right, movetoworkspace, +1" "$mod+Ctrl, right, movetoworkspace, +1"
# # Switch workspace # Switch workspace
"$mod+Alt, left, workspace, -1" "$mod+Alt, left, workspace, -1"
"$mod+Alt, right, workspace, +1" "$mod+Alt, right, workspace, +1"
@ -76,7 +76,7 @@
# repeatable bindings # repeatable bindings
binde = [ binde = [
# Fn keys # Fn keys
", XF86MonBrightnessDown, exec, brightnessctl set -5%" ", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
", XF86MonBrightnessUp, exec, brightnessctl set +5%" ", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-" ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
@ -122,6 +122,7 @@
# # Fixes cursor themes in gnome apps under hyprland # # Fixes cursor themes in gnome apps under hyprland
# "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'" # "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
# "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}" # "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
"${pkgs.owncloud-client}"
]; ];
general = { general = {
@ -153,6 +154,11 @@
}; };
}; };
device = {
name = "syna329a:00-06cb:cd4f-touchpad";
sensitivity = 0.5;
};
gestures = { gestures = {
workspace_swipe = true; workspace_swipe = true;
workspace_swipe_fingers = 4; workspace_swipe_fingers = 4;
@ -185,9 +191,11 @@
}; };
monitor = [ monitor = [
"eDP-1, 3840x2160, 0x0, 1.5" # the internal laptop monitor "eDP-1, 3840x2160, 0x0, 1.666667" # the internal laptop monitor
# Samsung monitor at irchel (matching the description) # Samsung monitors at irchel (matching the description)
# "desc:Samsung Electric Company LS27D80xU HK7X800803, 3840x2160, auto-up, 1.5" # "desc:Samsung Electric Company LS27D80xU HK7X800803, 3840x2160, auto-up, 1.8"
"desc:Samsung Electric Company LS27D80xU HNAX600169, 2560x1440@59.95, auto-up, 1"
", preferred, auto-up, auto" # automatically add any newly detected monitor ", preferred, auto-up, auto" # automatically add any newly detected monitor
]; ];
@ -200,9 +208,9 @@
"NIXOS_OZONE_WL, 1" "NIXOS_OZONE_WL, 1"
"ELECTRON_OZONE_PLATFORM_HINT, wayland" "ELECTRON_OZONE_PLATFORM_HINT, wayland"
# set the scale factor for GDK apps # set the scale factor for GDK apps
"GDK_SCALE, 1.5" "GDK_SCALE, 1.7"
# set the scale factor for QT apps # set the scale factor for QT apps
"QT_SCALE_FACTOR, 1.5" "QT_SCALE_FACTOR, 1.7"
# set the scale factor for GTK apps # set the scale factor for GTK apps
]; ];
}; };

View File

@ -3,6 +3,13 @@
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
# prevent the screen being shown for a split second
animations = {
animation = "fadeIn, 0, 0, linear";
};
general = { general = {
# immediately lock the screen # immediately lock the screen
grace = 0; grace = 0;

View File

@ -58,6 +58,7 @@
"format" = "{}"; "format" = "{}";
"rewrite" = { "rewrite" = {
"(.*) Mozilla Firefox" = "$1"; "(.*) Mozilla Firefox" = "$1";
"(.*) Zen Browser" = "$1";
"(.*) - fish" = "> [$1]"; "(.*) - fish" = "> [$1]";
"(.*) - Visual Studio Code" = "$1"; "(.*) - Visual Studio Code" = "$1";
}; };
@ -193,7 +194,7 @@
* { * {
font-family: "FiraCode Nerd Font"; font-family: "FiraCode Nerd Font";
font-weight: bold; font-weight: bold;
font-size: 22px; font-size: 20px;
} }
window#waybar { window#waybar {

View File

@ -3,5 +3,4 @@
home.packages = [ home.packages = [
pkgs.obsidian pkgs.obsidian
]; ];
} }

View File

@ -0,0 +1,20 @@
{ lib, config, ... }:
{
programs.ssh.enable = true;
programs.ssh.matchBlocks = {
ela = lib.hm.dag.entryBefore ["eiger"] {
hostname = "ela.cscs.ch";
user = "rmoll";
identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
identitiesOnly = true;
};
eiger = {
hostname = "eiger.cscs.ch";
user = "rmoll";
identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
identitiesOnly = true;
proxyJump = "ela";
};
};
}

View File

@ -44,10 +44,10 @@
}; };
sizes = { sizes = {
applications = 15; applications = 12;
desktop = 15; desktop = 12;
popups = 12; popups = 12;
terminal = 15; terminal = 12;
}; };
}; };

View File

@ -10,10 +10,10 @@
]; ];
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = false; powerOnBoot = true;
settings = { settings = {
General = { General = {
Name = "Hello"; Name = "Nixtre";
ControllerMode = "dual"; ControllerMode = "dual";
FastConnectable = "true"; FastConnectable = "true";
Experimental = "true"; Experimental = "true";

4
modules/nixos/ld.nix Normal file
View File

@ -0,0 +1,4 @@
{config, ...}:
{
programs.nix-ld.enable = true;
}

View File

@ -16,9 +16,9 @@
hardware.graphics.enable = lib.mkForce true; hardware.graphics.enable = lib.mkForce true;
hardware.nvidia = lib.mkForce { hardware.nvidia = lib.mkForce {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = false;
# features not available for the old graphics card
powerManagement.finegrained = false; powerManagement.finegrained = false;
# features not available for the old graphics card
open = false; open = false;
nvidiaSettings = false; nvidiaSettings = false;

View File

@ -21,6 +21,44 @@
}; };
}; };
# services.superfreq = {
# enable = true;
# settings = {
# charger = {
# governor = "performance";
# turbo = "auto";
# epp = "performance";
# epb = "balance_performance";
# platform_profile = "performance";
# };
# battery = {
# governor = "powersave";
# turbo = "auto";
# epp = "power";
# epb = "balance_power";
# platform_profile = "low-power";
# min_freq_mhz = 800;
# max_freq_mhz = 2500;
# };
# daemon = {
# poll_interval_sec = 10;
# adaptive_interval = true;
# min_poll_interval_sec = 1;
# max_poll_interval_sec = 30;
# throttle_on_battery = true;
# };
# battery_charge_thresholds = [50 90];
# };
# # logind.lidSwitchExternalPower = "ignore"; # prevent lid switch from triggering a suspend
# };
systemd.sleep.extraConfig = '' systemd.sleep.extraConfig = ''
AllowSuspend=yes AllowSuspend=yes
AllowHibernation=yes AllowHibernation=yes

View File

@ -14,6 +14,7 @@ with lib.hm.gvariant;
../modules/home-manager/kubectl.nix ../modules/home-manager/kubectl.nix
../modules/home-manager/obsidian.nix ../modules/home-manager/obsidian.nix
../modules/home-manager/owncloud-client.nix ../modules/home-manager/owncloud-client.nix
../modules/home-manager/ssh.nix
../modules/home-manager/stylix.nix ../modules/home-manager/stylix.nix
../modules/home-manager/thunderbird.nix ../modules/home-manager/thunderbird.nix
../modules/home-manager/wofi.nix ../modules/home-manager/wofi.nix