mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: use unstable for thinkpads, only fetch used krops inputs
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
colourPairs = lib.getAttrs colourNames colours;
|
||||
in {
|
||||
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
|
||||
background_opacity = 0.9;
|
||||
window.opacity = 0.9;
|
||||
colors = {
|
||||
primary = {inherit (colours) background foreground;};
|
||||
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
|
||||
|
||||
@@ -30,7 +30,6 @@ in {
|
||||
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
|
||||
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
|
||||
unstable = import <nixpkgs-unstable> {inherit (config.nixpkgs) config;};
|
||||
};
|
||||
};
|
||||
overlays = [
|
||||
@@ -80,7 +79,6 @@ in {
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraModules = [pkgs.pulseaudio-modules-bt];
|
||||
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
|
||||
zeroconf.discovery.enable = true;
|
||||
extraConfig = ''
|
||||
@@ -247,7 +245,7 @@ in {
|
||||
./polkit.nix
|
||||
./power-action.nix
|
||||
./printing.nix
|
||||
./openweathermap.nix
|
||||
# ./openweathermap.nix
|
||||
./wallpaper.nix
|
||||
./redshift.nix
|
||||
./retiolum.nix
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
];
|
||||
};
|
||||
users.users.me.extraGroups = ["docker"];
|
||||
environment.systemPackages = [pkgs.docker pkgs.docker_compose];
|
||||
environment.systemPackages = [pkgs.docker pkgs.docker-compose];
|
||||
}
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
alegreya
|
||||
alegreya-sans
|
||||
amiri
|
||||
unstable.annapurna-sil
|
||||
annapurna-sil
|
||||
cantarell-fonts
|
||||
charis-sil
|
||||
corefonts
|
||||
crimson
|
||||
eb-garamond
|
||||
etBook
|
||||
unstable.ezra-sil
|
||||
ezra-sil
|
||||
fira
|
||||
font-awesome-ttf
|
||||
unstable.galatia-sil
|
||||
font-awesome
|
||||
galatia-sil
|
||||
gentium
|
||||
gfs-fonts
|
||||
gyre-fonts
|
||||
|
||||
@@ -29,7 +29,7 @@ in {
|
||||
lib.mapAttrsToList
|
||||
(language: variant:
|
||||
pkgs.writers.writeDashBin "kb-${language}" ''
|
||||
${pkgs.xlibs.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
|
||||
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
|
||||
'')
|
||||
languages;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ in {
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
packages = [
|
||||
plugins = [
|
||||
pkgs.networkmanager-openvpn
|
||||
pkgs.networkmanager-fortisslvpn
|
||||
];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
})
|
||||
];
|
||||
|
||||
astrolog = pkgs.unstable.astrolog.overrideAttrs (old:
|
||||
astrolog = pkgs.astrolog.overrideAttrs (old:
|
||||
old
|
||||
// {
|
||||
installPhase = ''
|
||||
@@ -100,10 +100,10 @@ in {
|
||||
htmlq
|
||||
xsv # csv toolkit
|
||||
xmlstarlet # xml toolkit
|
||||
manpages
|
||||
man-pages
|
||||
posix_man_pages
|
||||
tree
|
||||
fuse_exfat # to mount windows drives
|
||||
exfat # to mount windows drives
|
||||
parallel # for parallel, since moreutils shadows task spooler
|
||||
ripgrep # better grep
|
||||
rlwrap
|
||||
@@ -115,17 +115,17 @@ in {
|
||||
arandr # xrandr for noobs
|
||||
libnotify # for notify-send
|
||||
xclip # clipboard CLI
|
||||
dragon-drop # drag and drop
|
||||
xdragon # drag and drop
|
||||
xorg.xkill # kill by clicking
|
||||
audacity
|
||||
calibre
|
||||
electrum
|
||||
inkscape
|
||||
astrolog
|
||||
unstable.anki # flashcards
|
||||
anki # flashcards
|
||||
jbofihe # lojbanic software
|
||||
unstable.zoom-us # video conferencing
|
||||
unstable.alejandra # nix formatter
|
||||
zoom-us # video conferencing
|
||||
alejandra # nix formatter
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
mupdf
|
||||
@@ -230,7 +230,7 @@ in {
|
||||
]))
|
||||
python3Packages.poetry
|
||||
|
||||
htmlTidy
|
||||
html-tidy
|
||||
nodePackages.csslint
|
||||
nodePackages.jsonlint
|
||||
nodePackages.prettier
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
|
||||
|
||||
toSymbols = pkgs.writers.writeDash "to-symbols" ''
|
||||
${pkgs.gnused}/bin/sed '
|
||||
s/\bTri\b/△/;
|
||||
@@ -49,8 +52,8 @@ in {
|
||||
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
|
||||
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
|
||||
{
|
||||
${pkgs.unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
||||
${pkgs.unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
|
||||
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
||||
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
|
||||
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
|
||||
'');
|
||||
};
|
||||
|
||||
@@ -23,6 +23,11 @@ in {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
xsession.pointerCursor = theme.cursor // {size = 16;};
|
||||
home.pointerCursor =
|
||||
theme.cursor
|
||||
// {
|
||||
size = 16;
|
||||
x11.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
28
flake.lock
generated
28
flake.lock
generated
@@ -18,20 +18,20 @@
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixos-unstable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1651519540,
|
||||
"narHash": "sha256-3k6p8VsTwwRPQjE8rrMh+o2AZACZn/eeYJ7ivdQ/Iro=",
|
||||
"lastModified": 1653340164,
|
||||
"narHash": "sha256-t6BPApyasx6FOv2cEVyFBXvkEDrknyUe7bngMbNSBkA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d93d56ab8c1c6aa575854a79b9d2f69d491db7d0",
|
||||
"rev": "e66f0ff69a6c0698b35034b842c4b68814440778",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-21.11",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixos-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
@@ -107,7 +107,7 @@
|
||||
"url": "https://cgit.krebsco.de/nix-writers"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1653087707,
|
||||
"narHash": "sha256-zfno3snrzZTWQ2B7K53QHrGZwrjnJLTRPalymrSsziU=",
|
||||
@@ -123,18 +123,18 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1653180606,
|
||||
"narHash": "sha256-dYJLG7fgp4/SAhOM5d725KZtCVZuEMS6tSI098n7SA0=",
|
||||
"lastModified": 1653060744,
|
||||
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "af0bcde689ed5263e9a0df36116f7583163eb032",
|
||||
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -179,8 +179,8 @@
|
||||
"menstruation-backend": "menstruation-backend",
|
||||
"menstruation-telegram": "menstruation-telegram",
|
||||
"nix-writers": "nix-writers",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixos-stable": "nixos-stable",
|
||||
"nixos-unstable": "nixos-unstable",
|
||||
"recht": "recht",
|
||||
"retiolum": "retiolum",
|
||||
"scripts": "scripts",
|
||||
|
||||
62
flake.nix
62
flake.nix
@@ -2,16 +2,17 @@
|
||||
description = "niveum: packages, modules, systems";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-21.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixos-unstable";
|
||||
};
|
||||
krops = {
|
||||
url = "github:Mic92/krops";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixos-stable";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
@@ -70,8 +71,8 @@
|
||||
menstruation-backend,
|
||||
menstruation-telegram,
|
||||
nix-writers,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nixos-unstable,
|
||||
nixos-stable,
|
||||
recht,
|
||||
retiolum,
|
||||
scripts,
|
||||
@@ -82,8 +83,12 @@
|
||||
tuna,
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
source = name:
|
||||
pkgs = nixos-stable.legacyPackages.${system};
|
||||
source = {
|
||||
sources,
|
||||
unstable,
|
||||
name,
|
||||
}:
|
||||
{
|
||||
niveum.file = toString ./.;
|
||||
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
|
||||
@@ -95,24 +100,32 @@
|
||||
dir = toString ~/.password-store;
|
||||
name = "shared";
|
||||
};
|
||||
nixpkgs.file = toString (
|
||||
if unstable
|
||||
then inputs.nixos-unstable
|
||||
else inputs.nixos-stable
|
||||
);
|
||||
}
|
||||
// nixpkgs.lib.mapAttrs' (name: value: {
|
||||
// nixos-stable.lib.mapAttrs' (name: value: {
|
||||
inherit name;
|
||||
value.file = toString value;
|
||||
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs);
|
||||
}) (nixos-stable.lib.filterAttrs (name: _: builtins.elem name sources) inputs);
|
||||
deployScriptFor = {
|
||||
name,
|
||||
user ? "root",
|
||||
host,
|
||||
}: let
|
||||
inherit (import ./lib/default.nix) sshPort;
|
||||
in
|
||||
unstable ? false,
|
||||
sshPort ? (import ./lib/default.nix).sshPort,
|
||||
sources,
|
||||
}:
|
||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||
source = krops.lib.evalSource [(source name)];
|
||||
target = "root@${host}:${toString sshPort}";
|
||||
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
||||
target = "${user}@${host}:${toString sshPort}";
|
||||
});
|
||||
in {
|
||||
apps.${system} = let
|
||||
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
|
||||
externalNetwork = import ./lib/external-network.nix;
|
||||
deployScripts = forSystems (name: {
|
||||
name = "deploy-${name}";
|
||||
value = {
|
||||
@@ -120,9 +133,20 @@
|
||||
program = deployScriptFor {
|
||||
inherit name;
|
||||
host =
|
||||
if name != "ful"
|
||||
then "${name}.r"
|
||||
else "130.61.217.114";
|
||||
if externalNetwork ? name
|
||||
then externalNetwork.${name}
|
||||
else "${name}.r";
|
||||
unstable = name == "kabsa" || name == "manakish";
|
||||
sources =
|
||||
["nix-writers" "nixpkgs" "retiolum"]
|
||||
++ {
|
||||
zaatar = ["traadfri"];
|
||||
ful = [];
|
||||
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
|
||||
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
|
||||
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];
|
||||
}
|
||||
.${name};
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ in
|
||||
'';
|
||||
|
||||
tag = wrapScript {
|
||||
packages = [pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags];
|
||||
packages = [pkgs.vorbis-tools pkgs.python3Packages.eyeD3 opustags];
|
||||
script = "${voidrice}/.local/bin/tag";
|
||||
name = "tag";
|
||||
};
|
||||
|
||||
@@ -87,10 +87,6 @@ in {
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
unstable = import <nixpkgs-unstable> {inherit (config.nixpkgs) config;};
|
||||
};
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
|
||||
services.nginx = {
|
||||
|
||||
Reference in New Issue
Block a user