Compare commits

..

16 Commits

Author SHA1 Message Date
Christian Ott 6aaea6d416 update vscode 5 months ago
Christian Ott c579566ae1 add communardo vpn 5 months ago
Christian Ott 9046f3d02a nix updates 8 months ago
Christian Ott a377905297 changes 1 year ago
Christian Ott e8bde7a3bf NixOS update with necessary config changes 1 year ago
Christian Ott 73e71df821 format code 1 year ago
Christian Ott 44e64ef028 add some programs & aliases 1 year ago
Christian Ott b14e9bb8aa NixOS update 1 year ago
Christian Ott 40133957c4 NixOS update 1 year ago
Christian Ott 2a3ca89e60 add wallpaper and enable hypridle 1 year ago
Christian Ott 72b3c77574 experimets with fonts - font awesome still not working 1 year ago
Christian Ott 87c58b3eb4 add starship to terminal 1 year ago
Christian Ott 7c3a5a4312 NixOS update 1 year ago
Christian Ott 9dd273472f Temporary fix broken numpad on framework 16 1 year ago
Christian Ott 667fc59251 NixOS update 1 year ago
Christian Ott e8b3b461f4 NixOS update 2 years ago
  1. BIN
      backgrounds/island_1.jpg
  2. BIN
      backgrounds/island_2.jpg
  3. BIN
      backgrounds/island_3.jpg
  4. 93
      configuration.nix
  5. 68
      disko.nix
  6. 49
      flake.lock
  7. 49
      flake.nix
  8. 16
      greeter.nix
  9. 33
      hardware-configuration.nix
  10. 119
      home.nix
  11. 190
      hyperland/default.nix
  12. 7
      modules/dunst.nix
  13. 132
      modules/ranger.nix
  14. 11
      modules/vscode.nix
  15. 11
      modules/vscodium/default.nix
  16. 104
      modules/vscodium/vscodium.nix
  17. 1310
      modules/waybar.nix

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@ -2,18 +2,25 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ronema, xdph, ... }:
{
inputs,
pkgs,
ronema,
...
}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
"${builtins.fetchTarball {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
"${
builtins.fetchTarball {
url = "https://github.com/nix-community/disko/archive/refs/tags/v1.6.1.tar.gz";
sha256 = "1p9vsml07bm3riw703dv83ihlmgyc11qv882qa6bqzqdgn86y8z4";
}}/module.nix"
./disko.nix
];
}
}/module.nix"
./disko.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
# Use the systemd-boot EFI boot loader.
@ -28,15 +35,20 @@
};
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.plugins = [ pkgs.networkmanager-openvpn ];
networking.networkmanager.dns = "dnsmasq";
# address=/git.christianott.ch/git.christianott.ch/tux.social/woelkli.christianott.ch/office.christianott.ch/192.168.15.4
environment.etc."NetworkManager/dnsmasq.d/00-cave.conf".text = ''
server=/.mibex.ch/172.31.13.27
server=/huus/192.168.15.2
server=192.168.15.2
server=1.1.1.1
server=/.mibex.ch/172.31.13.27
server=/.communardo.de/192.168.50.75
address=/mail.communardo.de/195.243.59.178
address=/git.christianott.ch/git.christianott.ch/tux.social/woelkli.christianott.ch/office.christianott.ch/192.168.15.4
server=/huus/192.168.15.2
server=192.168.15.2
server=192.168.50.1
server=1.1.1.1
'';
# Set your time zone.
time.timeZone = "Europe/Zurich";
@ -54,15 +66,17 @@
# };
# https://nixos.wiki/wiki/Fonts fonts with icons
fonts.packages = with pkgs;
[
(nerdfonts.override {fonts = ["JetBrainsMono" "CascadiaCode" "FiraCode"];})
];
fonts.packages = with pkgs; [
font-awesome
nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
nerd-fonts.fira-code
];
fonts.fontconfig = {
defaultFonts = {
monospace = ["CaskaydiaCove Nerd Font Mono"];
sansSerif = ["CascadiaCode Nerd Font"];
serif = ["CascadiaCode Nerd Font"];
monospace = [ "CaskaydiaCove Nerd Font Mono" ];
sansSerif = [ "CascadiaCode Nerd Font" ];
serif = [ "CascadiaCode Nerd Font" ];
};
};
@ -73,8 +87,8 @@
programs.hyprland.portalPackage = pkgs.xdg-desktop-portal-wlr;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = false;
services.xserver.desktopManager.gnome.enable = true;
services.displayManager.gdm.enable = false;
services.desktopManager.gnome.enable = true;
services.fwupd.enable = true;
@ -113,7 +127,7 @@
jack.enable = true;
pulse.enable = true;
};
hardware.pulseaudio.enable = false;
services.pulseaudio.enable = false;
# Enable touchpad support (enabled default in most desktopManager).
services.libinput = {
@ -124,7 +138,11 @@
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.chrigi = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "docker"];
extraGroups = [
"wheel"
"networkmanager"
"docker"
];
initialPassword = "password";
packages = with pkgs; [
firefox
@ -138,7 +156,7 @@
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
configPackages = [ pkgs.xdg-desktop-portal-wlr ];
configPackages = [ pkgs.xdg-desktop-portal-wlr ];
};
environment.sessionVariables = {
@ -148,7 +166,7 @@
QT_QPA_PLATFORMTHEME = "qt5ct";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
@ -157,7 +175,8 @@
wget
curl
btop
vscodium
vscodium-insider
pciutils
usbutils
openvpn
@ -174,15 +193,19 @@
};
programs._1password-gui = {
enable = true;
polkitPolicyOwners = ["chrigi"];
polkitPolicyOwners = [ "chrigi" ];
};
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 7d"; };
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
@ -224,11 +247,13 @@
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
nix = {
package = pkgs.nixFlakes;
settings.experimental-features = ["nix-command" "flakes"];
# package = pkgs.nix;
settings.experimental-features = [
"nix-command"
"flakes"
];
};
}

@ -30,9 +30,17 @@
bypassWorkqueues = true;
keyFile = "/tmp/yk/yk_mini.key";
};
additionalKeyFiles = [ "/tmp/yk/yk_the_big_one.key" "/tmp/yk/yk_on_key.key" "/tmp/yk/yk_round.key" ];
additionalKeyFiles = [
"/tmp/yk/yk_the_big_one.key"
"/tmp/yk/yk_on_key.key"
"/tmp/yk/yk_round.key"
];
# https://github.com/sgillespie/nixos-yubikey-luks
extraFormatArgs = [ "--cipher=aes-xts-plain64" "--key-size=512" "--hash=sha512" ];
extraFormatArgs = [
"--cipher=aes-xts-plain64"
"--key-size=512"
"--hash=sha512"
];
initrdUnlock = false; # we have to add it manually because of the yubikeys
content = {
type = "btrfs";
@ -41,23 +49,48 @@
"/root" = {
mountpoint = "/";
# https://unix.stackexchange.com/questions/752741/what-is-the-mount-option-space-cache-v2
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/var" = {
mountpoint = "/var";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
"/docker-btrfs" = {
mountpoint = "/var/lib/docker/btrfs";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
};
};
@ -85,14 +118,22 @@
content = {
type = "luks";
name = "crypted_backup";
settings = {
allowDiscards = true;
bypassWorkqueues = true;
keyFile = "/tmp/yk/yk_mini.key";
};
additionalKeyFiles = [ "/tmp/yk/yk_the_big_one.key" "/tmp/yk/yk_on_key.key" "/tmp/yk/yk_round.key" ];
extraFormatArgs = [ "--cipher=aes-xts-plain64" "--key-size=512" "--hash=sha512" ];
additionalKeyFiles = [
"/tmp/yk/yk_the_big_one.key"
"/tmp/yk/yk_on_key.key"
"/tmp/yk/yk_round.key"
];
extraFormatArgs = [
"--cipher=aes-xts-plain64"
"--key-size=512"
"--hash=sha512"
];
initrdUnlock = false; # we have to add it manually because of the yubikeys
content = {
type = "btrfs";
@ -100,7 +141,12 @@
subvolumes = {
"/backup" = {
mountpoint = "/backup";
mountOptions = [ "compress=zstd" "noatime" "space_cache=v2" "commit=120"];
mountOptions = [
"compress=zstd"
"noatime"
"space_cache=v2"
"commit=120"
];
};
};
};

@ -23,11 +23,11 @@
]
},
"locked": {
"lastModified": 1725863684,
"narHash": "sha256-HmdTBpuCsw35Ii35JUKO6AE6nae+kJliQb0XGd4hoLE=",
"lastModified": 1751824240,
"narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "be47a2bdf278c57c2d05e747a13ed31cef54a037",
"rev": "fd9e55f5fac45a26f6169310afca64d56b681935",
"type": "github"
},
"original": {
@ -132,11 +132,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1725716377,
"narHash": "sha256-7NzW9O/cAw7iWzRfh7Oo/SuSudL4a1YTKS6yoh3tMck=",
"lastModified": 1751432711,
"narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "04a1cda0c1725094a4db703cccbb956b7558f5a6",
"rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f",
"type": "github"
},
"original": {
@ -148,11 +148,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725634671,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"lastModified": 1751637120,
"narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3",
"type": "github"
},
"original": {
@ -177,6 +177,22 @@
"type": "github"
}
},
"nixpkgs-small": {
"locked": {
"lastModified": 1751743520,
"narHash": "sha256-gk83D6+0KpugopnV6vrumpVHDrqESFjVr39O9u7NNy8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "833775e5731dcd1fd3eb0b61fa7ed2a4fafb4e3e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"ronema": {
"inputs": {
"nixpkgs": [
@ -184,16 +200,14 @@
]
},
"locked": {
"dirtyRev": "328bd77536cec39d17b5e5027c5778efeb650fed-dirty",
"dirtyShortRev": "328bd77-dirty",
"lastModified": 1718446613,
"narHash": "sha256-ocRS47pPPjxpLWOtLwSfNnBQh5KT4O/5U5VLGySSodg=",
"type": "git",
"url": "file:///home/chrigi/private-dev/rofi-network-manager"
"lastModified": 1732525400,
"narHash": "sha256-q051SKAI9oSSkwG998w8J20EaKHV/loopSUTIsbft1M=",
"path": "/home/chrigi/private-dev/rofi-network-manager",
"type": "path"
},
"original": {
"type": "git",
"url": "file:///home/chrigi/private-dev/rofi-network-manager"
"path": "/home/chrigi/private-dev/rofi-network-manager",
"type": "path"
}
},
"root": {
@ -202,6 +216,7 @@
"nix-colors": "nix-colors",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-small": "nixpkgs-small",
"ronema": "ronema",
"xdph": "xdph"
}

@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-colors.url = "github:misterio77/nix-colors";
xdph = {
@ -10,7 +11,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = github:nix-community/home-manager;
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ronema = {
@ -19,33 +20,63 @@
};
};
outputs = { self, nixpkgs, nixos-hardware, home-manager, nix-colors, ronema, xdph, ... }@inputs:
outputs =
{
self,
nixpkgs,
nixpkgs-small,
nixos-hardware,
home-manager,
nix-colors,
ronema,
xdph,
...
}@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
system = "x86_64-linux";
nixpkgsDrvRootPath = nixpkgs + "/pkgs/applications/editors/vscode";
pkgs = import nixpkgs {
inherit system;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(final: prev: {
vscodium-insider = pkgs.callPackage ./modules/vscodium/vscodium.nix { inherit nixpkgsDrvRootPath; };
})
];
};
in {
pkgs-small = import nixpkgs-small {
inherit system;
config.allowUnfree = true;
};
in
{
nixosConfigurations.nix-fw16 = lib.nixosSystem {
specialArgs = {
inherit pkgs ronema xdph;
inherit
inputs
pkgs
ronema
xdph
;
};
modules = [
./configuration.nix
./greeter.nix
nixos-hardware.nixosModules.framework-16-7040-amd
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit username nix-colors; };
home-manager.extraSpecialArgs = {
inherit pkgs-small username nix-colors;
};
}
];
};
};
}

@ -1,13 +1,18 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
# https://github.com/bytemouse/config/blob/48d9be51a9666c9b62f4b8e84322b9d892ee0aea/modules/gnome.nix#L11
gnome-script = pkgs.writeShellScriptBin "gnome-script" ''
export XDG_SESSION_TYPE=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome.gnome-session}/bin/gnome-session
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome-session}/bin/gnome-session
'';
gnome-desktop = pkgs.makeDesktopItem {
name = "gnome-desktop";
@ -16,7 +21,8 @@ let
terminal = true;
};
in {
in
{
services.greetd = {
enable = true;
@ -29,4 +35,4 @@ in {
};
environment.systemPackages = with pkgs; [ greetd.tuigreet ];
}
}

@ -1,25 +1,36 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
disabledModules = ["system/boot/luksroot.nix"];
disabledModules = [ "system/boot/luksroot.nix" ];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
./my-luksroot.nix
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
./my-luksroot.nix
];
boot.initrd = {
kernelModules = ["vfat" "nls_cp437" "nls_iso8859-1" "usbhid"];
kernelModules = [
"vfat"
"nls_cp437"
"nls_iso8859-1"
"usbhid"
];
luks = {
yubikeySupport = true;
reusePassphrases = true;
devices."crypted_root" = {
device = "/dev/disk/by-partlabel/disk-main-luks";
yubikey = {
slot = 2;
twoFactor = true;
@ -27,7 +38,7 @@
keyLength = 64;
saltLength = 16;
replaceKey = false;
storage = {
device = "/dev/disk/by-partlabel/disk-main-ESP";
fsType = "vfat";
@ -37,7 +48,7 @@
};
devices."crypted_backup" = {
device = "/dev/disk/by-partlabel/disk-backup-luks";
yubikey = {
slot = 2;
twoFactor = true;

@ -1,7 +1,17 @@
{ config, pkgs, nix-colors, username, ... }:
{
config,
pkgs,
pkgs-small,
nix-colors,
username,
...
}:
let
in
{
imports = [
imports = [
nix-colors.homeManagerModules.default
./modules/dunst.nix
./modules/waybar.nix
@ -14,26 +24,76 @@
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
kitty
pkgs-small.kitty
eza
git
git-lfs
obsidian
jq
direnv
skypeforlinux
kdePackages.okular
zip
ant
tmux
nixd # Nix language server for vscode
nixfmt-rfc-style
signal-desktop
teams-for-linux
slack
jetbrains-toolbox
nextcloud-client
];
pkgs-small.presenterm
font-awesome
nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
nerd-fonts.fira-code
(pkgs.appimageTools.wrapType2 {
name = "atlassify";
pname = "atlassify";
version = "1.17.0";
src = fetchurl {
url = "https://github.com/setchy/atlassify/releases/download/v1.17.0/Atlassify-1.17.0.AppImage";
hash = "sha256-mfcxrd9axnmQMofth1M5ov2a4ppFE0ga0Gxjwbx2v9o=";
};
extraPkgs =
pkgs:
(appimageTools.defaultFhsEnvArgs.multiPkgs pkgs)
++ [
libsecret
];
})
(pkgs.stdenv.mkDerivation {
pname = "flowkeeper";
version = "0.9.1";
src = pkgs.fetchurl {
url = "https://github.com/flowkeeper-org/fk-desktop/releases/download/v0.9.1/Flowkeeper";
sha256 = "sha256-HCEG7LSM7h2Yz6BbvQ0KdmfYnKZOG+TZxMvE5o8gYiA=";
};
dontUnpack = true;
installPhase = ''
install -Dm755 $src $out/bin/flowkeeper
'';
meta = {
description = "Flowkeeper time tracker";
platforms = pkgs.lib.platforms.linux;
};
})
];
programs.ssh = {
enable = true;
@ -47,6 +107,49 @@
enable = true;
lfs.enable = true;
};
programs.bash = {
enable = true;
historyIgnore = [
"l"
"ls"
"ll"
"cd"
"exit"
];
historyControl = [ "erasedups" ];
shellAliases = {
grep = "grep --color=auto";
".." = "cd ..";
"cdm" = "cd ~/mibex-plugins/monorepo";
};
initExtra = ''
# Custom colored bash prompt
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
'';
profileExtra = ''
# Include user's private bin if present
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
'';
};
programs.atuin = {
enable = true;
settings = {
auto_sync = true;
sync_frequency = "5m";
sync_address = "https://atuin.christianott.ch";
search_mode = "fuzzy";
};
};
programs.starship = {
enable = true;
enableBashIntegration = true;
};
# This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards
@ -59,4 +162,4 @@
# Let home Manager install and manage itself.
# programs.home-manager.enable = true;
}
}

@ -1,4 +1,9 @@
{ config, pkgs, username, ... }:
{
config,
pkgs,
username,
...
}:
let
volumeChange = pkgs.writeShellScript "volume-change" ''
# FROM: https://github.com/jsimonrichard/nix-config/blob/master/modules/my-config/desktop/hyprland/home-manager/desktop/hyprland/keybinds.nix
@ -32,22 +37,40 @@ in
networkmanagerapplet
grim
grimblast
swappy
slurp
wl-clipboard
hyprpaper
# (pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
# }))
];
];
programs.hyprlock = {
services.hyprpaper = {
enable = true;
settings = {
ipc = false;
splash = false;
splash_offset = 5;
splash_color = "rgb(ebdbb8)";
preload = [ "$HOME/.nixos-config/backgrounds/island_1.jpg" ];
wallpaper = [ ",$HOME/.nixos-config/backgrounds/island_1.jpg" ];
};
};
programs.hyprlock = {
enable = true;
settings = {
background = {
monitor = "";
# path = screenshot
path = "$HOME/.nixos-config/backgrounds/island_2.jpg";
color = "rgba(152, 179, 166, 0.9)";
blur_passes = 1;
blur_size = 7;
noise = 0.0117;
noise = 1.17e-2;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
@ -97,7 +120,7 @@ in
shadow_size = 10;
}
{
{
monitor = "";
text = "$USER";
color = "rgba(200, 200, 200, 1.0)";
@ -113,17 +136,65 @@ in
};
};
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
# unlock_cmd = "loginctl unlock-session";
after_sleep_cmd = "hyprctl dispatch dpms on && notify-send \"Back from idle.\" \"Welcome back!\"";
};
listener = [
{
timeout = 5;
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 150; # 2.5min.
on-timeout = "light -O && light -S 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "light -I"; # monitor backlight restore.
}
{
timeout = 300;
on-timeout = "playerctl pause";
}
{
timeout = 270;
on-timeout = "notify-send \"Idle\" \"You're idle... locking in 30s.\"";
}
{
timeout = 300; # 5min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 330; # 5.5min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 1800; # 30min
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
monitor=[
monitor = [
"eDP-1,2560x1600@60.00Hz,0x0,1"
"DP-3,preferred,-3840x-560,1"
"DP-2,preferred,auto,1.5"
"DP-2,preferred,auto,1.5"
];
"$mod" = "SUPER";
input = {
kb_options = "compose:rctrl";
kb_options = "compose:rctrl,numpad:mac"; # workaround for split numpad https://github.com/hyprwm/Hyprland/issues/6886
numlock_by_default = true;
};
exec-once = [
"dunst"
@ -131,6 +202,8 @@ in
"${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator"
"blueman-applet"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user start hyprpaper.service" # they are enabled, but don't start because they try to start before WAYLAND_DISPLAY is set
];
@ -139,7 +212,6 @@ in
"$mod, mouse:273, resizewindow"
];
bind =
[
"$mod, F, exec, firefox"
@ -147,6 +219,7 @@ in
", Print, exec, grimblast copy area"
"$mod, l, exec, hyprlock" # Add a keybinding to lock the screen
"$mod, C, exec, code"
"$mod, P, exec, sleep 2; grim -g \"$(slurp)\" - | swappy -f -"
"$mod, E, exec, hyprctl dispatch exit"
"$mod, r, exec, rofi -show run"
"$mod, code:51, exec, 1password" # super + \
@ -157,52 +230,65 @@ in
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10)
) 10
)
);
windowrulev2= [
# https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/
"float, title:(1Password)"
"size 70% 70%, title:(1Password)"
"center, title:(1Password)"
"float,class:(.blueman-manager-wrapped)"
"size 25% 25%,class:(.blueman-manager-wrapped)"
"float,class:(org.kde.polkit-kde-authentication-agent-1)"
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1"
"dimaround, class:org.kde.polkit-kde-authentication-agent-1"
"stayfocused, class:org.kde.polkit-kde-authentication-agent-1"
];
# Bind flags
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
# r -> release, will trigger on release of a key.
# e -> repeat, will repeat when held.
# n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
# m -> mouse, see below
# t -> transparent, cannot be shadowed by other binds.
# i -> ignore mods, will ignore modifiers.
binde = [
", XF86AudioRaiseVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1.3"
"CTRL, XF86AudioRaiseVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SOURCE@ 5%+ --limit 1"
];
bindle = [
", XF86AudioLowerVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SINK@ 5%-"
"CTRL, XF86AudioLowerVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SOURCE@ 5%-"
];
bindl = [
", XF86AudioMute, exec, ${volumeChange} set-mute @DEFAULT_AUDIO_SINK@ toggle"
];
windowrulev2 = [
# https://jbmorley.co.uk/posts/2024-02-13-1password-and-hyprland/
"float, title:(1Password)"
"size 70% 70%, title:(1Password)"
"center, title:(1Password)"
"float,class:(.blueman-manager-wrapped)"
"size 25% 25%,class:(.blueman-manager-wrapped)"
"float,class:(org.kde.polkit-kde-authentication-agent-1)"
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
"bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1"
"dimaround, class:org.kde.polkit-kde-authentication-agent-1"
"stayfocused, class:org.kde.polkit-kde-authentication-agent-1"
# nextcloud
"float,class:(com.nextcloud.desktopclient.nextcloud)"
"size 400 800,class:(com.nextcloud.desktopclient.nextcloud)"
"move 100%-412 44,class:(com.nextcloud.desktopclient.nextcloud)"
# to try if it has sideeffects
"noinitialfocus, initialClass:com.nextcloud.desktopclient.nextcloud"
"noinitialfocus, initialClass:atlassify"
];
# Bind flags
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
# r -> release, will trigger on release of a key.
# e -> repeat, will repeat when held.
# n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
# m -> mouse, see below
# t -> transparent, cannot be shadowed by other binds.
# i -> ignore mods, will ignore modifiers.
binde = [
", XF86AudioRaiseVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1.3"
"CTRL, XF86AudioRaiseVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SOURCE@ 5%+ --limit 1"
];
bindle = [
", XF86AudioLowerVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SINK@ 5%-"
"CTRL, XF86AudioLowerVolume, exec, ${volumeChange} set-volume @DEFAULT_AUDIO_SOURCE@ 5%-"
];
bindl = [
", XF86AudioMute, exec, ${volumeChange} set-mute @DEFAULT_AUDIO_SINK@ toggle"
];
};
}
}

@ -2,7 +2,8 @@
inputs,
config,
...
}:{
}:
{
services.dunst = {
enable = true;
settings = {
@ -54,7 +55,7 @@
title = "Dunst";
class = "Dunst";
corner_radius = 10;
icon_corner_radius= 5;
icon_corner_radius = 5;
notification_limit = 5;
mouse_left_click = "close_current";
mouse_middle_click = "do_action";
@ -97,4 +98,4 @@
};
};
};
}
}

@ -1,70 +1,72 @@
{pkgs, ...}:
{ pkgs, ... }:
{
# stolen from: https://github.com/leoperegrino/.files/blob/d996b31a0b1843f05d0f27123196bfa6d0980caa/home-manager/modules/ranger.nix
programs.ranger = {
enable = true;
extraPackages = [
pkgs.ueberzugpp
];
extraConfig = "default_linemode devicons";
plugins = [{
name = "devicons";
src = builtins.fetchGit {
url = "https://github.com/alexanderjeurissen/ranger_devicons.git";
rev = "a8d626485ca83719e1d8d5e32289cd96a097c861";
};
}];
settings = {
preview_images_method = "ueberzug";
show_hidden = true;
use_preview_script = true;
preview_images = true;
preview_files = true;
open_all_images = true;
draw_borders = true;
hidden_filter = ''^\.|\.(bak|swp)$|^lost\+found$|^__pycache__$'';
nested_ranger_warning = true;
colorscheme = "jungle";
};
# mappings = {
# "gu" = "cd ~/.local/share";
# "gs" = "cd ~/.local/state";
# "gf" = "cd ~/.files";
# "gV" = "cd ~/.files/nvim/lua/user/";
# "gc" = "cd ~/.config";
# "gC" = "cd ~/.cache";
# "gb" = "cd ~/bin";
# "gD" = "cd ~/desktop";
# "gd" = "cd ~/documents";
# "gm" = "cd ~/music";
# "gp" = "cd ~/pictures";
# "gv" = "cd ~/videos";
# "gU" = "cd /usr/share/";
# "gr" = "cd /";
# "gt" = "cd /tmp";
# "g/r" = "shell sudo ranger .";
enable = true;
extraPackages = [
pkgs.ueberzugpp
];
extraConfig = "default_linemode devicons";
plugins = [
{
name = "devicons";
src = builtins.fetchGit {
url = "https://github.com/alexanderjeurissen/ranger_devicons.git";
rev = "a8d626485ca83719e1d8d5e32289cd96a097c861";
};
}
];
settings = {
preview_images_method = "ueberzug";
show_hidden = true;
use_preview_script = true;
preview_images = true;
preview_files = true;
open_all_images = true;
draw_borders = true;
hidden_filter = ''^\.|\.(bak|swp)$|^lost\+found$|^__pycache__$'';
nested_ranger_warning = true;
colorscheme = "jungle";
};
# mappings = {
# "gu" = "cd ~/.local/share";
# "gs" = "cd ~/.local/state";
# "gf" = "cd ~/.files";
# "gV" = "cd ~/.files/nvim/lua/user/";
# "gc" = "cd ~/.config";
# "gC" = "cd ~/.cache";
# "gb" = "cd ~/bin";
# "gD" = "cd ~/desktop";
# "gd" = "cd ~/documents";
# "gm" = "cd ~/music";
# "gp" = "cd ~/pictures";
# "gv" = "cd ~/videos";
# "gU" = "cd /usr/share/";
# "gr" = "cd /";
# "gt" = "cd /tmp";
# "g/r" = "shell sudo ranger .";
# "ev" = ''shell "''${EDITOR}" -- %s'';
# "eV" = ''console shell "''${EDITOR}" --%space'';
# "et" = ''shell "''${EDITOR}" -p -- %s'';
# "eT" = ''console shell "''${EDITOR}" -p -- %s%space'';
# "es" = ''shell "''${EDITOR}" -O -- %s'';
# "eS" = ''console shell "''${EDITOR}" -O -- %s%space'';
# "EV" = ''shell sudo "''${EDITOR}" -- %s'';
# "V" = ''shell setsid -f alacritty -e zsh -ic "''${EDITOR} -- %s"'';
# "B" = ''shell setsid -f alacritty -e zsh -ic "''${PAGER} -- %s"'';
# "<c-o>" = "console touch%space";
# "ev" = ''shell "''${EDITOR}" -- %s'';
# "eV" = ''console shell "''${EDITOR}" --%space'';
# "et" = ''shell "''${EDITOR}" -p -- %s'';
# "eT" = ''console shell "''${EDITOR}" -p -- %s%space'';
# "es" = ''shell "''${EDITOR}" -O -- %s'';
# "eS" = ''console shell "''${EDITOR}" -O -- %s%space'';
# "EV" = ''shell sudo "''${EDITOR}" -- %s'';
# "V" = ''shell setsid -f alacritty -e zsh -ic "''${EDITOR} -- %s"'';
# "B" = ''shell setsid -f alacritty -e zsh -ic "''${PAGER} -- %s"'';
# "<c-o>" = "console touch%space";
# "CC" = "get_cumulative_size";
# "md" = "console mkdir%space";
# "cW" = "bulkrename";
# "i" = ''shell "''${PAGER}" -- %f'';
# "v" = "mark_files all=True toggle=True";
# "n" = "tab_new";
# "b" = ''shell setsid -f "''${TERM}"'';
# "f" = "console scout -ftse%space";
# "<c-j>" = "scroll_preview 1";
# "<c-k>" = "scroll_preview -1";
# };
};
}
# "CC" = "get_cumulative_size";
# "md" = "console mkdir%space";
# "cW" = "bulkrename";
# "i" = ''shell "''${PAGER}" -- %f'';
# "v" = "mark_files all=True toggle=True";
# "n" = "tab_new";
# "b" = ''shell setsid -f "''${TERM}"'';
# "f" = "console scout -ftse%space";
# "<c-j>" = "scroll_preview 1";
# "<c-k>" = "scroll_preview -1";
# };
};
}

@ -1,11 +0,0 @@
{
config,
pkgs,
...
}: {
programs.vscode {
enable = true;
};
}

@ -0,0 +1,11 @@
{ inputs, pkgs, ... }:
let
nixpkgsDrvRootPath = inputs.nixpkgs + "/pkgs/applications/editors/vscode";
in
{
nixpkgs.overlays = [
{
vscodium = pkgs.callPackage ./vscodium-insiders.nix { inherit nixpkgsDrvRootPath; };
}
];
}

@ -0,0 +1,104 @@
{
lib,
stdenv,
callPackage,
nixpkgsDrvRootPath,
fetchurl,
nixosTests,
commandLineArgs ? "",
sourceExecutableName ? "codium-insiders",
useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin,
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
plat =
{
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin-x64";
aarch64-linux = "linux-arm64";
aarch64-darwin = "darwin-arm64";
armv7l-linux = "linux-armhf";
}
.${system} or throwSystem;
archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz";
hash =
{
x86_64-linux = "sha256-LpLGu8COJ7lk6QoAdmTNG4CMP0aMDNg43A+50Fm1tP4=";
x86_64-darwin = "sha256-d+8vt5grnLwD/cIIGgb2ogpgZrZLZs+2bqfBrRzLfJw=";
aarch64-linux = "sha256-D93Eh5TPRgd9OxJ4pWsOryS5mOz2amQOHOnO+K99hAg=";
aarch64-darwin = "sha256-xKBWAb23jUi8pI7mZpHOP2eF3PZFh0MWj+BM+alKF18=";
armv7l-linux = "sha256-EqJNi/qMM08voA/Ltle3/28zbgIz/Ae42IE5oXLxcKU=";
}
.${system} or throwSystem;
sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) ".";
in
callPackage "${toString nixpkgsDrvRootPath}/generic.nix" rec {
inherit
sourceRoot
commandLineArgs
useVSCodeRipgrep
sourceExecutableName
;
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.103.05263-insider";
pname = "vscodium";
executableName = "codium-insiders";
longName = "VSCodium";
shortName = "vscodium";
src = fetchurl {
url = "https://github.com/VSCodium/vscodium-insiders/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}";
inherit hash;
};
tests = nixosTests.vscodium;
updateScript = ./update-vscodium.sh;
# Editing the `codium` binary (and shell scripts) within the app bundle causes the bundle's signature
# to be invalidated, which prevents launching starting with macOS Ventura, because VSCodium is notarized.
# See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information.
dontFixup = stdenv.hostPlatform.isDarwin;
meta = {
description = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS (VS Code without MS branding/telemetry/licensing)
'';
longDescription = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS. It includes support for debugging, embedded Git
control, syntax highlighting, intelligent code completion, snippets,
and code refactoring. It is also customizable, so users can change the
editor's theme, keyboard shortcuts, and preferences
'';
homepage = "https://github.com/VSCodium/vscodium";
downloadPage = "https://github.com/VSCodium/vscodium/releases";
license = lib.licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [
synthetica
bobby285271
ludovicopiero
];
mainProgram = "codium";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
"armv7l-linux"
];
# requires libc.so.6 and other glibc specifics
broken = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu;
};
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save

Powered by TurnKey Linux.