Compare commits

..

No commits in common. "67fa717ca2b1f777269e326f2348e3e135225b7a" and "2d1925d0c5f7ae7cbf2b4fcefc7087adee618b5b" have entirely different histories.

25 changed files with 374 additions and 215 deletions

View file

@ -1,8 +1,10 @@
{ pkgs, lib, ... }: { inputs, lib, ... }:
{ {
services.desktopManager.cosmic.enable = true; imports = [ inputs.nixos-cosmic.nixosModules.default ];
# TODO at the moment COSMIC cannot be used alongside Gnome
# https://github.com/lilyinstarlight/nixos-cosmic/issues/17
specialisation = { specialisation = {
cosmic.configuration = { cosmic.configuration = {
services.xserver.displayManager.gdm.enable = lib.mkForce false; services.xserver.displayManager.gdm.enable = lib.mkForce false;

95
flake.lock generated
View file

@ -155,6 +155,22 @@
} }
}, },
"flake-compat_3": { "flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -278,16 +294,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747556831, "lastModified": 1747331121,
"narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=", "narHash": "sha256-3MmiUN/jOHBHQUnjqzg6qKArc17j2OS6jisEppDY4g8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33", "rev": "1eec32f0efe3b830927989767a9e6ece0d82d608",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -330,6 +346,29 @@
"type": "github" "type": "github"
} }
}, },
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_3",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1747566515,
"narHash": "sha256-mBT3EypUn1HZ5iRGDmZQPtVNYxQxnkIsasggSCndYjw=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "93f3add95306179d15f8a6b1cfc87bfdc1702a33",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1747129300, "lastModified": 1747129300,
@ -347,16 +386,32 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1747428706, "lastModified": 1747335874,
"narHash": "sha256-XVds9FkRrY59xRNNq14FNsFGqDiexXX/mlHcX4hPyyk=", "narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2e1496bf8652ff4af4e4d4737277f71e4a4f5cb2", "rev": "ba8b70ee098bc5654c459d6a95dfc498b91ff858",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1747335874,
"narHash": "sha256-IKKIXTSYJMmUtE+Kav5Rob8SgLPnfnq4Qu8LyT4gdqQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ba8b70ee098bc5654c459d6a95dfc498b91ff858",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -417,7 +472,7 @@
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_4",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -447,6 +502,7 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"matrix-appservices": "matrix-appservices", "matrix-appservices": "matrix-appservices",
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
@ -455,6 +511,27 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1747535902,
"narHash": "sha256-rKWBtLcqQeu8PpfKIBn1ORXS2udSH/MwnQFwfSpFOLg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b7a99615d26b82c39b73ccc9026545c3f3403b71",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View file

@ -4,16 +4,18 @@ rec {
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cosmic.cachix.org/"
"https://felschr.cachix.org" "https://felschr.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
"felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A=" "felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A="
]; ];
}; };
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -27,7 +29,7 @@ rec {
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.05"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -67,6 +69,11 @@ rec {
flake = false; flake = false;
}; };
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
openwrt-imagebuilder = { openwrt-imagebuilder = {
url = "github:astro/nix-openwrt-imagebuilder"; url = "github:astro/nix-openwrt-imagebuilder";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -75,7 +82,12 @@ rec {
}; };
outputs = outputs =
inputs: {
self,
nixpkgs,
nixpkgs-unstable,
...
}@inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
@ -86,7 +98,7 @@ rec {
./lib/flake-module.nix ./lib/flake-module.nix
./hosts/flake-module.nix ./hosts/flake-module.nix
./home/flake-module.nix ./home/flake-module.nix
./overlays/flake-module.nix ./overlays.nix
]; ];
flake = { flake = {
inherit nixConfig; inherit nixConfig;
@ -105,6 +117,11 @@ rec {
... ...
}: }:
{ {
_module.args.pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
devShells.default = pkgs.mkShell { inherit (config.checks.pre-commit) shellHook; }; devShells.default = pkgs.mkShell { inherit (config.checks.pre-commit) shellHook; };
checks = { checks = {
@ -112,10 +129,7 @@ rec {
src = ./.; src = ./.;
hooks = { hooks = {
nixfmt-rfc-style.enable = true; nixfmt-rfc-style.enable = true;
shellcheck = { shellcheck.enable = true;
enable = true;
excludes = [ ".envrc" ];
};
}; };
}; };
}; };

View file

@ -65,16 +65,15 @@ in
private = { private = {
id = 0; id = 0;
extraConfig = sharedExtraConfig; extraConfig = sharedExtraConfig;
extensions.packages = commonExtensions; extensions = commonExtensions;
}; };
work = { work = {
id = 1; id = 1;
extraConfig = sharedExtraConfig; extraConfig = sharedExtraConfig;
extensions.packages = extensions =
commonExtensions commonExtensions
++ (with firefox-addons; [ ++ (with firefox-addons; [
# dashlane bitwarden
# bitwarden
react-devtools react-devtools
reduxdevtools reduxdevtools
]); ]);

View file

@ -50,145 +50,124 @@ let
commonSearch = { commonSearch = {
force = true; force = true;
# TODO defaults don't work # TODO defaults don't work
default = "qwant"; default = "Qwant";
privateDefault = "qwant"; privateDefault = "Qwant";
order = [ order = [
"qwant" "Qwant"
"ecosia" "Ecosia"
"ddg" "DuckDuckGo"
"startpage" "Startpage"
"kagi" "kagi"
]; ];
engines = { engines = {
# builtin # builtin
startpage.metaData.alias = "@s"; "Startpage".metaData.alias = "@s";
ddg.metaData.alias = "@d"; "DuckDuckGo".metaData.alias = "@d";
# extra # extra
qwant = { "Qwant" = {
name = "Qwant";
urls = [ { template = "https://www.qwant.com/?q={searchTerms}"; } ]; urls = [ { template = "https://www.qwant.com/?q={searchTerms}"; } ];
iconMapObj."16" = "https://www.qwant.com/favicon.ico"; iconURL = "https://www.qwant.com/favicon.ico";
definedAliases = [ "@q" ]; definedAliases = [ "@q" ];
}; };
ecosia = { "Ecosia" = {
name = "Ecosia";
urls = [ { template = "https://www.ecosia.org/search?q={searchTerms}"; } ]; urls = [ { template = "https://www.ecosia.org/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://www.ecosia.org/favicon.ico"; iconURL = "https://www.ecosia.org/favicon.ico";
definedAliases = [ "@e" ]; definedAliases = [ "@e" ];
}; };
kagi = { "kagi" = {
name = "Kagi";
urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ]; urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://kagi.com/favicon.ico"; iconURL = "https://kagi.com/favicon.ico";
definedAliases = [ "@k" ]; definedAliases = [ "@k" ];
}; };
github = { "GitHub" = {
name = "GitHub";
urls = [ { template = "https://github.com/search?q={searchTerms}"; } ]; urls = [ { template = "https://github.com/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://github.com/favicon.ico"; iconURL = "https://github.com/favicon.ico";
definedAliases = [ "@gh" ]; definedAliases = [ "@gh" ];
}; };
gitlab = { "GitLab" = {
name = "GitLab";
urls = [ { template = "https://gitlab.com/search?search={searchTerms}"; } ]; urls = [ { template = "https://gitlab.com/search?search={searchTerms}"; } ];
iconMapObj."16" = "https://gitlab.com/favicon.ico"; iconURL = "https://gitlab.com/favicon.ico";
definedAliases = [ "@gl" ]; definedAliases = [ "@gl" ];
}; };
codeberg = { "Codeberg" = {
name = "Codeberg";
urls = [ { template = "https://codeberg.org/explore/repos?q={searchTerms}"; } ]; urls = [ { template = "https://codeberg.org/explore/repos?q={searchTerms}"; } ];
iconMapObj."16" = "https://codeberg.org/favicon.ico"; iconURL = "https://codeberg.org/favicon.ico";
definedAliases = [ "@cb" ]; definedAliases = [ "@cb" ];
}; };
nix-packages = { "Nix Packages" = {
name = "Nix Packages";
urls = [ { template = "https://search.nixos.org/packages?query={searchTerms}"; } ]; urls = [ { template = "https://search.nixos.org/packages?query={searchTerms}"; } ];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ]; definedAliases = [ "@np" ];
}; };
nixos-options = { "NixOS Options" = {
name = "NixOS Options";
urls = [ { template = "https://search.nixos.org/options?query={searchTerms}"; } ]; urls = [ { template = "https://search.nixos.org/options?query={searchTerms}"; } ];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ]; definedAliases = [ "@no" ];
}; };
nix-flakes-packages = { "Nix Flakes: Packages" = {
name = "Nix Flakes: Packages";
urls = [ { template = "https://search.nixos.org/flakes?type=packages&query={searchTerms}"; } ]; urls = [ { template = "https://search.nixos.org/flakes?type=packages&query={searchTerms}"; } ];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nfp" ]; definedAliases = [ "@nfp" ];
}; };
nix-flakes-options = { "Nix Flakes: Options" = {
name = "Nix Flakes: Options";
urls = [ { template = "https://search.nixos.org/flakes?type=options&query={searchTerms}"; } ]; urls = [ { template = "https://search.nixos.org/flakes?type=options&query={searchTerms}"; } ];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nfo" ]; definedAliases = [ "@nfo" ];
}; };
nixos-wiki = { "NixOS Wiki" = {
name = "NixOS Wiki";
urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ]; urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nw" ]; definedAliases = [ "@nw" ];
}; };
crates-io = { "Crates.io" = {
name = "Crates.io";
urls = [ { template = "https://crates.io/search?q={searchTerms}"; } ]; urls = [ { template = "https://crates.io/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://crates.io/favicon.ico"; iconURL = "https://crates.io/favicon.ico";
definedAliases = [ "@rc" ]; definedAliases = [ "@rc" ];
}; };
docs-rs = { "Docs.rs" = {
name = "Docs.rs";
urls = [ { template = "https://docs.rs/releases/search?query={searchTerms}"; } ]; urls = [ { template = "https://docs.rs/releases/search?query={searchTerms}"; } ];
iconMapObj."16" = "https://docs.rs/favicon.ico"; iconURL = "https://docs.rs/favicon.ico";
definedAliases = [ "@rd" ]; definedAliases = [ "@rd" ];
}; };
rust-book = { "Rust Book" = {
name = "Rust Book";
urls = [ { template = "https://doc.rust-lang.org/book/?search={searchTerms}"; } ]; urls = [ { template = "https://doc.rust-lang.org/book/?search={searchTerms}"; } ];
iconMapObj."16" = "https://doc.rust-lang.org/book/favicon.svg"; iconURL = "https://doc.rust-lang.org/book/favicon.svg";
definedAliases = [ "@rb" ]; definedAliases = [ "@rb" ];
}; };
rust-std = { "Rust std" = {
name = "Rust std";
urls = [ { template = "https://doc.rust-lang.org/stable/std/?search={searchTerms}"; } ]; urls = [ { template = "https://doc.rust-lang.org/stable/std/?search={searchTerms}"; } ];
iconMapObj."16" = "https://www.rust-lang.org/static/images/favicon.svg"; iconURL = "https://www.rust-lang.org/static/images/favicon.svg";
definedAliases = [ "@rs" ]; definedAliases = [ "@rs" ];
}; };
npm = { "npm" = {
name = "npm";
urls = [ { template = "https://www.npmjs.com/search?q={searchTerms}"; } ]; urls = [ { template = "https://www.npmjs.com/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://static-production.npmjs.com/da3ab40fb0861d15c83854c29f5f2962.png"; iconURL = "https://static-production.npmjs.com/da3ab40fb0861d15c83854c29f5f2962.png";
definedAliases = [ "@npm" ]; definedAliases = [ "@npm" ];
}; };
pypi = { "PyPI" = {
name = "PyPI";
urls = [ { template = "https://pypi.org/search/?q={searchTerms}"; } ]; urls = [ { template = "https://pypi.org/search/?q={searchTerms}"; } ];
iconMapObj."16" = "https://pypi.org/favicon.ico"; iconURL = "https://pypi.org/favicon.ico";
definedAliases = [ "@pypi" ]; definedAliases = [ "@pypi" ];
}; };
stack-overflow = { "Stack Overflow" = {
name = "Stack Overflow";
urls = [ { template = "https://stackoverflow.com/search?q={searchTerms}"; } ]; urls = [ { template = "https://stackoverflow.com/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico"; iconURL = "https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico";
definedAliases = [ "@so" ]; definedAliases = [ "@so" ];
}; };
wikipedia = { "Wikipedia" = {
name = "Wikipedia";
urls = [ { template = "https://en.wikipedia.org/wiki/{searchTerms}"; } ]; urls = [ { template = "https://en.wikipedia.org/wiki/{searchTerms}"; } ];
iconMapObj."16" = "https://en.wikipedia.org/favicon.ico"; iconURL = "https://en.wikipedia.org/favicon.ico";
definedAliases = [ "@w" ]; definedAliases = [ "@w" ];
}; };
wolfram-alpha = { "Wolfram Alpha" = {
name = "Wolfram Alpha";
urls = [ { template = "https://www.wolframalpha.com/input?i={searchTerms}"; } ]; urls = [ { template = "https://www.wolframalpha.com/input?i={searchTerms}"; } ];
iconMapObj."16" = "https://www.wolframalpha.com/_next/static/images/favicon_1zbE9hjk.ico"; iconURL = "https://www.wolframalpha.com/_next/static/images/favicon_1zbE9hjk.ico";
definedAliases = [ "@wa" ]; definedAliases = [ "@wa" ];
}; };
reddit = { "Reddit" = {
name = "Reddit";
urls = [ { template = "https://www.reddit.com/search/?q={searchTerms}"; } ]; urls = [ { template = "https://www.reddit.com/search/?q={searchTerms}"; } ];
iconMapObj."16" = "https://www.reddit.com/favicon.ico"; iconURL = "https://www.reddit.com/favicon.ico";
definedAliases = [ "@r" ]; definedAliases = [ "@r" ];
}; };
}; };
@ -212,12 +191,13 @@ in
id = 0; id = 0;
settings = commonSettings; settings = commonSettings;
search = commonSearch; search = commonSearch;
extensions.packages = commonExtensions; extensions = commonExtensions;
}; };
work = { work = {
id = 1; id = 1;
settings = commonSettings; settings = commonSettings;
extensions.packages = search = commonSearch;
extensions =
commonExtensions commonExtensions
++ (with firefox-addons; [ ++ (with firefox-addons; [
bitwarden bitwarden

View file

@ -26,7 +26,7 @@ let
pdf = [ "re.sonny.Junction.desktop" ] ++ browsers; pdf = [ "re.sonny.Junction.desktop" ] ++ browsers;
ebook = [ "com.github.johnfactotum.Foliate.desktop" ]; ebook = [ "com.github.johnfactotum.Foliate.desktop" ];
magnet = [ "transmission-gtk.desktop" ]; magnet = [ "transmission-gtk.desktop" ];
signal = [ "signal.desktop" ]; signal = [ "signal-desktop.desktop" ];
}; };
mimeMap = { mimeMap = {
@ -89,7 +89,7 @@ let
pdf = [ "application/pdf" ]; pdf = [ "application/pdf" ];
ebook = [ "application/epub+zip" ]; ebook = [ "application/epub+zip" ];
magnet = [ "x-scheme-handler/magnet" ]; magnet = [ "x-scheme-handler/magnet" ];
signal = [ "signal.desktop" ]; signal = [ "signal-desktop.desktop" ];
}; };
associations = associations =

View file

@ -26,9 +26,9 @@
sshKeys = [ "3C48489F3B0FBB44E72180D4B1D7541C201C9987" ]; sshKeys = [ "3C48489F3B0FBB44E72180D4B1D7541C201C9987" ];
defaultCacheTtl = 600; defaultCacheTtl = 600;
defaultCacheTtlSsh = 600; defaultCacheTtlSsh = 600;
pinentry.package = pkgs.pinentry-curses; pinentryPackage = pkgs.pinentry-curses;
}; };
programs.zsh.initContent = '' programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
''; '';
@ -38,5 +38,11 @@
programs.git.defaultProfile = "private"; programs.git.defaultProfile = "private";
home.stateVersion = "25.05"; xdg.configFile."nixpkgs/config.nix".text = ''
{
allowUnfree = true;
}
'';
home.stateVersion = "24.11";
} }

View file

@ -28,9 +28,9 @@ with pkgs;
sshKeys = [ "8A6213DCDAF86BD3A63549FCFDF71B2C92DAE02C" ]; sshKeys = [ "8A6213DCDAF86BD3A63549FCFDF71B2C92DAE02C" ];
defaultCacheTtl = 600; defaultCacheTtl = 600;
defaultCacheTtlSsh = 600; defaultCacheTtlSsh = 600;
pinentry.package = pkgs.pinentry-gnome3; pinentryPackage = pkgs.pinentry-gnome3;
}; };
programs.zsh.initContent = '' programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
''; '';
@ -40,6 +40,12 @@ with pkgs;
defaultProfile = "work"; defaultProfile = "work";
}; };
xdg.configFile."nixpkgs/config.nix".text = ''
{
allowUnfree = true;
}
'';
home.packages = with pkgs; [ home.packages = with pkgs; [
fh fh
@ -69,5 +75,5 @@ with pkgs;
emblem emblem
]; ];
home.stateVersion = "25.05"; home.stateVersion = "24.11";
} }

View file

@ -28,9 +28,9 @@
]; ];
defaultCacheTtl = 600; defaultCacheTtl = 600;
defaultCacheTtlSsh = 600; defaultCacheTtlSsh = 600;
pinentry.package = pkgs.pinentry-gnome3; pinentryPackage = pkgs.pinentry-gnome3;
}; };
programs.zsh.initContent = '' programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
''; '';
@ -38,6 +38,12 @@
programs.git.defaultProfile = "private"; programs.git.defaultProfile = "private";
xdg.configFile."nixpkgs/config.nix".text = ''
{
allowUnfree = true;
}
'';
home.packages = with pkgs; [ home.packages = with pkgs; [
# system # system
gparted gparted
@ -50,6 +56,9 @@
tabbed tabbed
curtail curtail
# work
teams-for-linux
# dev & admin # dev & admin
pods pods
# gaphor # gaphor
@ -73,10 +82,11 @@
raider raider
gnome-obfuscate gnome-obfuscate
yubikey-manager yubikey-manager
yubioath-flutter yubikey-manager-qt
# yubioath-flutter # TODO conflicts with fluffychat
magic-wormhole-rs magic-wormhole-rs
localsend warp
onionshare-gui # onionshare-gui
transmission_4-gtk transmission_4-gtk
unstable.qbittorrent unstable.qbittorrent
fragments fragments
@ -90,5 +100,5 @@
emblem emblem
]; ];
home.stateVersion = "25.05"; home.stateVersion = "24.11";
} }

View file

@ -1,38 +1,24 @@
{ {
self, self,
inputs, inputs,
lib, pkgs,
... ...
}: }:
let let
mkHomeConfiguration = createHomeConfig =
{ name: args:
user, inputs.home-manager.lib.homeManagerConfiguration (
system, {
modules, inherit pkgs;
}: extraSpecialArgs = { inherit inputs; };
inputs.home-manager.lib.homeManagerConfiguration { }
pkgs = self.pkgsFor system; // args
extraSpecialArgs = { inherit inputs; }; );
modules =
(with self.homeModules; [ nixpkgs ])
++ [
{
home.username = user;
home.homeDirectory = "/home/${user}";
}
]
++ modules;
};
in in
{ {
imports = [ inputs.home-manager.flakeModules.home-manager ];
flake = { flake = {
homeModules = { homeModules = {
nixpkgs = import ./modules/nixpkgs.nix;
git = import ./modules/git.nix; git = import ./modules/git.nix;
firefox = import ./modules/firefox/firefox.nix; firefox = import ./modules/firefox/firefox.nix;
tor-browser = import ./modules/firefox/tor-browser.nix; tor-browser = import ./modules/firefox/tor-browser.nix;
@ -44,31 +30,26 @@ in
felschr-work = import ./felschr-work.nix; felschr-work = import ./felschr-work.nix;
}; };
homeConfigurations = { homeConfigurations = {
felschr = mkHomeConfiguration { felschr = createHomeConfig {
user = "felschr";
system = "x86_64-linux";
modules = [ modules = [
self.homeModules.git self.homeModules.git
self.homeModules.felschr self.homeModules.felschr
]; ];
}; };
felschr-server = mkHomeConfiguration { felschr-server = createHomeConfig {
user = "felschr";
system = "x86_64-linux";
modules = [ modules = [
self.homeModules.git self.homeModules.git
self.homeModules.felschr-server self.homeModules.felschr-server
]; ];
}; };
felschr-work = mkHomeConfiguration { felschr-work = createHomeConfig {
user = "felschr";
system = "x86_64-linux";
modules = [ modules = [
self.homeModules.git self.homeModules.git
self.homeModules.felschr-work self.homeModules.felschr-work
]; ];
}; };
}; };
homeManagerModules = lib.warn "`homeManagerModules` is deprecated. Use `homeModules` instead." self.homeModules; # HINT alias for deprecated output
homeManagerModules = self.homeModules;
}; };
} }

View file

@ -1,11 +0,0 @@
_:
{
nixpkgs.config.allowUnfree = true;
xdg.configFile."nixpkgs/config.nix".text = ''
{
allowUnfree = true;
}
'';
}

View file

@ -4,7 +4,6 @@
programs.zellij.enable = true; programs.zellij.enable = true;
programs.zellij.package = pkgs.unstable.zellij; programs.zellij.package = pkgs.unstable.zellij;
programs.zellij.enableZshIntegration = true; programs.zellij.enableZshIntegration = true;
programs.zellij.exitShellOnExit = true;
programs.zellij.settings = { programs.zellij.settings = {
default_layout = "compact"; # or default default_layout = "compact"; # or default
default_mode = "normal"; default_mode = "normal";
@ -18,4 +17,8 @@
strider.path = "strider"; strider.path = "strider";
}; };
}; };
home.sessionVariables = {
ZELLIJ_AUTO_EXIT = "true";
};
} }

View file

@ -29,7 +29,7 @@ in
file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh"; file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh";
} }
]; ];
initContent = '' initExtra = ''
export KEYTIMEOUT=1 export KEYTIMEOUT=1
ZSH_AUTOSUGGEST_USE_ASYNC=1 ZSH_AUTOSUGGEST_USE_ASYNC=1

View file

@ -4,7 +4,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
signal-desktop signal-desktop
(makeAutostartItem { (makeAutostartItem {
name = "signal"; name = "signal-desktop";
package = signal-desktop; package = signal-desktop;
prependExtraArgs = [ "--start-in-tray" ]; prependExtraArgs = [ "--start-in-tray" ];
}) })

View file

@ -22,6 +22,8 @@
../../services/open-webui.nix ../../services/open-webui.nix
]; ];
nixpkgs.config.allowUnfree = true;
boot.loader.systemd-boot.memtest86.enable = true; boot.loader.systemd-boot.memtest86.enable = true;
# running binaries for other architectures # running binaries for other architectures

View file

@ -50,6 +50,8 @@ in
age.secrets.cloudflare.file = ../../secrets/cloudflare.age; age.secrets.cloudflare.file = ../../secrets/cloudflare.age;
age.secrets.hostKey.file = ../../secrets/home-server/hostKey.age; age.secrets.hostKey.file = ../../secrets/home-server/hostKey.age;
nixpkgs.config.allowUnfree = true;
networking.domain = "home.felschr.com"; networking.domain = "home.felschr.com";
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [

14
overlays.nix Normal file
View file

@ -0,0 +1,14 @@
{ inputs, ... }:
{
flake = {
overlays.default = final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (prev) system;
config.allowUnfree = true;
};
inherit (inputs.self.packages.${prev.system}) deconz brlaser;
vimPlugins = prev.vimPlugins // final.callPackage ./pkgs/vim-plugins { inherit inputs; };
};
};
}

View file

@ -1,27 +0,0 @@
{ self, inputs, ... }:
{
flake = {
overlays.default = final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (prev) system;
config.allowUnfree = true;
};
inherit (inputs.self.packages.${prev.system}) deconz;
vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { inherit inputs; };
};
pkgsFor =
system:
import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config.allowUnfree = true;
};
};
perSystem =
{ system, ... }:
{
_module.args.pkgs = self.pkgsFor system;
};
}

119
pkgs/brlaser/default.nix Normal file
View file

@ -0,0 +1,119 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
zlib,
cups,
...
}:
# maintained fork of brlaser with newer drivers (including Brother HL-L2370DN)
stdenv.mkDerivation (finalAttrs: {
pname = "brlaser";
version = "6.2.6";
src = fetchFromGitHub {
owner = "Owl-Maintain";
repo = "brlaser";
rev = "v${finalAttrs.version}";
hash = "sha256-+W84s3Nulj0kz2h1WE7/QGysVylKkN/xNqcNvrQz6D8=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
zlib
cups
];
cmakeFlags = [
"-DCUPS_SERVER_BIN=lib/cups"
"-DCUPS_DATA_DIR=share/cups"
];
meta = with lib; {
description = "A CUPS driver for Brother laser printers";
longDescription = ''
While most Brother printers can use standard printer languages like PCL or PostScript, some models do not. If you have a monochrome Brother laser printer (or multi-function device) and the other open-source drivers are not working, brlaser might be able to help. Additionally, there have been reports of some non-Brother printers working with this driver.
The following printers have been reported to work with this driver:
Brother DCP-1510 series
Brother DCP-1600 series
Brother DCP-1610W series
Brother DCP-7020
Brother DCP-7030
Brother DCP-7040
Brother DCP-7055
Brother DCP-7055W
Brother DCP-7060D
Brother DCP-7065DN
Brother DCP-7070DW
Brother DCP-7080
Brother DCP-7080D
Brother DCP-8065DN
Brother DCP-L2500D series
Brother DCP-L2510D series
Brother DCP-L2520D series
Brother DCP-L2520DW series
Brother DCP-L2537DW
Brother DCP-L2540DW series
Brother DCP-L2550DW series
Brother FAX-2820
Brother FAX-2840
Brother HL-1110 series
Brother HL-1200 series
Brother HL-2030 series
Brother HL-2130 series
Brother HL-2140 series
Brother HL-2220 series
Brother HL-2230 series
Brother HL-2240D series
Brother HL-2250DN series
Brother HL-2260
Brother HL-2270DW series
Brother HL-2280DW
Brother HL-5030 series
Brother HL-5040 series
Brother HL-L2300D series
Brother HL-L2305 series
Brother HL-L2310D series
Brother HL-L2320D series
Brother HL-L2335D series
Brother HL-L2340D series
Brother HL-L2350DW series
Brother HL-L2360D series
Brother HL-L2370DN series
Brother HL-L2375DW series
Brother HL-L2380DW series
Brother HL-L2390DW
Brother HL-L5000D series
Brother MFC-1810 series
Brother MFC-1910W series
Brother MFC-7240
Brother MFC-7320
Brother MFC-7340
Brother MFC-7360N
Brother MFC-7365DN
Brother MFC-7420
Brother MFC-7440N
Brother MFC-7460DN
Brother MFC-7860DW
Brother MFC-8710DW
Brother MFC-8860DN
Brother MFC-9160
Brother MFC-L2700DN series
Brother MFC-L2700DW series
Brother MFC-L2710DN series
Brother MFC-L2710DW series
Brother MFC-L2750DW series
Fuji Xerox DocuPrint P265 dw
Lenovo LJ2650DN
'';
homepage = "https://github.com/Owl-Maintain/brlaser";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ felschr ];
changelog = "https://github.com/Owl-Maintain/brlaser/releases/tag/${finalAttrs.src.rStijnDWev}";
};
})

View file

@ -4,6 +4,7 @@
{ self', pkgs, ... }: { self', pkgs, ... }:
{ {
packages = { packages = {
brlaser = pkgs.callPackage ./brlaser { };
deconz = pkgs.qt5.callPackage ./deconz { }; deconz = pkgs.qt5.callPackage ./deconz { };
}; };

View file

@ -1,39 +1,21 @@
#! /usr/bin/env bash #! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gnupg
# shellcheck shell=bash # shellcheck shell=bash
set -euo pipefail set -euo pipefail
read -rp 'enter email address: ' email EMAIL=$0
echo "$email" # create master key
gpg2 --quick-gen-key "Felix Schröter <$EMAIL>" ed25519 sign 1y
# create main key
gpg2 --quick-gen-key "Felix Schröter <$email>" ed25519 sign 1y || true
keyid=$(gpg2 --list-keys --with-colons "$email" | grep "^pub:" | cut -d: -f5)
fpr=$(gpg2 --list-keys --with-colons "$email" | grep "^fpr:" | cut -d: -f10)
# create subkeys # create subkeys
gpg2 --quick-add-key "$fpr" cv25519 encr 1y gpg2 --quick-add-key KEYID cv25519 encr 1y
gpg2 --quick-add-key "$fpr" ed25519 auth 1y gpg2 --quick-add-key KEYID ed25519 auth 1y
gpg2 --quick-add-key "$fpr" ed25519 sign 1y gpg2 --quick-add-key KEYID ed25519 sign 1y
echo "created keys:" # for signing git commits use the sign subkey
gpg2 --list-keys --with-subkey-fingerprint "$keyid" # and add the public sign subkey to GitHub/GitLab
sign=$(gpg2 --list-keys --with-colons "$email" | grep "::s::" -A 1) # show info
sign_keyid=$(echo "$sign" | grep "^sub:" | cut -d: -f5) gpg2 --list-keys --with-subkey-fingerprint
auth=$(gpg2 --list-keys --with-colons "$email" | grep "::a::" -A 1)
auth_keyid=$(echo "$auth" | grep "^sub:" | cut -d: -f5)
pub_sign=$(gpg2 --armor --export "$sign_keyid!")
pub_ssh=$(gpg2 --export-ssh-key "$auth_keyid")
echo "public PGP key with signing subkey:"
echo "$pub_sign"
echo ""
echo "public SSH key for authenticating with git forges:"
echo "$pub_ssh"
echo ""

View file

@ -100,7 +100,8 @@ in
settings = { settings = {
theme = "dark"; theme = "dark";
server = { server = {
address = "tcp://[::1]:${toString port}"; host = "::1";
inherit port;
}; };
default_2fa_method = "webauthn"; default_2fa_method = "webauthn";
default_redirection_url = "https://${domain}"; default_redirection_url = "https://${domain}";

View file

@ -6,7 +6,7 @@
noto-fonts-extra noto-fonts-extra
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
nerd-fonts.symbols-only (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
fira-code fira-code
]; ];
fonts.fontconfig.defaultFonts = { fonts.fontconfig.defaultFonts = {

View file

@ -4,8 +4,6 @@ let
inherit (inputs.self.outputs) nixConfig; inherit (inputs.self.outputs) nixConfig;
in in
{ {
nixpkgs.config.allowUnfree = true;
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "04:00"; dates = "04:00";

View file

@ -6,8 +6,8 @@
}: }:
{ {
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;