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