Initial transfer to sway on work PC #2

Merged
erwin merged 23 commits from feature/sway-at-work into main 2023-09-29 11:52:47 +02:00
27 changed files with 652 additions and 280 deletions

View file

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1692476235,
"narHash": "sha256-NGUDp/24HCIVWE0xZNHIdzz3q2WDk7MQz1wC7ub/e2U=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "76af3eb198f376303194c31a83f2399a043acf1b",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"caddy-with-plugins": { "caddy-with-plugins": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@ -40,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688082682, "lastModified": 1695511445,
"narHash": "sha256-nMG/A7qYm9pyHJowKuaNmNYgo748xZrzMJPqtoGozSA=", "narHash": "sha256-mnE14re43v3/Jc50Jv0BKPMtEk7FEtDSligP6B5HwlI=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "4d350bb94fdf8ec9d2e22d68bb13e136d73aa9d8", "rev": "3de322e06fc88ada5e3589dc8a375b73e749f512",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,11 +81,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694511957, "lastModified": 1695864092,
"narHash": "sha256-teCLY68npc0nuyOHYJURLuJSOME0yotJI29WXcpF1E4=", "narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "be98cffef02e5ebf438ea80b34b86e669c48eff1", "rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -84,11 +105,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1694574651, "lastModified": 1695956969,
"narHash": "sha256-D+pBiAEMsCRO9WP8Jn5oPsisr+ftFz7fgZOaix6MYUM=", "narHash": "sha256-mSwhyEAq7c/4MgxCTKNg86YrrWkKAuJejVK2XEY5Sl4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "844afe34cbe49d83e7ae016564db4f72237a0bfa", "rev": "f32c6288cc50298c04a86364e5947c28981c2f7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -170,6 +191,27 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
@ -243,11 +285,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688393735, "lastModified": 1695978977,
"narHash": "sha256-tmur+qyhQUo3jRIRSaaD1ubhQ1h/Kk7f6KvEb/AO0Eg=", "narHash": "sha256-sOy7shWnJ9+qBdaGZS3wcQC308t0vM+1hnRQHztIsmk=",
"ref": "main", "ref": "main",
"rev": "e76736b4c23769824e38e9ccf9e8677439dd9138", "rev": "8f1b9b7f9c10bdf0992547910821357038e2ec85",
"revCount": 94, "revCount": 99,
"type": "git", "type": "git",
"url": "https://git.datarift.nl/erwin/ha-now-playing.git" "url": "https://git.datarift.nl/erwin/ha-now-playing.git"
}, },
@ -264,11 +306,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694585439, "lastModified": 1695940289,
"narHash": "sha256-70BlfEsdURx5f8sioj8JuM+R4/SZFyE8UYrULMknxlI=", "narHash": "sha256-z9DItQvCasu7sexaz1GZ+uOymDRpuEehFwRKToCooJ8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a0ddf43b6268f1717afcda54133dea30435eb178", "rev": "9d4cdf8cc4da54beb5d2e927af7a259bb4a00645",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -287,11 +329,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694526290, "lastModified": 1695847632,
"narHash": "sha256-HiWr+tfJE/hcn8atRC0S5KweSUknQLEduPLTEiSr5J8=", "narHash": "sha256-RXDg0N2e8YYVKkQt7BE40y03QxYEYds4/+HrwpIMPoM=",
"owner": "astro", "owner": "astro",
"repo": "microvm.nix", "repo": "microvm.nix",
"rev": "03e7f11cf915a911277c2cdea5d7da9717597aa2", "rev": "67bf176ff48141292a66d8bce541463ee49d0fb5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -333,11 +375,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694177726, "lastModified": 1695485017,
"narHash": "sha256-eaYATUkElEbXGcehShhYfcGhrjfTMQEmJqxvO+/5ciw=", "narHash": "sha256-aQyRBJnT4tftexM/Y3etfOk8tfMFZzt+vSVtL2J0KLY=",
"owner": "oxalica", "owner": "oxalica",
"repo": "nil", "repo": "nil",
"rev": "4775e34c30f6101a9bb4364a0c7e4aae4ae43f11", "rev": "510bc6e9b41d39c81b9c815065cb5b7e23a2428c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -368,11 +410,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1694432324, "lastModified": 1695887975,
"narHash": "sha256-bo3Gv6Cp40vAXDBPi2XiDejzp/kyz65wZg4AnEWxAcY=", "narHash": "sha256-u3+5FR12dI305jCMb0fJNQx2qwoQ54lv1tPoEWp0hmg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "ca41b8a227dd235b1b308217f116c7e6e84ad779", "rev": "adcfd6aa860d1d129055039696bc457af7d50d0e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -383,11 +425,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1694422566, "lastModified": 1695830400,
"narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -417,11 +459,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1694426803, "lastModified": 1695825837,
"narHash": "sha256-osusXQo0zkEqs502SNMffsKp1O9evpDM54A37MuyT2Q=", "narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9a74ffb2ca1fc91c6ccc48bd3f8cbc1501bf7b8a", "rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -449,11 +491,11 @@
}, },
"nixpkgs-stable_3": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1693675694, "lastModified": 1694908564,
"narHash": "sha256-2pIOyQwGyy2FtFAUIb8YeKVmOCcPOTVphbAvmshudLE=", "narHash": "sha256-ducA98AuWWJu5oUElIzN24Q22WlO8bOfixGzBgzYdVc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5601118d39ca9105f8e7b39d4c221d3388c0419d", "rev": "596611941a74be176b98aeba9328aa9d01b8b322",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -463,22 +505,6 @@
"type": "github" "type": "github"
} }
}, },
"nomachine": {
"locked": {
"lastModified": 1682367457,
"narHash": "sha256-Hec3l+TYmE9ICUz7NxmRtfljUl6ludm8QKSdiW21WRg=",
"owner": "rytec-nl",
"repo": "nixpkgs",
"rev": "63686e66b7441ef5d5e7a6277d1c36c413548b05",
"type": "github"
},
"original": {
"owner": "rytec-nl",
"ref": "submit/add-nomachine-server",
"repo": "nixpkgs",
"type": "github"
}
},
"pamedia": { "pamedia": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
@ -520,11 +546,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1694364351, "lastModified": 1695576016,
"narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=", "narHash": "sha256-71KxwRhTfVuh7kNrg3/edNjYVg9DCyKZl2QIKbhRggg=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7", "rev": "cb770e93516a1609652fa8e945a0f310e98f10c0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -535,11 +561,12 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"anyrun": "anyrun",
"caddy-with-plugins": "caddy-with-plugins", "caddy-with-plugins": "caddy-with-plugins",
"disko": "disko", "disko": "disko",
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"eww": "eww", "eww": "eww",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"ha-now-playing": "ha-now-playing", "ha-now-playing": "ha-now-playing",
"home-manager": "home-manager", "home-manager": "home-manager",
@ -549,7 +576,6 @@
"nixinate": "nixinate", "nixinate": "nixinate",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nomachine": "nomachine",
"pamedia": "pamedia", "pamedia": "pamedia",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
@ -592,11 +618,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694571081, "lastModified": 1695953491,
"narHash": "sha256-VRA+gxhe4aciWTQ5uCKVY2ubOclk18h2aRlLzPbLqMw=", "narHash": "sha256-TO26givgQP4F8rXPu5rgP2K82mJyNN+X491FJYLra2s=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "0282ed291f0e25f30770df5d3f1ca33908ce44a4", "rev": "fb948d8eaf5d7c720dec92eb9c75193963fa0c52",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -613,11 +639,11 @@
"nixpkgs-stable": "nixpkgs-stable_3" "nixpkgs-stable": "nixpkgs-stable_3"
}, },
"locked": { "locked": {
"lastModified": 1694495315, "lastModified": 1695284550,
"narHash": "sha256-sZEYXs9T1NVHZSSbMqBEtEm2PGa7dEDcx0ttQkArORc=", "narHash": "sha256-z9fz/wz9qo9XePEvdduf+sBNeoI9QG8NJKl5ssA8Xl4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "ea208e55f8742fdcc0986b256bdfa8986f5e4415", "rev": "2f375ed8702b0d8ee2430885059d5e7975e38f78",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -78,10 +78,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nomachine = {
url = "github:rytec-nl/nixpkgs/submit/add-nomachine-server";
};
eww = { eww = {
url = "github:elkowar/eww"; url = "github:elkowar/eww";
inputs = { inputs = {
@ -90,6 +86,11 @@
}; };
}; };
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
caddy-with-plugins = { caddy-with-plugins = {
url = "github:eboskma/caddy-with-plugins"; url = "github:eboskma/caddy-with-plugins";
inputs = { inputs = {
@ -151,12 +152,6 @@
{ {
nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nixpkgs = nixpkgs =
let
nomachine-pkgs = import nomachine {
inherit system;
config.allowUnfree = true;
};
in
{ {
overlays = [ overlays = [
self.overlays.default self.overlays.default
@ -166,9 +161,6 @@
nil.overlays.default nil.overlays.default
inputs.eww.overlays.default inputs.eww.overlays.default
inputs.rust-overlay.overlays.default inputs.rust-overlay.overlays.default
(_final: _prev: {
nomachine = nomachine-pkgs.nomachine;
})
] ++ nixpkgs.lib.optional (system == "aarch64-linux") ] ++ nixpkgs.lib.optional (system == "aarch64-linux")
(_final: super: { (_final: super: {
makeModulesClosure = x: makeModulesClosure = x:

View file

@ -0,0 +1,117 @@
{ pkgs, config, lib, flake-inputs, ... }:
with lib;
let
cfg = config.eboskma.programs.anyrun;
anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}";
in
{
options.eboskma.programs.anyrun = { enable = mkEnableOption "anyrun"; };
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
plugins = with anyrunPkgs; [
applications
dictionary
rink
stdin
shell
symbols
translate
];
width = { fraction = 0.3; };
x = { fraction = 0.5; };
y = { absolute = 60; };
layer = "overlay";
};
extraConfigFiles = {
"applications.ron".text = ''
Config(
desktop_actions: true,
max_entries: 100,
terminal: Some("${config.wayland.windowManager.sway.config.terminal}")
)
'';
};
extraCss = ''
window {
background: transparent; /* rgba(0, 0, 0, 0.8);*/
}
#match,
#entry,
#plugin,
#main {
background: transparent;
}
#match.activatable {
padding: 12px 14px;
border-radius: 12px;
color: white;
margin-top: 4px;
border: 2px solid transparent;
transition: all 0.3s ease;
}
#match.activatable:not(:first-child) {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: 2px solid rgba(255, 255, 255, 0.1);
}
#match.activatable #match-title {
font-size: 1.3rem;
}
#match.activatable:hover {
border: 2px solid rgba(255, 255, 255, 0.4);
}
#match-title, #match-desc {
color: inherit;
}
#match.activatable:hover, #match.activatable:selected {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
#match.activatable:selected + #match.activatable, #match.activatable:hover + #match.activatable {
border-top: 2px solid transparent;
}
#match.activatable:selected, #match.activatable:hover:selected {
background: rgba(255,255,255,0.1);
border: 2px solid #333333;
border-top: 2px solid #333333;
}
#match, #plugin {
box-shadow: none;
}
#entry {
color: white;
box-shadow: none;
border-radius: 12px;
border: 2px solid #333333;
}
box#main {
background: rgba(36, 39, 58, 0.7);
border-radius: 16px;
padding: 8px;
box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5);
}
row:first-child {
margin-top: 6px;
}
'';
};
};
}

View file

@ -402,12 +402,7 @@ Use Iosevka as font.
my/default-font-width))) my/default-font-width)))
#+end_src #+end_src
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp
(set-face-attribute 'default nil
:family my/default-font
:weight my/default-font-weight
:width my/default-font-width
:height my/default-font-height)
(set-face-attribute 'variable-pitch nil (set-face-attribute 'variable-pitch nil
:family my/variable-width-font :family my/variable-width-font
:weight my/default-font-weight :weight my/default-font-weight
@ -1592,6 +1587,14 @@ Dhall is a programmable configuration language that you can think of as: JSON +
:mode "\\.dhall\\'") :mode "\\.dhall\\'")
#+end_src #+end_src
*** nushell
[[http://www.nushell.sh/][nushell]] is a new type of shell that operates on typed data
#+begin_src emacs-lisp
(use-package nushell-ts-mode)
#+end_src
* Org * Org
** Main org setup ** Main org setup

View file

@ -188,13 +188,14 @@
(defwidget title [] (defwidget title []
(label :text {wm-info.title})) (label :text {wm-info.title}))
(defwidget left [] (defwidget left [is-home]
(box :orientation "h" (box :orientation "h"
:halign "start" :halign "start"
:space-evenly false :space-evenly false
:spacing 5 :spacing 5
(workspaces) (workspaces)
(ha-now-playing))) (ha-now-playing
:visible is-home)))
(defwidget right [] (defwidget right []
(box :orientation "h" (box :orientation "h"
@ -216,7 +217,17 @@
:hexpand false :hexpand false
:vexpand false :vexpand false
(centerbox (centerbox
(left) (left :is-home true)
(title)
(end))))
(defwidget bar-work-left []
(box :class "eww_bar"
:orientation "h"
:hexpand false
:vexpand false
(centerbox
(left :is-home false)
(title) (title)
(end)))) (end))))
@ -236,3 +247,16 @@
:vexpand false :vexpand false
:exclusive true :exclusive true
(bar)) (bar))
(defwindow bar-work
:geometry (geometry :x "0"
:y "0"
:width "100%"
:height "32px"
:anchor "top center")
:stacking "fg"
:monitor 0
:exclusive true
:hexpand false
:vexpand false
(bar-work-left))

View file

@ -84,7 +84,12 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.firefox; package = pkgs.firefox.override {
cfg = {
enableGnomeExtensions = true;
enableSpeechSynthesisSupport = true;
};
};
profiles = { profiles = {
private = { private = {

View file

@ -101,7 +101,7 @@ in
defaultBranch = "main"; defaultBranch = "main";
}; };
core = { core = {
# editor = "${pkgs.neovim}/bin/nvim"; editor = "${config.eboskma.programs.emacs.package}/bin/emacsclient";
pager = "${pkgs.bat}/bin/bat"; pager = "${pkgs.bat}/bin/bat";
}; };
merge = { merge = {

View file

@ -2,12 +2,6 @@
with lib; with lib;
let let
cfg = config.eboskma.programs.nushell; cfg = config.eboskma.programs.nushell;
nushell_plugin_formats = pkgs.callPackage ./plugin-formats.nix {
inherit (pkgs) stdenv lib rustPlatform;
inherit (pkgs.darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation;
nushell = config.programs.nushell.package;
};
in in
{ {
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; }; options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
@ -32,7 +26,7 @@ in
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim) $env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim)
register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query
register ${nushell_plugin_formats}/bin/nu_plugin_formats register ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats
use kink.nu use kink.nu
''; '';

View file

@ -1,34 +0,0 @@
{ stdenv
, lib
, rustPlatform
, nushell
, IOKit
, CoreFoundation
}:
let
pname = "nushell_plugin_formats";
in
rustPlatform.buildRustPackage {
inherit pname;
version = nushell.version;
src = nushell.src;
cargoHash = "sha256-pwOdSJHd9njR0lr4n2EzCcqRonh0cbBHGZgAJ1l8FEk=";
buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
cargoBuildFlags = [ "--package nu_plugin_formats" ];
# compilation fails with a missing symbol
doCheck = false;
meta = with lib; {
description = "A Nushell plugin to convert various data formats";
homepage = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_formats";
license = licenses.mpl20;
maintainers = [{ email = "erwin@datarift.nl"; github = "eboskma"; name = "Erwin Boskma"; githubId = 346752; }];
platforms = with platforms; all;
};
}

View file

@ -14,19 +14,57 @@ with lib; let
# swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ${wallpapers.qhd} --fade-in 0.5 --scaling fill"; # swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ${wallpapers.qhd} --fade-in 0.5 --scaling fill";
swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${wallpapers.qhd} --scaling fill"; swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${wallpapers.qhd} --scaling fill";
rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh); rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh);
ewwDaemon =
let
path = lib.makeBinPath (with pkgs; [ ha-now-playing jaq pamedia bash helvum pavucontrol ]);
in
pkgs.writeShellScript "eww-daemon" ''
export PATH=${path}:''${PATH}
${config.eboskma.programs.eww.package}/bin/eww kill
${config.eboskma.programs.eww.package}/bin/eww daemon
'';
in in
{ {
options.eboskma.programs.sway.enable = mkEnableOption "Enable sway"; options.eboskma.programs.sway = {
enable = mkEnableOption "Enable sway";
output = mkOption {
description = "An attribute set that defines output modules. See the sway-output(5) manpage for options";
type = types.attrsOf (types.attrsOf types.str);
default = { };
};
input = mkOption {
description = "An attribute set that defines input modules. See the sway-input(5) manpage for options";
type = types.attrsOf (types.attrsOf types.str);
default = { };
};
startup = mkOption {
description = "Commands that should be executed at startup.";
type = types.listOf (types.submodule {
options = {
command = mkOption {
type = types.str;
description = "Command that will be executed on startup.";
};
always = mkOption {
type = types.bool;
default = false;
description = "Whether to run command on each ${moduleName} restart.";
};
};
});
};
workspaceOutputs = mkOption {
description = "Assign workspaces to outputs";
type = types.listOf (types.submodule {
options = {
output = mkOption {
description = "Name(s) of the output to assign";
type = with types; either str (listOf str);
apply = lists.toList;
default = "";
};
workspace = mkOption {
description = "Name of the workspace to assign";
type = types.str;
default = "";
};
};
});
default = [ ];
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -36,9 +74,8 @@ in
assigns = { assigns = {
"1" = [{ app_id = "firefox"; }]; "1" = [{ app_id = "firefox"; }];
"2" = [{ app_id = "Alacritty"; } { app_id = "foot"; }]; "2" = [{ app_id = "foot"; }];
"3" = [{ class = "Code"; } { app_id = "emacs"; }]; "3" = [{ class = "Code"; } { app_id = "emacs"; }];
"9" = [{ class = "Steam"; }];
}; };
bars = [ ]; bars = [ ];
@ -84,6 +121,8 @@ in
defaultWorkspace = "workspace number 1"; defaultWorkspace = "workspace number 1";
workspaceOutputAssign = cfg.workspaceOutputs;
left = "n"; left = "n";
down = "e"; down = "e";
up = "i"; up = "i";
@ -106,30 +145,11 @@ in
smartBorders = "on"; smartBorders = "on";
}; };
input = { input = cfg.input;
"36125:40349:splitKB_Kyria" = { output = cfg.output;
xkb_layout = "us";
xkb_options = "lv3:ralt_switch,eurosign:5";
};
"1133:49291:Logitech_G502_HERO_SE" = {
natural_scroll = "enabled";
};
};
output = { # menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
"Virtual-1" = { menu = "${config.programs.anyrun.package}/bin/anyrun";
bg = "${wallpapers.hd} fill";
mode = "1920x1080@60Hz";
};
"DP-2" = {
bg = "${./wallpapers/jwst-saturn-nircam-2560.png} fill";
mode = "2560x1440@165Hz";
adaptive_sync = "on";
max_render_time = "2";
};
};
menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
keybindings = { keybindings = {
"${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}"; "${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
@ -225,7 +245,6 @@ in
}; };
}; };
# terminal = "${pkgs.alacritty}/bin/alacritty";
terminal = "${pkgs.foot}/bin/foot"; terminal = "${pkgs.foot}/bin/foot";
window = { window = {
@ -241,10 +260,7 @@ in
}; };
}; };
startup = [ startup = cfg.startup;
{ command = toString ewwDaemon; always = true; }
{ command = "${config.eboskma.programs.eww.package}/bin/eww open bar-home"; always = true; }
];
}; };
extraConfig = '' extraConfig = ''
for_window [app_id="^.*"] inhibit_idle fullscreen for_window [app_id="^.*"] inhibit_idle fullscreen
@ -307,8 +323,8 @@ in
} }
{ {
timeout = 1200; timeout = 1200;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; command = "${pkgs.sway}/bin/swaymsg 'output * power off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * power on'";
} }
]; ];
}; };

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 9.8 MiB

View file

@ -14,6 +14,25 @@ let
in in
''${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}'') ''${pkgs.nitrogen}/bin/nitrogen --head=${monitor} --set-color=${cfg.backgroundColor} --set-tiled ${image}'')
(zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images))))); (zipLists cfg.images (builtins.genList (x: x) (builtins.length cfg.images)))));
wallpaperConfig = {
options = {
name = mkOption {
description = "The base filename of the image, without size and extension.";
type = types.str;
};
sizes = mkOption {
description = "The sizes this wallpaper comes in, as specified in the filename.";
type = with types; listOf int;
};
extension = mkOption {
description = "The extension of the wallpaper";
type = types.enum [ "jpg" "png" "gif" ];
};
};
};
in in
{ {
options.eboskma.wallpapers = { options.eboskma.wallpapers = {
@ -25,8 +44,8 @@ in
example = "#ff0000"; example = "#ff0000";
}; };
images = mkOption { images = mkOption {
description = "Image(s) to use as wallpapers. For multiple monitors, either set a single image to use on all monitors, or set a list with as many images as monitors you have"; description = "Images to make available as wallpaper. The files should be named as `<name>-<size>.<ext>` and be placed in the `wallpapers` subdirectory";
type = with types; oneOf [ path (nonEmptyListOf path) ]; type = with types; listOf (submodule wallpaperConfig);
}; };
}; };
@ -39,7 +58,5 @@ in
notification = false; notification = false;
} }
]; ];
}; };
} }

View file

@ -286,7 +286,7 @@
links = { links = {
"40-enp4s0" = { "40-enp4s0" = {
matchConfig = { matchConfig = {
Name = "enp4s0"; OriginalName = "enp4s0";
}; };
linkConfig = { linkConfig = {
WakeOnLan = "magic"; WakeOnLan = "magic";
@ -359,10 +359,15 @@
statdPort = 4100; statdPort = 4100;
}; };
environment.systemPackages = with pkgs; [ environment = {
appimage-run sessionVariables = {
tailscale AMD_VULKAN_ICD = "RADV";
]; };
systemPackages = with pkgs; [
appimage-run
tailscale
];
};
sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = { sops.secrets = {

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ nixos-hardware, nomachine, microvm, ... }: { nixos-hardware, microvm, ... }:
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
imports = imports =
@ -11,7 +11,7 @@
nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-pc-ssd nixos-hardware.nixosModules.common-pc-ssd
"${nomachine}/nixos/modules/services/admin/nomachine.nix" # "${nomachine}/nixos/modules/services/admin/nomachine.nix"
microvm.nixosModules.host microvm.nixosModules.host
@ -38,6 +38,7 @@
desktop = { desktop = {
enable = true; enable = true;
wayland = true;
}; };
docker = { docker = {
enable = true; enable = true;
@ -46,13 +47,18 @@
}; };
fonts.enable = true; fonts.enable = true;
gnome.enable = true; gnome.enable = true;
greetd = {
enable = true;
sway = true;
wayvnc = true;
};
kanata = { kanata = {
enable = true; enable = true;
devices = [ devices = [
"/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd" "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd"
]; ];
}; };
lightdm.enable = true; lightdm.enable = false;
networking.enable = true; networking.enable = true;
nix-common = { nix-common = {
enable = true; enable = true;
@ -93,7 +99,7 @@
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
forceFullCompositionPipeline = true; # forceFullCompositionPipeline = true;
}; };
opengl = { opengl = {
@ -122,11 +128,16 @@
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
# This triggers a warning on stateVersions < 23.11 if set to true
swraid.enable = false;
}; };
time.timeZone = "Europe/Amsterdam"; time.timeZone = "Europe/Amsterdam";
console.useXkbConfig = true; console = {
font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
useXkbConfig = true;
};
networking = { networking = {
hostName = "mimir"; hostName = "mimir";
@ -239,6 +250,9 @@
}; };
# programs.ssh.startAgent = true; # programs.ssh.startAgent = true;
programs = {
gnome-disks.enable = true;
};
services = { services = {
openssh.enable = true; openssh.enable = true;
@ -249,6 +263,16 @@
tailscale.enable = true; tailscale.enable = true;
udisks2 = {
enable = true;
};
udev = {
extraRules = ''
ACTION=="add", ATTRS{idVendor}=="0781", ATTRS{idProduct}=="55b1", ATTRS{serial}=="A20033BEAC21B773", NAME="vault"
'';
};
xserver = { xserver = {
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
@ -270,11 +294,6 @@
}; };
}; };
nxserver = {
enable = true;
openFirewall = true;
};
icecream.daemon = { icecream.daemon = {
enable = true; enable = true;
@ -285,9 +304,15 @@
}; };
}; };
environment.systemPackages = with pkgs; [ environment = {
appimage-run systemPackages = with pkgs; [
]; appimage-run
];
sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
};
};
# sops = { # sops = {
# defaultSopsFile = ./secrets.yaml; # defaultSopsFile = ./secrets.yaml;

View file

@ -87,7 +87,7 @@ in
QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct"; QT_QPA_PLATFORMTHEME = "qt5ct";
SDL_VIDEODRIVER = "wayland"; # SDL_VIDEODRIVER = "wayland";
AMD_VULKAN_ICD = "RADV"; AMD_VULKAN_ICD = "RADV";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}) })

View file

@ -5,14 +5,31 @@
}: }:
with lib; let with lib; let
cfg = config.eboskma.greetd; cfg = config.eboskma.greetd;
steamCfg = config.programs.steam;
style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css); # style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css);
wallpaper = ../../home-manager/modules/sway/wallpapers/river-2560.png;
style = builtins.readFile ./greetd.css;
swaySession = pkgs.writeShellScript "sway-session" ''
${pkgs.sway}/bin/sway --unsupported-gpu
'';
steam-gamescope =
let
exports = builtins.attrValues (builtins.mapAttrs (n: v: "export ${n}=${v}") steamCfg.gamescopeSession.env);
in
pkgs.writeShellScriptBin "steam-gamescope" ''
${builtins.concatStringsSep "\n" exports}
gamescope --steam ${toString steamCfg.gamescopeSession.args} -- steam -tenfoot -pipewire-dmabuf
'';
in in
{ {
options.eboskma.greetd = { options.eboskma.greetd = {
enable = mkEnableOption "enable greetd"; enable = mkEnableOption "enable greetd";
sway = mkEnableOption "sway"; sway = mkEnableOption "sway";
steam = mkEnableOption "steam";
wayvnc = mkEnableOption "wayvnc";
}; };
config = config =
@ -29,7 +46,7 @@ in
}; };
programs.regreet = { programs.regreet = {
enable = true; enable = false;
settings = { settings = {
background = { background = {
path = ../../home-manager/modules/sway/wallpapers/river-2560.png; path = ../../home-manager/modules/sway/wallpapers/river-2560.png;
@ -53,59 +70,64 @@ in
security.pam.services.greetd.u2fAuth = false; security.pam.services.greetd.u2fAuth = false;
environment.systemPackages = with pkgs; [ pantheon.elementary-gtk-theme pantheon.elementary-icon-theme ];
# exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css; swaymsg exit" # exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
environment.etc = { networking.firewall.allowedTCPPorts = lib.mkIf cfg.wayvnc [ 5900 ];
"greetd/sway-config" = {
text = '' environment = {
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. systemPackages = with pkgs; [ pantheon.elementary-gtk-theme pantheon.elementary-icon-theme ];
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" etc = {
# bindsym Mod4+shift+f exec swaynag \ "greetd/sway-config" = {
# -t warning \ text = lib.concatStringsSep "\n"
# -m 'What do you want to do?' \ ((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0") ++
# -b 'Poweroff' 'systemctl poweroff' \ [
# -b 'Reboot' 'systemctl reboot' ''
include /etc/sway/config.d/* exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${wallpaper}; swaymsg exit"
''; include /etc/sway/config.d/*
user = "greeter"; ''
group = "greeter"; ]);
}; user = "greeter";
"greetd/environments" = { group = "greeter";
text = concatStringsSep "\n" ((optional cfg.sway "${pkgs.sway}/bin/sway") };
++ [ "${pkgs.bash}/bin/bash" ]); "greetd/environments" = {
user = "greeter"; text = concatStringsSep "\n" ((optional cfg.sway "${swaySession}")
group = "greeter"; ++ (optional cfg.steam "${steam-gamescope}")
}; ++ [
"greetd/gtkgreet.css" = { "${pkgs.bash}/bin/bash"
text = style; ]);
user = "greeter"; user = "greeter";
group = "greeter"; group = "greeter";
}; };
"sway/config.d/systemd-env.conf" = { "greetd/gtkgreet.css" = {
text = '' text = style;
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK user = "greeter";
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK group = "greeter";
''; };
}; "sway/config.d/systemd-env.conf" = {
"xdg/gtk-3.0/settings.ini" = { text = ''
text = generators.toINI { } { exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
Settings = { exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
gtk-theme-name = "elementary"; '';
gtk-icon-theme-name = "elementary"; };
gtk-cursor-theme-name = "elementary"; "xdg/gtk-3.0/settings.ini" = {
gtk-application-prefer-dark-theme = "true"; text = generators.toINI { } {
Settings = {
gtk-theme-name = "elementary";
gtk-icon-theme-name = "elementary";
gtk-cursor-theme-name = "elementary";
gtk-application-prefer-dark-theme = "true";
};
}; };
}; };
}; "xdg/gtk-4.0/settings.ini" = {
"xdg/gtk-4.0/settings.ini" = { text = generators.toINI { } {
text = generators.toINI { } { Settings = {
Settings = { gtk-theme-name = "elementary";
gtk-theme-name = "elementary"; gtk-icon-theme-name = "elementary";
gtk-icon-theme-name = "elementary"; gtk-cursor-theme-name = "elementary";
gtk-cursor-theme-name = "elementary"; gtk-application-prefer-dark-theme = "true";
gtk-application-prefer-dark-theme = "true"; };
}; };
}; };
}; };

View file

@ -1,5 +1,4 @@
window { window {
background-image: url("file://{WALLPAPER}");
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }

View file

@ -2,12 +2,12 @@
with pkgs; with pkgs;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rofi-wayland-unwrapped"; pname = "rofi-wayland-unwrapped";
version = "1.7.5"; version = "1.7.5+wayland2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lbonn"; owner = "lbonn";
repo = "rofi"; repo = "rofi";
rev = "${version}+wayland1"; rev = version;
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "ddKLV7NvqgTQl5YlAEyBK0oalcJsLASK4z3qArQPUDQ="; sha256 = "ddKLV7NvqgTQl5YlAEyBK0oalcJsLASK4z3qArQPUDQ=";
}; };

View file

@ -2,6 +2,16 @@
with lib; let with lib; let
cfg = config.eboskma.users.erwin; cfg = config.eboskma.users.erwin;
bt = config.eboskma.bluetooth; bt = config.eboskma.bluetooth;
ewwDaemon =
let
path = lib.makeBinPath (with pkgs; [ ha-now-playing jaq pamedia bash helvum pavucontrol ]);
in
pkgs.writeShellScript "eww-daemon" ''
export PATH=${path}:''${PATH}
${config.home-manager.users.erwin.eboskma.programs.eww.package}/bin/eww $@
'';
in in
{ {
config = config =
@ -12,6 +22,7 @@ in
eboskma = { eboskma = {
programs = { programs = {
alacritty.enable = false; alacritty.enable = false;
anyrun.enable = true;
atuin.enable = true; atuin.enable = true;
bat.enable = true; bat.enable = true;
cargo = { cargo = {
@ -89,7 +100,29 @@ in
solvespace.enable = true; solvespace.enable = true;
ssh.enable = true; ssh.enable = true;
starship.enable = true; starship.enable = true;
sway.enable = true; sway = {
enable = true;
output = {
"DP-2" = {
bg = "${../../home-manager/modules/sway/wallpapers/jwst-saturn-nircam-2560.png} fill";
mode = "2560x1440@165Hz";
adaptive_sync = "on";
max_render_time = "2";
};
};
input = {
"36125:40349:splitKB_Kyria" = {
xkb_layout = "us";
xkb_options = "lv3:ralt_switch,eurosign:5";
};
"1133:49291:Logitech_G502_HERO_SE" = {
natural_scroll = "enabled";
};
};
startup = [
{ command = "${ewwDaemon} --restart open bar-home"; always = true; }
];
};
swaynotificationcenter.enable = true; swaynotificationcenter.enable = true;
tea = { tea = {
enable = true; enable = true;
@ -159,6 +192,7 @@ in
procs procs
prusa-slicer prusa-slicer
qgis qgis
remmina
ripgrep ripgrep
scid-vs-pc scid-vs-pc
signal-desktop signal-desktop
@ -166,6 +200,7 @@ in
steam steam
steamcmd steamcmd
steam-tui steam-tui
stellarium
# super-slicer-latest # super-slicer-latest
units units
unzip unzip
@ -174,6 +209,13 @@ in
zeal zeal
] ]
++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]); ++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);
pointerCursor = {
name = "elementary";
package = pkgs.pantheon.elementary-gtk-theme;
gtk.enable = true;
x11.enable = true;
};
}; };
xdg = { xdg = {
@ -276,6 +318,7 @@ in
imports = [ imports = [
../../modules/options ../../modules/options
inputs.anyrun.nixosModules.home-manager
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
}; };
@ -289,10 +332,33 @@ in
package = pkgs.steam.override { package = pkgs.steam.override {
extraPkgs = sp: with sp; [ gamescope ]; extraPkgs = sp: with sp; [ gamescope ];
}; };
gamescopeSession = {
enable = true;
args = [
"--rt"
"--output-width"
"2560"
"--output-height"
"1440"
"--adaptive-sync"
"--filter"
"fsr"
"--expose-wayland"
];
# env = config.environment.sessionVariables;
};
}; };
gamescope = { gamescope = {
enable = true; enable = true;
capSysNice = true;
args = [ args = [
"--output-width"
"2560"
"--output-height"
"1440"
"--filter"
"fsr"
"--rt" "--rt"
"--fullscreen" "--fullscreen"
]; ];

View file

@ -3,21 +3,51 @@ with lib;
let let
cfg = config.eboskma.users.erwin; cfg = config.eboskma.users.erwin;
remoteSessionScript = pkgs.writeShellScriptBin "remote-session" '' # remoteSessionScript = pkgs.writeShellScriptBin "remote-session" ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 2560x1440 # ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 2560x1440
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 2560x1440 --right-of DP-0 # ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 2560x1440 --right-of DP-0
${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png} # ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png}
${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png} # ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png}
systemctl --user restart polybar # systemctl --user restart polybar
''; # '';
localSessionScript = pkgs.writeShellScriptBin "local-session" '' # localSessionScript = pkgs.writeShellScriptBin "local-session" ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3840x2160 # ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3840x2160
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 3840x2160 --right-of DP-0 # ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 3840x2160 --right-of DP-0
${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png} # ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png}
${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} # ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png}
systemctl --user restart polybar # systemctl --user restart polybar
''; # '';
ewwDaemon =
let
path = lib.makeBinPath (with pkgs; [ jaq pamedia bash helvum pavucontrol ]);
in
pkgs.writeShellScript "eww-daemon" ''
export PATH=${path}:''${PATH}
${config.home-manager.users.erwin.eboskma.programs.eww.package}/bin/eww $@
'';
workspacePartition = builtins.concatLists (builtins.attrValues (builtins.mapAttrs
(
name: workspaces:
let
output =
if name == "right"
then "DP-1"
else "DP-3";
in
builtins.map
(ws: {
inherit output;
workspace = toString ws;
})
workspaces
)
(builtins.partition
(n: (trivial.mod n 2) != 0)
(lists.range 1 10))));
in in
{ {
config = mkIf cfg.work { config = mkIf cfg.work {
@ -27,7 +57,8 @@ in
eboskma = { eboskma = {
var.workSystem = true; var.workSystem = true;
programs = { programs = {
alacritty.enable = true; alacritty.enable = false;
anyrun.enable = true;
atuin.enable = true; atuin.enable = true;
bat.enable = true; bat.enable = true;
cargo = { cargo = {
@ -39,10 +70,10 @@ in
}; };
}; };
dropbox.enable = true; dropbox.enable = true;
dunst.enable = true; dunst.enable = false;
emacs = { emacs = {
enable = true; enable = true;
package = pkgs.emacs-unstable; package = pkgs.emacs-unstable-pgtk;
# .override { # .override {
# treeSitterPlugins = builtins.attrValues (filterAttrs (_: isDerivation) pkgs.tree-sitter-grammars); # treeSitterPlugins = builtins.attrValues (filterAttrs (_: isDerivation) pkgs.tree-sitter-grammars);
# }; # };
@ -50,12 +81,17 @@ in
}; };
eww = { eww = {
enable = true; enable = true;
package = pkgs.eww-wayland;
}; };
firefox = { firefox = {
enable = true; enable = true;
work = true; work = true;
}; };
fish.enable = true; fish.enable = true;
foot = {
enable = true;
server = false;
};
git = { git = {
enable = true; enable = true;
name = "Erwin Boskma"; name = "Erwin Boskma";
@ -65,7 +101,7 @@ in
}; };
gpg.enable = true; gpg.enable = true;
i3 = { i3 = {
enable = true; enable = false;
startupCommands = [ startupCommands = [
{ {
command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --left-of DP-4"; command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --left-of DP-4";
@ -82,10 +118,10 @@ in
]; ];
}; };
mpd.enable = true; mpd.enable = true;
nushell.enable = true;
picom.enable = true;
polybar.enable = true;
neovim.enable = true; neovim.enable = true;
nushell.enable = true;
picom.enable = false;
polybar.enable = false;
rclone = { rclone = {
enable = true; enable = true;
mounts = [ mounts = [
@ -103,25 +139,78 @@ in
}; };
rofi = { rofi = {
enable = true; enable = true;
terminal = config.home-manager.users.erwin.xsession.windowManager.i3.config.terminal; package = pkgs.rofi-wayland;
terminal = config.home-manager.users.erwin.wayland.windowManager.sway.config.terminal;
}; };
ssh.enable = true; ssh.enable = true;
starship.enable = true; starship.enable = true;
zellij = { sway = {
enable = true; enable = true;
copyCommand = "${pkgs.xsel}/bin/xsel --clipboard"; output = {
"DP-1" = {
bg = "${../../home-manager/modules/sway/wallpapers/river-3840.png} fill";
mode = "3840x2160@60Hz";
position = "0 0";
};
"DP-3" = {
bg = "${../../home-manager/modules/sway/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} fill";
mode = "3840x2160@60Hz";
position = "3840 0";
};
};
input = {
"1241:662:USB-HID_Keyboard" = {
xkb_layout = "us";
xkb_options = "lv3:ralt_switch,eurosign:5";
};
"1133:49257:Logitech_USB_Laser_Mouse" = {
natural_scroll = "enabled";
pointer_accel = "1";
};
};
startup = [
{ command = "${ewwDaemon} --restart open bar-work"; always = true; }
{ command = "${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0"; }
];
workspaceOutputs = workspacePartition;
};
swaynotificationcenter.enable = true;
zellij = {
enable = false;
copyCommand = "${pkgs.wl-clipboard}/bin/wl-copy";
}; };
}; };
services = { services = {
xbanish.enable = true; xbanish.enable = false;
}; };
}; };
programs.home-manager.enable = true; programs = {
programs.command-not-found.enable = true; home-manager.enable = true;
command-not-found.enable = true;
};
services = {
gnome-keyring = {
enable = true;
components = [ "pkcs11" "ssh" "secrets" ];
};
udiskie = {
enable = true;
tray = "auto";
notify = true;
settings = {
program_options = {
menu = "nested";
};
device_config = [
{
device_file = "/dev/loop*";
ignore = true;
}
];
};
};
services.gnome-keyring = {
enable = true;
components = [ "pkcs11" "ssh" "secrets" ];
}; };
home = { home = {
@ -172,8 +261,8 @@ in
zathura zathura
zeal zeal
localSessionScript # localSessionScript
remoteSessionScript # remoteSessionScript
] ]
++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]); ++ (with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);
@ -255,8 +344,14 @@ in
}; };
}; };
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ];
};
imports = [ imports = [
../../modules/options ../../modules/options
inputs.anyrun.nixosModules.home-manager
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
}; };
@ -277,7 +372,7 @@ in
exportConfiguration = true; exportConfiguration = true;
windowManager.i3 = { windowManager.i3 = {
enable = true; enable = false;
package = pkgs.i3-gaps; package = pkgs.i3-gaps;
extraPackages = with pkgs; [ i3lock-color ]; extraPackages = with pkgs; [ i3lock-color ];
}; };