Compare commits

..

No commits in common. "19bf6fcb725acc5a46740326699fda99695767c4" and "cf5cefe1422475b0dbb5e338eef2d580254917a4" have entirely different histories.

10 changed files with 290 additions and 529 deletions

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686307493, "lastModified": 1685559570,
"narHash": "sha256-R4VEFnDn7nRmNxAu1LwNbjns5DPM8IBsvnrWmZ8ymPs=", "narHash": "sha256-MNIQvLRoq92isMLR/ordKNCl+aXNiuwBM4QyqmS8d00=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "7c16d31383a90e0e72ace0c35d2d66a18f90fb4f", "rev": "4338bc869e9874d54a4c89539af72f16666b2abe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -140,11 +140,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1681202837,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -160,11 +160,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686693375, "lastModified": 1685599623,
"narHash": "sha256-1Smjo0E8WI9PeVGmmCjpQWRX04aQvz5gAGXfdanIjgw=", "narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "61e5d1c38ef04ba30a9119825b159bce9c6010be", "rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,48 +174,6 @@
"type": "github" "type": "github"
} }
}, },
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_2",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1686680001,
"narHash": "sha256-JPcudWZ2bBwkJofGTV23NyXw/wo7PyiLFIdqPfrzxHE=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "7762ac0173b860af83e58d56409f9cf0fa7252e9",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1684265364,
"narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"idris-emacs-src": { "idris-emacs-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -241,11 +199,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686669673, "lastModified": 1685687232,
"narHash": "sha256-xx9SV/te+Ydo+bQNZR6w9cvMApE086Vwl6a8+T3O4EQ=", "narHash": "sha256-DYwyjTdJjPDd/H5keb0tfmzR4AGwg/EaZMMQnLfksfY=",
"owner": "idris-lang", "owner": "idris-lang",
"repo": "idris2", "repo": "idris2",
"rev": "1fa59f842a9760978befcb59228c27de8ebed7af", "rev": "31c17ebec2e64c095076e8425637176db7658492",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -262,11 +220,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1686391228, "lastModified": 1685786410,
"narHash": "sha256-EH9eRzGasV7VH7pSJc0zDm5WIVPSFEtlaASs7GvHeKk=", "narHash": "sha256-rjMM1cuUaiJdIZvOrBAZl2r9F+OwozRRijdCKsL0QAw=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "c61008f5207468c73ef92257e94c93126695efaa", "rev": "adc881336d6b81368b07e8a5b12df343f0ac5e67",
"revCount": 45, "revCount": 41,
"type": "git", "type": "git",
"url": "https://git.stranger.systems/nix/java" "url": "https://git.stranger.systems/nix/java"
}, },
@ -348,11 +306,11 @@
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1685840432, "lastModified": 1681001314,
"narHash": "sha256-VJIbiKsY7Xy4E4WcgwUt/UiwYDmN5BAk8tngAjcWsqY=", "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "961e99baaaa57f5f7042fe7ce089a88786c839f4", "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -369,11 +327,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686644215, "lastModified": 1685446848,
"narHash": "sha256-FYa25w7gt8FqzWLl4UuwLLG7BiKZiAW/PFGbXWW6UAc=", "narHash": "sha256-vEU1jynjDXwOJESHeJyABqbY/Y+DoihZq9iDVtYgrMg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "f17fb67fc81a9f3b166cee711089466ba6617154", "rev": "b6114e214e5b546c4cceccd33ee6b72294a76b60",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -384,11 +342,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1686452266, "lastModified": 1684899633,
"narHash": "sha256-zLKiX0iu6jZFeZDpR1gE6fNyMr8eiM8GLnj9SoUCjFs=", "narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "2a807ad6e8dc458db08588b78cc3c0f0ec4ff321", "rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -431,11 +389,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1686392259, "lastModified": 1685758009,
"narHash": "sha256-hqSS9hKhWldIZr1bBp9xKhIznnGPICGKzuehd2LH0UA=", "narHash": "sha256-IT4Z5WGhafrq+xbDTyuKrRPRQ1f+kVOtE+4JU1CHFeo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ef24b2fa0c5f290a35064b847bc211f25cb85c88", "rev": "eaf03591711b46d21abc7082a8ebee4681f9dbeb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -447,11 +405,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1686501370, "lastModified": 1685655444,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", "narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", "rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -463,27 +421,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1686501370, "lastModified": 1685801374,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", "rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1686513595,
"narHash": "sha256-H3JNqj7TEiMx5rd8lRiONvgFZvmf3kmwHI2umDdqgFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bb8b5735d6f7e06b9ddd27de115b0600c1ffbdb4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -493,7 +435,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1667292599, "lastModified": 1667292599,
"narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=",
@ -509,7 +451,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1667085676, "lastModified": 1667085676,
"narHash": "sha256-jPHYYoSdrV3ypWG4oi9SUeI2MU6dLjxM88+9io5Rrx0=", "narHash": "sha256-jPHYYoSdrV3ypWG4oi9SUeI2MU6dLjxM88+9io5Rrx0=",
@ -600,13 +542,12 @@
"emacs": "emacs", "emacs": "emacs",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"idris2": "idris2", "idris2": "idris2",
"java": "java", "java": "java",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"quilt-server": "quilt-server", "quilt-server": "quilt-server",
"scripts": "scripts", "scripts": "scripts",
@ -617,7 +558,7 @@
"scripts": { "scripts": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_3",
"swaywm-toggler": "swaywm-toggler" "swaywm-toggler": "swaywm-toggler"
}, },
"locked": { "locked": {
@ -643,11 +584,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1686453485, "lastModified": 1685848844,
"narHash": "sha256-75iPAcS6xuw4SNfqLmFCi9wWG1JmDNKaC8l3WJUkmDk=", "narHash": "sha256-Iury+/SVbAwLES76QJSiKFiQDzmf/8Hsq8j54WF2qyw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "cb85e297937af1bd1434cf5f85a3f86a21dc8207", "rev": "a522e12ee35e50fa7d902a164a9796e420e6e75b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -659,7 +600,7 @@
"swaywm-toggler": { "swaywm-toggler": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1667366374, "lastModified": 1667366374,
@ -736,24 +677,6 @@
"type": "github" "type": "github"
} }
}, },
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1686573751,
"narHash": "sha256-5vnFxEMvn4wzT+XKR5Jo8VSn1hXrdf/mWuTmdHhRFBs=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "6e8fb5509f2c94d09d4efa0f9b1f40b37bf73863",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"wsl": { "wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -763,11 +686,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686480427, "lastModified": 1682982995,
"narHash": "sha256-cs2cg+x21jM3e7gOX9zYRh/19i8DFInBDLtUWMEAdvA=", "narHash": "sha256-PK0pSY48JkcLDFphafjpLqeTDs0XUqGMHjsiNuEq5s0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "c192f97d59acb878fd1f2f6f362c8632d1e8426e", "rev": "c5d7db84c422be515dac8fc26420900c349374e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -775,31 +698,6 @@
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"type": "github" "type": "github"
} }
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685385764,
"narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -9,7 +9,6 @@
url = "github:nix-community/home-manager/release-23.05"; url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "github:hyprwm/Hyprland";
nix-on-droid = { nix-on-droid = {
url = "github:t184256/nix-on-droid"; url = "github:t184256/nix-on-droid";
inputs = { inputs = {
@ -54,8 +53,7 @@
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, sops-nix outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, sops-nix
, home-manager, hyprland, darwin, nixos-generators, wsl, nix-on-droid, ... , home-manager, darwin, nixos-generators, wsl, nix-on-droid, ... }@inputs:
}@inputs:
let let
makeNixosSystem = makeNixosSystem =
{ system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }: { system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }:
@ -65,7 +63,6 @@
modules = [ modules = [
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
hyprland.nixosModules.default
./modules/linux/default.nix ./modules/linux/default.nix
({ pkgs, lib, config, ... }: { ({ pkgs, lib, config, ... }: {
# Configure hostname # Configure hostname
@ -83,10 +80,7 @@
inputs = inputs; inputs = inputs;
nixosConfig = config; nixosConfig = config;
}; };
sharedModules = [ sharedModules = [ ./home-manager/linux/default.nix ];
./home-manager/linux/default.nix
hyprland.homeManagerModules.default
];
}; };
}) })
] ++ extraModules; ] ++ extraModules;
@ -259,15 +253,16 @@
pname = "discord-electron"; pname = "discord-electron";
binaryName = "DiscordCanary"; binaryName = "DiscordCanary";
desktopName = "Discord (Wayland)"; desktopName = "Discord (Wayland)";
version = "0.0.159"; version = "0.0.158";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = url =
"https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
hash = "sha256-rhfp07qojSDJoQayyEwzunHWOsXIR3S42vN4635KGDI="; hash = "sha256-vEkH8erhTP03/hU3TJqAULgaZMfTJl/zPrebEBa5ktA=";
}; };
electron = pkgs.electron_22; electron = pkgs.electron_22;
}; };
swayimg = pkgs.callPackage ./packages/swayimg/default.nix { }; swayimg = pkgs.callPackage ./packages/swayimg/default.nix { };
layman = pkgs.callPackage ./packages/layman/default.nix { };
}; };
}); });
} }

View File

@ -6,9 +6,7 @@ in with lib; {
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects; inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
swaylock-command = '' swaylock-command = ''
${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3''; ${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
fuzzel-command = '' layman-package = inputs.self.packages.${pkgs.system}.layman;
fuzzel -f "Iosevka Sans Quasi" -b "103c48ff" -S "adbcbcff" -s "184956ff" -t "72898fff" -B 5 -r 5 -C "ed8649ff"
'';
wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob; wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob;
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -48,146 +46,17 @@ in with lib; {
# Productivity # Productivity
libreoffice-fresh libreoffice-fresh
## Sway addons ## Sway addons
# sworkstyle - Automatic workspace renaming
swayest-workstyle
font-awesome font-awesome
layman-package
wob-package wob-package
# For fancy x11 scaling # For fancy x11 scaling
sommelier sommelier
# Polkit # Polkit
libsForQt5.polkit-kde-agent
polkit_gnome polkit_gnome
]; ];
######################### #########################
## Hyprland
#########################
# Enable and configure hyperland
wayland.windowManager.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = true;
};
recommendedEnvironment = true;
systemdIntegration = false;
extraConfig = ''
env = XCURSOR_SIZE,24
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 10
border_size = 3
col.active_border = rgba(3fc5b7ee) rgba(70b433ee) 45deg
col.inactive_border = rgba(252525aa)
layout = dwindle
}
decoration {
rounding = 10
blur = true
blur_size = 3
blur_passes = 1
blur_new_optimizations = true
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(181818ee)
}
animations {
enabled = true;
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
gestures {
workspace_swipe = false
}
$mainMod = SUPER
bind = $mainMod, Q, exec, alacritty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, fuzzel -f "Iosevka Sans Quasi" -b "103c48ff" -S "adbcbcff" -s "184956ff" -t "72898fff" -B 5 -r 5 -C "ed8649ff"
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, Z, exec, ${swaylock-command}
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# systemd integration
exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && sleep 2 && systemctl --user start hyprland-session.target
'';
};
# systemd session target
# Specified manually so we can work around an issue with the loading
systemd.user.targets.hyprland-session = {
Unit = {
Description = "Hyprland compositor session";
Documentation = [ "man:systemd.special(7)" ];
BindsTo = [ "graphical-session.target" ];
Wants = [ "graphical-session-pre.target" ];
After = [ "graphical-session-pre.target" ];
};
};
#########################
## Sway ## Sway
######################### #########################
wayland.windowManager.sway = let modifier = "Mod4"; wayland.windowManager.sway = let modifier = "Mod4";
@ -247,7 +116,7 @@ in with lib; {
terminal = "alacritty"; terminal = "alacritty";
# Use krunner (from kde) as our launcher # Use krunner (from kde) as our launcher
menu = '' menu = ''
${fuzzel-command} fuzzel -f "Iosevka Sans Quasi" -b "103c48ff" -S "adbcbcff" -s "184956ff" -t "72898fff" -B 5 -r 5 -C "ed8649ff"
''; '';
# Use waybar, but through systemd # Use waybar, but through systemd
bars = [ bars = [
@ -349,6 +218,74 @@ in with lib; {
######################### #########################
## Sway Addons ## Sway Addons
######################### #########################
## swayest_workstyle
# first setup the service
systemd.user.services.sworkstyle = {
Unit = {
Description = "sworkstyle - sway workspace renamer";
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
${pkgs.swayest-workstyle}/bin/sworkstyle
'';
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
# then setup the configuration
xdg.configFile."sworkstyle" = {
target = "sworkstyle/config.toml";
text = ''
[matching]
'firefox-beta' = ''
'emacs' = ''
'signal' = ''
'chrome-messages.google.com__web-Default' = ''
'chrome-app.cinny.in__-Default' = ''
'chrome-messenger.com__-Default' = ''
'chrome-localhost__iris_-Default' = ''
'org.jellyfin.' = ''
'Mattermost' = ''
'';
};
## layman
# First setup the service
systemd.user.services.layman = {
Unit = {
Description = "layman - sway layout manager";
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
${layman-package}/bin/layman
'';
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
# then setup the configuration
xdg.configFile."layman" = {
target = "layman/config.toml";
text = ''
# The `layman` section configures options that apply to the layman daemon, and any fallback
# values for options not set in a [workspace] or [output] section.
[layman]
defaultLayout = "none" # The default WLM to assign to a workspace
excludedWorkspaces = [] # Numbers of workspaces to be excuded
excludedOutputs = [] # Names of outputs to be excuded
debug = true # Enable logging debug messages globaly
depthLimit = 0 # Autotiling: Default depth limit (disabled) for all workspaces
stackLayout = "splitv" # MasterStack: Default stack layout for all workspaces
stackSidet = "left" # MasterStack: Default stack position for all workspaces
masterWidth = 70 # MasterStack: Default master width for all workspaces
'';
onChange = ''
${layman-package}/bin/layman || true
'';
};
# Setup polkit as a service # Setup polkit as a service
systemd.user.services.polkit-gnome = { systemd.user.services.polkit-gnome = {
Unit = { Unit = {
@ -421,95 +358,26 @@ in with lib; {
} }
]; ];
}; };
systemd.user.services.swayidle = {
Install = { WantedBy = [ "hyprland-session.target" ]; };
};
######################### #########################
## Waybar ## Waybar
######################### #########################
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = package = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar;
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.overrideAttrs
(old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; });
systemd = { enable = false; }; systemd = { enable = false; };
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "top"; position = "bottom";
height = 30; height = 27;
spacing = 4; modules-left = [ "sway/workspaces" "sway/mode" ];
margin-top = 5; modules-center = [ "sway/window" ];
margin-bottom = 0; modules-right = [ "mpd" "clock" "tray" ];
# modules-left = [ "wlr/workspaces" "hyprland/submap" ]; "sway/workspaces" = { disable-scroll = true; };
# modules-center = [ "hyprland/window" ]; "sway/window" = { icon = true; };
# modules-right = [ "mpd" "clock" "tray" ];
modules-center = [
"custom/launcher"
"wlr/workspaces"
"mpd"
# "hyprland/window"
"idle_inhibitor"
"pulseaudio"
"network"
"cpu"
"memory"
# "temperature"
"tray"
"clock"
# "custom/power"
];
"custom/launcher" = {
format = " ";
on-click = fuzzel-command;
on-click-right = "killall fuzzel";
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
pulseaudio = {
scroll-step = 1;
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}";
format-bluetooth-muted = "{icon} {format_source}";
format-muted = "{format_source}";
format-source = "";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
};
on-click = "pavucontrol";
};
network = {
# // "interface": "wlp2*", // (Optional) To force the use of this interface
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "Connected ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
on-click-right = "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = { format = "{}% ({used}GB/{total}GB) "; };
"tray" = {
icon-size = 20;
spacing = 10;
};
"clock" = { format = "{:%I:%M%p %Y-%m-%d}"; }; "clock" = { format = "{:%I:%M%p %Y-%m-%d}"; };
"window" = { icon = true; };
"tray" = { spacing = 5; };
"mpd" = { "mpd" = {
format = format =
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
@ -528,16 +396,15 @@ in with lib; {
}; };
style = '' style = ''
* { * {
border: none; /* `otf-font-awesome` is required to be installed for icons */
border-radius: 0px; font-family: FontAwesome, Iosevka Sans Quasi;
font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 14px;
font-size: 12px;
min-height: 0;
} }
window#waybar { window#waybar {
background-color: transparent; background-color: #103c48;
color: #ffffff; border: 2px solid #2d5b69;
color: #adbcbc;
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -546,35 +413,50 @@ in with lib; {
opacity: 0.2; opacity: 0.2;
} }
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
#workspaces button { #workspaces button {
background: #1f1f1f; padding: 0 5px;
color: #ffffff; background-color: #184956;
border-radius: 20px; color: #72898f;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
} }
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover { #workspaces button:hover {
background: lightblue; background: rgba(0, 0, 0, 0.2);
color: black; box-shadow: inset 0 -3px #ffffff;
border-bottom: 3px solid #ffffff;
} }
#workspaces button.active { #workspaces button.focused {
background: #3f3f3f; background-color: #2d5b69;
} color: #adbcbc;
/* box-shadow: inset 0 -3px #ffffff; */
#workspaces button.active:hover {
background: lightblue;
color: black;
border-bottom: 3px solid #ffffff;
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #eb4d4b; background-color: #2d5b69;
color: #fa5750;
} }
#mode { #mode {
@ -592,45 +474,32 @@ in with lib; {
#network, #network,
#pulseaudio, #pulseaudio,
#custom-media, #custom-media,
#custom-launcher,
#custom-power,
#tray, #tray,
#mode, #mode,
#idle_inhibitor, #idle_inhibitor,
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
color: black;
}
#mpd {
background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#window, #window,
#workspaces { #workspaces {
margin: 0px 4px; margin: 0 4px;
} }
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0px; margin-left: 0;
} }
/* If workspaces is the rightmost module, omit right margin */ /* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces { .modules-right > widget:last-child > #workspaces {
margin-right: 0px; margin-right: 0;
} }
#clock { #clock {
background-color: #FA8BFF; border: 2px solid #41c7b9;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); background-color: #184956;
color: black; color: #41c7b9;
border-radius: 0px 20px 20px 0px;
margin-right: 4px;
} }
#battery { #battery {
@ -665,104 +534,56 @@ in with lib; {
} }
#cpu { #cpu {
background-color: #FA8BFF; background-color: #2ecc71;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); color: #000000;
color: black;
} }
#memory { #memory {
background-color: #FA8BFF; background-color: #9b59b6;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#disk { #disk {
background-color: #FA8BFF; background-color: #964B00;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#backlight { #backlight {
background-color: #FA8BFF; background-color: #90b1b1;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
} }
#network { #network {
background-color: #FA8BFF; background-color: #2980b9;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#network.disconnected { #network.disconnected {
background-color: #FA8BFF; background-color: #f53c3c;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: red;
} }
#pulseaudio { #pulseaudio {
background-color: #FA8BFF; background-color: #f1c40f;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); color: #000000;
color: black;
} }
#pulseaudio.muted { #pulseaudio.muted {
background-color: #FA8BFF; background-color: #90b1b1;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); color: #2a5c45;
color: red;
} }
#custom-media { #custom-media {
background-color: #8EC5FC; background-color: #66cc99;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); color: #2a5c45;
color: black; min-width: 100px;
border-radius: 20px;
margin-right: 5px;
} }
#custom-media.custom-spotify { #custom-media.custom-spotify {
background-color: #8EC5FC; background-color: #66cc99;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#custom-media.custom-vlc { #custom-media.custom-vlc {
background-color: #8EC5FC; background-color: #ffa000;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#custom-power{
background-color: #FA8BFF;
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
font-size: 16px;
border-radius: 19px;
}
#custom-launcher{
background-color: #FA8BFF;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
font-size: 18px;
border-radius: 20px;
}
#custom-updater {
background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
}
#temperature { #temperature {
background-color: #FA8BFF; background-color: #f0932b;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#temperature.critical { #temperature.critical {
@ -770,55 +591,68 @@ in with lib; {
} }
#tray { #tray {
background-color: #FA8BFF; background-color: #4695f7;
background-image: linear-gradient(-45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); border: 2px solid #58a3ff;
color: black;
} }
#tray > .passive { #tray > .passive {
-gtk-icon-effect: dim; -gtk-icon-effect: dim;
background-color: #FA8BFF;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#tray > .needs-attention { #tray > .needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #FA8BFF; background-color: #eb4d4b;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#idle_inhibitor { #idle_inhibitor {
background-color: #FA8BFF; background-color: #2d3436;
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
border-radius: 20px 0px 0px 20px;
} }
#idle_inhibitor.activated { #idle_inhibitor.activated {
background-color: #FA8BFF; background-color: #ecf0f1;
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); color: #2d3436;
color: black; }
border-radius: 20px 0px 0px 20px;
#mpd {
color: #adbcbc;
border: 2px solid #75b938;
background-color: #184956;
} }
#mpd.disconnected {
color: #dbb32d;
border: 2px solid #dbb32d;
}
#mpd.stopped {
color: #fa5750;
border: 2px solid #fa5750;
}
#mpd.paused {
color: #f275be;
border: 2px solid #f275be;
}
#language { #language {
background-color: #FA8BFF; background: #00b093;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); color: #740864;
color: black; padding: 0 5px;
margin: 0 5px;
min-width: 16px; min-width: 16px;
} }
#keyboard-state { #keyboard-state {
background: #97e1ad; background: #97e1ad;
color: #000000; color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px; min-width: 16px;
} }
#keyboard-state > label { #keyboard-state > label {
padding: 0px 5px; padding: 0 5px;
} }
#keyboard-state > label.locked { #keyboard-state > label.locked {
@ -838,7 +672,7 @@ in with lib; {
Service = { Service = {
ExecStart = "${config.programs.waybar.package}/bin/waybar"; ExecStart = "${config.programs.waybar.package}/bin/waybar";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
ExecStartPost = "${pkgs.coreutils}/bin/sleep 1"; ExecstartPost = "${pkgs.coreutils}/bin/sleep 1";
Restart = "on-failure"; Restart = "on-failure";
KillMode = "mixed"; KillMode = "mixed";
}; };

View File

@ -79,9 +79,6 @@ in {
# Setup home manager # Setup home manager
home-manager.users.nathan = import ./home.nix; home-manager.users.nathan = import ./home.nix;
# Disable session persistance
services.logind.killUserProcesses = true;
# TPM setup # TPM setup
security = { tpm2 = { enable = true; }; }; security = { tpm2 = { enable = true; }; };

View File

@ -35,14 +35,26 @@
]; ];
}; };
# Hyprland outputs # Sway background
wayland.windowManager.hyprland.extraConfig = ''
monitor=DP-1,preferred,auto,1.4,bitdepth,10 # Spin up glpaper as a user service so we can have it restart on failure (liable due to kvm switch
input { # disconnecting input)
sensitivity = -0.3 systemd.user.services.glpaper-dp1 = {
# accel_profile = flat Unit = {
Description = "glpaper (DP-1)";
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
/etc/profiles/per-user/nathan/bin/glpaper DP-1 ${
../../custom-files/sway/selen.frag
} }
''; '';
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
# Gammastep # Gammastep
services.gammastep = { services.gammastep = {

View File

@ -239,12 +239,10 @@ in {
substituters = [ substituters = [
"https://nix-cache.mccarty.io/" "https://nix-cache.mccarty.io/"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://hyprland.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nathan-nix-cache:R5/0GiItBM64sNgoFC/aSWuAopOAsObLcb/mwDf335A=" "nathan-nix-cache:R5/0GiItBM64sNgoFC/aSWuAopOAsObLcb/mwDf335A="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
}; };

View File

@ -58,14 +58,6 @@ in with lib; {
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
# package = null; # package = null;
}; };
# Enable and configure hyperland
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = true;
};
};
environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; }; environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; };

View File

@ -0,0 +1,19 @@
{ pkgs, lib, pythonPkgs ? pkgs.python311Packages }:
let
vals = builtins.fromJSON (builtins.readFile ../../sources/layman.json);
inherit pythonPkgs;
f = { buildPythonPackage, i3ipc, setproctitle, tomli, setuptools }:
buildPythonPackage rec {
pname = "layman";
version = "0.0.1";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "frap129";
repo = "layman";
rev = vals.rev;
hash = vals.hash;
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ i3ipc setproctitle tomli ];
};
in pythonPkgs.callPackage f { }

4
sources/layman.json Normal file
View File

@ -0,0 +1,4 @@
{
"rev": "67d8f95f4693d3a1ffa2e7d4dccba4e066dc56a0",
"hash": "sha256-SuedE7AUmZha50zwD0iuBMrQsYoLiJFPbkV4BgnKnCc="
}

View File

@ -15,3 +15,15 @@ jq --null-input \
'{"version": $version, "url": $url, "hash": $hash}' \ '{"version": $version, "url": $url, "hash": $hash}' \
> $DIRECTORY/swayimg.json > $DIRECTORY/swayimg.json
echo "swayimg now at $SWAYIMG_VERSION" echo "swayimg now at $SWAYIMG_VERSION"
# Update layman
LAYMAN_BRANCH=$(curl https://api.github.com/repos/frap129/layman | jq -r '.default_branch')
LAYMAN_REV=$(curl https://api.github.com/repos/frap129/layman/git/refs/heads/$LAYMAN_BRANCH | \
jq -r '.object.sha')
LAYMAN_HASH=$(nix-prefetch fetchFromGitHub --owner frap129 --repo layman --rev $LAYMAN_REV)
jq --null-input \
--arg rev "$LAYMAN_REV" \
--arg hash "$LAYMAN_HASH" \
'{"rev": $rev, "hash": $hash}' \
> $DIRECTORY/layman.json
echo "layman now at $LAYMAN_REV"