stuff
This commit is contained in:
parent
041535655b
commit
c7c11e2780
@ -1,5 +1,12 @@
|
||||
{ pkgs, lib, budUtils, ... }: {
|
||||
bud.cmds = with pkgs; {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
budUtils,
|
||||
...
|
||||
}:
|
||||
{
|
||||
bud.cmds =
|
||||
with pkgs; {
|
||||
get = {
|
||||
writer = budUtils.writeBashWithPaths [nixUnstable git coreutils];
|
||||
synopsis = "get [DEST]";
|
||||
|
30
default.nix
30
default.nix
@ -1,31 +1,17 @@
|
||||
let
|
||||
inherit (default.inputs.nixos) lib;
|
||||
|
||||
default = (import ./lib/compat).defaultNix;
|
||||
|
||||
ciSystems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
filterSystems = lib.filterAttrs
|
||||
(system: _: lib.elem system ciSystems);
|
||||
|
||||
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
|
||||
ciSystems = ["aarch64-linux" "i686-linux" "x86_64-linux"];
|
||||
filterSystems = lib.filterAttrs (system: _: lib.elem system ciSystems);
|
||||
recurseIntoAttrsRecursive =
|
||||
lib.mapAttrs (_: v:
|
||||
if lib.isAttrs v
|
||||
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
|
||||
else v
|
||||
);
|
||||
|
||||
systemOutputs = lib.filterAttrs
|
||||
(name: set: lib.isAttrs set
|
||||
&& lib.any
|
||||
(system: set ? ${system} && name != "legacyPackages")
|
||||
ciSystems
|
||||
)
|
||||
else v);
|
||||
systemOutputs =
|
||||
lib.filterAttrs
|
||||
(name: set: lib.isAttrs set && lib.any (system: set ? ${system} && name != "legacyPackages") ciSystems)
|
||||
default.outputs;
|
||||
|
||||
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
|
||||
in
|
||||
(recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; }
|
||||
|
168
flake.lock
168
flake.lock
@ -1,5 +1,26 @@
|
||||
{
|
||||
"nodes": {
|
||||
"alejandra": {
|
||||
"inputs": {
|
||||
"flakeCompat": "flakeCompat",
|
||||
"nixpkgs": [
|
||||
"nixos"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1645204343,
|
||||
"narHash": "sha256-h/R5uZwiCPh/i8eOcGgAD1hRFF6gHvD1GYZxkKYXTaQ=",
|
||||
"owner": "kamadorueda",
|
||||
"repo": "alejandra",
|
||||
"rev": "4a7a938e8d29a9a3b7f45660f0f7a3f6247965bf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kamadorueda",
|
||||
"repo": "alejandra",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"blank": {
|
||||
"locked": {
|
||||
"lastModified": 1625557891,
|
||||
@ -17,11 +38,11 @@
|
||||
},
|
||||
"cachix": {
|
||||
"locked": {
|
||||
"lastModified": 1637798660,
|
||||
"narHash": "sha256-MrPmoGeiOjlT17j3ZQx6iab07YVnomRiBFLcOCiCYnk=",
|
||||
"lastModified": 1642244250,
|
||||
"narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "91e6a9a6568f751bb10222a937507e7e151a035e",
|
||||
"rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -34,7 +55,10 @@
|
||||
"deploy": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": [
|
||||
"digga",
|
||||
"latest"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
@ -71,7 +95,6 @@
|
||||
"blank": "blank",
|
||||
"deploy": "deploy",
|
||||
"devshell": "devshell",
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils-plus": "flake-utils-plus",
|
||||
"home-manager": [
|
||||
"home"
|
||||
@ -86,11 +109,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1640031018,
|
||||
"narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=",
|
||||
"lastModified": 1643510242,
|
||||
"narHash": "sha256-9C9DyJhQ5bevk0CEEjGct+U9EqUgHg8T70nxz47zjMI=",
|
||||
"owner": "divnix",
|
||||
"repo": "digga",
|
||||
"rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6",
|
||||
"rev": "33bfb05b8a148d8ad6a842de74e22209bf9fe5d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -133,34 +156,35 @@
|
||||
},
|
||||
"flake-utils-plus": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2"
|
||||
"flake-utils": "flake-utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1638994888,
|
||||
"narHash": "sha256-iz/ynGNZlvqKCOnFrEKqGA+BVKGQMG+g2JT+e3OOLN8=",
|
||||
"owner": "divnix",
|
||||
"lastModified": 1639385028,
|
||||
"narHash": "sha256-oqorKz3mwf7UuDJwlbCEYCB2LfcWLL0DkeCWhRIL820=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "b4f9f517574cb7bd6ee3f19c72c19634c9f536e1",
|
||||
"rev": "be1be083af014720c14f3b574f57b6173b4915d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"flakeCompat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"lastModified": 1641205782,
|
||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -171,11 +195,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1640417317,
|
||||
"narHash": "sha256-jT2uMARXs0Xm65ccroFsKyr4LTHSecw+9HAnmBdJO8U=",
|
||||
"lastModified": 1645140957,
|
||||
"narHash": "sha256-WTJzLSCDLBI537o2L/3kRyqEV5YRT7+1QSGryeKReHE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "48f2b381dd397ec88040d3354ac9c036739ba139",
|
||||
"rev": "4f4165a8b9108818ab0193bbd1a252106870b2a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -223,11 +247,11 @@
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1639874050,
|
||||
"narHash": "sha256-S4lNc3fb9UpYgVtTa/mZZXphq7+xGy74YGIlOWB1ceE=",
|
||||
"lastModified": 1641688481,
|
||||
"narHash": "sha256-6L+EU12xLDHby7y8elgFtRKVBxix+7qV8DhVgXqrKZo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "2762facc37b4f6f2bf61edc43dd63caef265f85a",
|
||||
"rev": "f697717b3d3a074ffc16c8c8227504f0db292886",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -238,11 +262,11 @@
|
||||
},
|
||||
"nixos": {
|
||||
"locked": {
|
||||
"lastModified": 1640319671,
|
||||
"narHash": "sha256-ZkKmakwaOaLiZOpIZWbeJZwap5CzJ30s4UJTfydYIYc=",
|
||||
"lastModified": 1644525281,
|
||||
"narHash": "sha256-D3VuWLdnLmAXIkooWAtbTGSQI9Fc1lkvAr94wTxhnTU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eac07edbd20ed4908b98790ba299250b5527ecdf",
|
||||
"rev": "48d63e924a2666baf37f4f14a18f19347fbd54a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -255,7 +279,10 @@
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": [
|
||||
"digga",
|
||||
"blank"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1637655461,
|
||||
@ -273,11 +300,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1639986101,
|
||||
"narHash": "sha256-Ow0+pkY7qMw6lMAvR1mEdUT9svJnrkbaRoqp4bkMTpg=",
|
||||
"lastModified": 1644870092,
|
||||
"narHash": "sha256-RLPD92lqXW98LDIbbwYqwAbt3R4iD1V1PiylfgBq5cU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "3f92db38374b2977aea8daf4c4fe2fa0eddbd60c",
|
||||
"rev": "10eab1c4cd8e715c0b41d32c28af2b89fc67bed0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -288,11 +315,11 @@
|
||||
},
|
||||
"nixosPersistence": {
|
||||
"locked": {
|
||||
"lastModified": 1638981861,
|
||||
"narHash": "sha256-rDEn/hU9ayDig2HMYKN71InhY1LV5slxp9Zy2iPBysQ=",
|
||||
"lastModified": 1644791231,
|
||||
"narHash": "sha256-iDihsF1fUMK4xXiUudPnDM3veH1LXbbxfP9Lzekw9iU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "df5038f20c9efd442944fe26b93f41c0dc5217da",
|
||||
"rev": "635bcd2d88739197a0b584aa9fadaa53c717a853",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -301,22 +328,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1640328990,
|
||||
"narHash": "sha256-KQbvJx4qO9bo04tfTZuISyY4vRC5k3ZB3lyLS21XWIw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab93217a2b74a1c36bc892c14f44ee5959c33f12",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgsWayland": {
|
||||
"inputs": {
|
||||
"cachix": "cachix",
|
||||
@ -325,11 +336,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1637983357,
|
||||
"narHash": "sha256-kferWoUKAAJO17t2D2nsEMvjMmOH1zyJPFUHtm+Cgn4=",
|
||||
"lastModified": 1643841979,
|
||||
"narHash": "sha256-/TNrk/59NpBADaHzFVraQQlHLfIgAPCgoR3F3vIw0EA=",
|
||||
"owner": "colemickens",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "1e481bafca9e03ead4b85e4f46d8d959c5f9b11c",
|
||||
"rev": "da0699ec283382fcc018072bafd573b4d7257d0e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -338,22 +349,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1640328990,
|
||||
"narHash": "sha256-KQbvJx4qO9bo04tfTZuISyY4vRC5k3ZB3lyLS21XWIw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab93217a2b74a1c36bc892c14f44ee5959c33f12",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rnixLsp": {
|
||||
"inputs": {
|
||||
"naersk": [
|
||||
@ -362,17 +357,14 @@
|
||||
"nixpkgs": [
|
||||
"nixos"
|
||||
],
|
||||
"utils": [
|
||||
"digga",
|
||||
"flake-utils"
|
||||
]
|
||||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1640347520,
|
||||
"narHash": "sha256-UkieGBW9ap0pQbumYoG60Ed+BpzMRGuLQ6Zb41u7Fkk=",
|
||||
"lastModified": 1643586450,
|
||||
"narHash": "sha256-BRIAc3+zavSlJPYSbov2n1W9/a4Iuh2swFPYRWjCm1g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "rnix-lsp",
|
||||
"rev": "d7cc2887ac9e65dd01715aac472edbf46b93ed31",
|
||||
"rev": "41eb2f3366e3f351bf2563c2a7c46fd17e78dfe0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -383,6 +375,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"alejandra": "alejandra",
|
||||
"digga": "digga",
|
||||
"home": "home",
|
||||
"naersk": "naersk",
|
||||
@ -407,6 +400,21 @@
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
103
flake.nix
103
flake.nix
@ -1,86 +1,100 @@
|
||||
{
|
||||
description = "A highly structured configuration database.";
|
||||
|
||||
inputs =
|
||||
{
|
||||
inputs = {
|
||||
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
digga.url = "github:divnix/digga/main";
|
||||
digga.inputs.nixpkgs.follows = "nixos";
|
||||
digga.inputs.nixlib.follows = "nixos";
|
||||
digga.inputs.home-manager.follows = "home";
|
||||
|
||||
home.url = "github:nix-community/home-manager/master";
|
||||
home.inputs.nixpkgs.follows = "nixos";
|
||||
|
||||
naersk.url = "github:nmattia/naersk";
|
||||
naersk.inputs.nixpkgs.follows = "nixos";
|
||||
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
rnixLsp = {
|
||||
url = "github:nix-community/rnix-lsp";
|
||||
inputs.naersk.follows = "naersk";
|
||||
inputs.nixpkgs.follows = "nixos";
|
||||
inputs.utils.follows = "digga/flake-utils";
|
||||
};
|
||||
/*helix = {
|
||||
alejandra = {
|
||||
url = "github:kamadorueda/alejandra";
|
||||
inputs.nixpkgs.follows = "nixos";
|
||||
};
|
||||
/*
|
||||
helix = {
|
||||
url = "https://github.com/helix-editor/helix.git";
|
||||
type = "git";
|
||||
submodules = true;
|
||||
inputs.nixpkgs.follows = "nixos";
|
||||
};*/
|
||||
};
|
||||
*/
|
||||
nixosPersistence.url = "github:nix-community/impermanence";
|
||||
nixpkgsWayland = {
|
||||
url = "github:colemickens/nixpkgs-wayland";
|
||||
inputs.nixpkgs.follows = "nixos";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, digga
|
||||
, nixos
|
||||
, home
|
||||
, nixos-hardware
|
||||
, nixosPersistence
|
||||
, nixpkgsWayland
|
||||
, rnixLsp
|
||||
#, helix
|
||||
, ...
|
||||
} @ inputs:
|
||||
{
|
||||
self,
|
||||
digga,
|
||||
nixos,
|
||||
home,
|
||||
nixos-hardware,
|
||||
nixosPersistence,
|
||||
nixpkgsWayland,
|
||||
rnixLsp,
|
||||
alejandra,
|
||||
...
|
||||
}
|
||||
@ inputs:
|
||||
digga.lib.mkFlake
|
||||
{
|
||||
inherit self inputs;
|
||||
|
||||
channelsConfig = { allowUnfree = true; };
|
||||
|
||||
channels = {
|
||||
nixos = {
|
||||
imports = [(digga.lib.importOverlays ./overlays)];
|
||||
overlays = [
|
||||
#nixpkgsWayland.overlay
|
||||
(_: prev: {
|
||||
(
|
||||
_: prev: {
|
||||
#helix = helix.packages.${prev.system}.helix;
|
||||
#helix-src = prev.helix.src;
|
||||
#rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
|
||||
})
|
||||
}
|
||||
)
|
||||
(
|
||||
_: prev: {
|
||||
alejandra = alejandra.defaultPackage.${prev.system};
|
||||
remarshal =
|
||||
prev.remarshal.overrideAttrs
|
||||
(
|
||||
old: {
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
||||
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
|
||||
--replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
|
||||
'';
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
./pkgs/default.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
||||
|
||||
sharedOverlays = [
|
||||
(_: prev: {
|
||||
(
|
||||
_: prev: {
|
||||
__dontExport = true;
|
||||
lib = prev.lib.extend (_: _: {
|
||||
our = self.lib;
|
||||
});
|
||||
})
|
||||
lib = prev.lib.extend (_: _: { our = self.lib; });
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
nixos = {
|
||||
hostDefaults = {
|
||||
system = "x86_64-linux";
|
||||
@ -94,37 +108,32 @@
|
||||
nixosPersistence.nixosModules.impermanence
|
||||
];
|
||||
};
|
||||
|
||||
imports = [(digga.lib.importHosts ./hosts)];
|
||||
hosts = {};
|
||||
importables = rec {
|
||||
profiles = (digga.lib.rakeLeaves ./profiles) // {
|
||||
profiles =
|
||||
(digga.lib.rakeLeaves ./profiles)
|
||||
// {
|
||||
users = digga.lib.rakeLeaves ./users;
|
||||
nixos-hardware = nixos-hardware.nixosModules;
|
||||
};
|
||||
suites = with profiles; {
|
||||
suites =
|
||||
with profiles; {
|
||||
base = [cachix core users.root];
|
||||
work = [users.patriot develop];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
imports = [(digga.lib.importExportableModules ./users/modules)];
|
||||
modules = [];
|
||||
importables = rec {
|
||||
profiles = digga.lib.rakeLeaves ./users/profiles;
|
||||
suites = with profiles; rec {
|
||||
base = [ direnv git starship ];
|
||||
suites = with profiles; rec { base = [direnv git starship]; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devshell = ./shell;
|
||||
|
||||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||
|
||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
|
||||
}
|
||||
;
|
||||
};
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ suites, ... }:
|
||||
{
|
||||
suites,
|
||||
...
|
||||
}:
|
||||
{
|
||||
### root password is empty by default ###
|
||||
imports = suites.base;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
{ profiles, ... }:
|
||||
{
|
||||
profiles,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# build with: `bud build bootstrap bootstrapIso`
|
||||
# reachable on the local link via ssh root@fe80::47%eno1
|
||||
@ -7,12 +10,11 @@
|
||||
imports = [
|
||||
# profiles.networking
|
||||
profiles.core
|
||||
profiles.users.root # make sure to configure ssh keys
|
||||
profiles.users.root
|
||||
# make sure to configure ssh keys
|
||||
profiles.users.nixos
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# will be overridden by the bootstrapIso instrumentation
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
}
|
||||
|
@ -1,9 +1,19 @@
|
||||
{ config, lib, pkgs, modulesPath, suites, profiles, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
suites,
|
||||
profiles,
|
||||
...
|
||||
}:
|
||||
let
|
||||
btrfsPartPath = "/dev/disk/by-label/NIXOS";
|
||||
btrfsOptions = ["compress-force=zstd" "noatime"];
|
||||
|
||||
btrfsDiff = pkgs.writeScriptBin "btrfs-diff" ''
|
||||
btrfsDiff =
|
||||
pkgs.writeScriptBin
|
||||
"btrfs-diff"
|
||||
''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
@ -30,13 +40,12 @@ let
|
||||
|
||||
sudo umount /mnt
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = suites.base ++ suites.work ++ [
|
||||
../profiles/network/networkmanager
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
] ++ (with profiles.nixos-hardware; [ common-pc-ssd common-pc common-gpu-amd common-cpu-amd ]);
|
||||
|
||||
in {
|
||||
imports =
|
||||
suites.base
|
||||
++ suites.work
|
||||
++ [../profiles/network/networkmanager (modulesPath + "/installer/scan/not-detected.nix")]
|
||||
++ (with profiles.nixos-hardware; [common-pc-ssd common-pc common-gpu-amd common-cpu-amd]);
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
@ -45,13 +54,14 @@ in
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = ["btrfs"];
|
||||
initrd = {
|
||||
availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
kernelModules = ["amdgpu"];
|
||||
};
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
initrd.postDeviceCommands = pkgs.lib.mkBefore ''
|
||||
initrd.postDeviceCommands =
|
||||
pkgs.lib.mkBefore
|
||||
''
|
||||
mkdir -p /mnt
|
||||
mount -o subvol=/ ${btrfsPartPath} /mnt
|
||||
btrfs subvolume list -o /mnt/root |
|
||||
@ -66,11 +76,8 @@ in
|
||||
btrfs subvolume snapshot /mnt/root-blank /mnt/root
|
||||
umount /mnt
|
||||
'';
|
||||
kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
@ -85,61 +92,52 @@ in
|
||||
value = "524288";
|
||||
}
|
||||
];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = btrfsPartPath;
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"] ++ btrfsOptions;
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = btrfsPartPath;
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home"] ++ btrfsOptions;
|
||||
};
|
||||
|
||||
fileSystems."/media/archive" = {
|
||||
device = "/dev/disk/by-uuid/f9b5f7f3-51e8-4357-8518-986b16311c71";
|
||||
fsType = "btrfs";
|
||||
options = btrfsOptions;
|
||||
};
|
||||
|
||||
#fileSystems."/media/archive" = {
|
||||
# device = "/dev/disk/by-uuid/f9b5f7f3-51e8-4357-8518-986b16311c71";
|
||||
# fsType = "btrfs";
|
||||
# options = btrfsOptions;
|
||||
#};
|
||||
fileSystems."/nix" = {
|
||||
device = btrfsPartPath;
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix"] ++ btrfsOptions;
|
||||
};
|
||||
|
||||
fileSystems."/persist" = {
|
||||
device = btrfsPartPath;
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=persist"] ++ btrfsOptions;
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5784-BBB1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 4;
|
||||
security = {
|
||||
mitigations.disable = true;
|
||||
allowSimultaneousMultithreading = false;
|
||||
# Deleting root subvolume makes sudo show lecture every boot
|
||||
sudo.extraConfig = ''
|
||||
sudo.extraConfig =
|
||||
''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
sound.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
@ -153,36 +151,21 @@ in
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libva
|
||||
vulkan-loader
|
||||
pipewire
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux;
|
||||
[
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libva
|
||||
vulkan-loader
|
||||
pipewire
|
||||
]
|
||||
++ [ pkgs.driversi686Linux.amdvlk ];
|
||||
extraPackages = with pkgs; [amdvlk libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire];
|
||||
extraPackages32 =
|
||||
with pkgs.pkgsi686Linux;
|
||||
[libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire] ++ [pkgs.driversi686Linux.amdvlk];
|
||||
};
|
||||
pulseaudio = {
|
||||
enable = false;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
fontconfig.enable = true;
|
||||
fonts = [pkgs.dejavu_fonts];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [btrfsDiff];
|
||||
pathsToLink = ["/share/zsh"];
|
||||
@ -191,14 +174,17 @@ in
|
||||
files = ["/etc/machine-id"];
|
||||
};
|
||||
variables = {
|
||||
VK_ICD_FILENAMES = lib.mkForce "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json";
|
||||
VK_ICD_FILENAMES =
|
||||
lib.mkForce
|
||||
"${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json";
|
||||
};
|
||||
sessionVariables = {
|
||||
VK_ICD_FILENAMES = lib.mkForce "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json";
|
||||
VK_ICD_FILENAMES =
|
||||
lib.mkForce
|
||||
"${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json";
|
||||
};
|
||||
};
|
||||
networking.interfaces.enp6s0.useDHCP = true;
|
||||
|
||||
services = {
|
||||
ipfs = {
|
||||
enable = false;
|
||||
@ -206,20 +192,22 @@ in
|
||||
autoMount = true;
|
||||
};
|
||||
flatpak.enable = false;
|
||||
xserver = {
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
};
|
||||
xserver = { videoDrivers = ["amdgpu"]; };
|
||||
postgresql = {
|
||||
enable = false;
|
||||
enableTCPIP = true;
|
||||
authentication = lib.mkOverride 10 ''
|
||||
authentication =
|
||||
lib.mkOverride
|
||||
10
|
||||
''
|
||||
local all all trust
|
||||
host all all 0.0.0.0/0 md5
|
||||
'';
|
||||
settings = {
|
||||
listen_addresses = "*";
|
||||
};
|
||||
initialScript = pkgs.writeText "backend-initScript" ''
|
||||
settings = { listen_addresses = "*"; };
|
||||
initialScript =
|
||||
pkgs.writeText
|
||||
"backend-initScript"
|
||||
''
|
||||
CREATE ROLE patriot WITH LOGIN PASSWORD 'patriot' CREATEDB;
|
||||
CREATE DATABASE harmony;
|
||||
GRANT ALL PRIVILEGES ON DATABASE harmony TO patriot;
|
||||
@ -227,9 +215,8 @@ in
|
||||
};
|
||||
};
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
podman.enable = false;
|
||||
libvirtd.enable = false;
|
||||
};
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
@ -1,14 +1,15 @@
|
||||
let
|
||||
rev = "e7e5d481a0e15dcd459396e55327749989e04ce0";
|
||||
flake = (import
|
||||
flake = (
|
||||
import
|
||||
(
|
||||
fetchTarball {
|
||||
fetchTarball
|
||||
{
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz";
|
||||
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x";
|
||||
}
|
||||
)
|
||||
{
|
||||
src = ../../.;
|
||||
});
|
||||
{ src = ../../.; }
|
||||
);
|
||||
in
|
||||
flake
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ ... }:
|
||||
let
|
||||
inherit (default.inputs.nixos) lib;
|
||||
|
||||
host = configs.${hostname} or configs.NixOS;
|
||||
configs = default.nixosConfigurations;
|
||||
default = (import ../.).defaultNix;
|
||||
|
@ -1,5 +1,8 @@
|
||||
{ lib }:
|
||||
lib.makeExtensible (self: {
|
||||
lib.makeExtensible
|
||||
(
|
||||
self: {
|
||||
pkgBinNoDep = pkgs: name: "${pkgs.${name}}/bin/${name}";
|
||||
html = import ./html.nix { format = true; };
|
||||
})
|
||||
}
|
||||
)
|
||||
|
27
lib/html.nix
27
lib/html.nix
@ -1,22 +1,33 @@
|
||||
{ format ? false }:
|
||||
let
|
||||
inherit (builtins) isAttrs isList map;
|
||||
|
||||
fmt = if format then "\n " else "";
|
||||
fmt =
|
||||
if format
|
||||
then "\n "
|
||||
else "";
|
||||
mapAttrsToList = f: attrs: map (name: f name attrs.${name}) (builtins.attrNames attrs);
|
||||
concatStrings = builtins.concatStringsSep "";
|
||||
genAttrs = f: names: builtins.listToAttrs (map (n: { name = n; value = (f n); }) names);
|
||||
|
||||
evalAttrs = attrs: concatStrings (mapAttrsToList (name: value: " ${name}=\"${value}\"") attrs);
|
||||
evalChildren = children: if isList children then concatStrings children else children;
|
||||
tag = name: maybeAttrs:
|
||||
genAttrs = f: names:
|
||||
builtins.listToAttrs (map
|
||||
(n: {
|
||||
name = n;
|
||||
value = (f n);
|
||||
})
|
||||
names);
|
||||
evalChildren = children:
|
||||
if isList children
|
||||
then concatStrings children
|
||||
else children;
|
||||
tag =
|
||||
name: maybeAttrs:
|
||||
if isAttrs maybeAttrs
|
||||
then (children: "<${name}${evalAttrs maybeAttrs}>${fmt}${evalChildren children}${fmt}</${name}>")
|
||||
else tag name {} maybeAttrs;
|
||||
|
||||
tags = (genAttrs tag ["html" "head" "body" "div" "p" "a"]);
|
||||
in
|
||||
tags // {
|
||||
tags
|
||||
// {
|
||||
inherit tag;
|
||||
link = url: tags.a { href = url; };
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
console.keyMap = "trq";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
@ -1,11 +1,12 @@
|
||||
{ config, ... }: {
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.sessionVariables = {
|
||||
inherit (config.environment.sessionVariables) NIX_PATH;
|
||||
};
|
||||
xdg.configFile."nix/registry.json".text =
|
||||
config.environment.etc."nix/registry.json".text;
|
||||
home.sessionVariables = { inherit (config.environment.sessionVariables) NIX_PATH; };
|
||||
xdg.configFile."nix/registry.json".text = config.environment.etc."nix/registry.json".text;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ channel, inputs, ... }: {
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${channel.input}"
|
||||
"nixos-config=${../lib/compat/nixos}"
|
||||
"home-manager=${inputs.home}"
|
||||
];
|
||||
{
|
||||
channel,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.nixPath = ["nixpkgs=${channel.input}" "nixos-config=${../lib/compat/nixos}" "home-manager=${inputs.home}"];
|
||||
}
|
||||
|
@ -1,27 +1,28 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (builtins) readFile fetchurl;
|
||||
|
||||
cfg = config.security.mitigations;
|
||||
|
||||
cmdline = ''
|
||||
ibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off'';
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
inherit (builtins) readFile fetchurl;
|
||||
cfg = config.security.mitigations;
|
||||
cmdline =
|
||||
''
|
||||
ibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off'';
|
||||
in {
|
||||
options = {
|
||||
security.mitigations.disable = mkOption {
|
||||
security.mitigations.disable =
|
||||
mkOption
|
||||
{
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
description =
|
||||
''
|
||||
Whether to disable spectre and meltdown mitigations in the kernel. Do
|
||||
not use this in mission critical deployments, or on any machine you do
|
||||
not have physical access to.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.disable {
|
||||
boot.kernelParams = splitString " " cmdline;
|
||||
};
|
||||
config = mkIf cfg.disable { boot.kernelParams = splitString " " cmdline; };
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
_: prev:
|
||||
let
|
||||
_: prev: let
|
||||
cliArgs =
|
||||
let
|
||||
flags = [
|
||||
@ -17,9 +16,4 @@ let
|
||||
];
|
||||
in
|
||||
prev.lib.concatStringsSep " " flags;
|
||||
in
|
||||
{
|
||||
chromium = prev.chromium.override {
|
||||
commandLineArgs = cliArgs;
|
||||
};
|
||||
}
|
||||
in { chromium = prev.chromium.override { commandLineArgs = cliArgs; }; }
|
||||
|
@ -1,10 +1,16 @@
|
||||
final: prev: rec {
|
||||
discord-canary-system = prev.callPackage mkDiscord (rec {
|
||||
discord-canary-system =
|
||||
prev.callPackage
|
||||
mkDiscord
|
||||
(
|
||||
rec {
|
||||
pname = "discord-canary";
|
||||
version = "0.0.131";
|
||||
binaryName = "DiscordCanary";
|
||||
desktopName = "Discord Canary";
|
||||
src = prev.fetchurl {
|
||||
src =
|
||||
prev.fetchurl
|
||||
{
|
||||
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
||||
sha256 = "sha256-ZYPdE02Jq79LmvXu7KIJFugJX++Nnj0Og/mBuaP/+SA=";
|
||||
};
|
||||
@ -16,68 +22,70 @@ final: prev: rec {
|
||||
"--enable-zero-copy"
|
||||
"--disable-gpu-driver-bug-workarounds"
|
||||
];
|
||||
});
|
||||
}
|
||||
);
|
||||
mkDiscord =
|
||||
{ pname
|
||||
, version
|
||||
, src
|
||||
, binaryName
|
||||
, desktopName
|
||||
, isWayland ? false
|
||||
, enableVulkan ? false
|
||||
, extraOptions ? [ ]
|
||||
, autoPatchelfHook
|
||||
, makeDesktopItem
|
||||
, lib
|
||||
, stdenv
|
||||
, wrapGAppsHook
|
||||
, alsaLib
|
||||
, at-spi2-atk
|
||||
, at-spi2-core
|
||||
, atk
|
||||
, cairo
|
||||
, cups
|
||||
, dbus
|
||||
, electron
|
||||
, expat
|
||||
, fontconfig
|
||||
, freetype
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gtk3
|
||||
, libcxx
|
||||
, libdrm
|
||||
, libnotify
|
||||
, libpulseaudio
|
||||
, libuuid
|
||||
, libX11
|
||||
, libXScrnSaver
|
||||
, libXcomposite
|
||||
, libXcursor
|
||||
, libXdamage
|
||||
, libXext
|
||||
, libXfixes
|
||||
, libXi
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libXtst
|
||||
, libxcb
|
||||
, mesa
|
||||
, nspr
|
||||
, nss
|
||||
, pango
|
||||
, systemd
|
||||
, libappindicator-gtk3
|
||||
, libdbusmenu
|
||||
, nodePackages
|
||||
, vulkan-loader
|
||||
, vulkan-extension-layer
|
||||
, libGL
|
||||
, pipewire
|
||||
{
|
||||
pname,
|
||||
version,
|
||||
src,
|
||||
binaryName,
|
||||
desktopName,
|
||||
isWayland ? false,
|
||||
enableVulkan ? false,
|
||||
extraOptions ? [],
|
||||
autoPatchelfHook,
|
||||
makeDesktopItem,
|
||||
lib,
|
||||
stdenv,
|
||||
wrapGAppsHook,
|
||||
alsaLib,
|
||||
at-spi2-atk,
|
||||
at-spi2-core,
|
||||
atk,
|
||||
cairo,
|
||||
cups,
|
||||
dbus,
|
||||
electron,
|
||||
expat,
|
||||
fontconfig,
|
||||
freetype,
|
||||
gdk-pixbuf,
|
||||
glib,
|
||||
gtk3,
|
||||
libcxx,
|
||||
libdrm,
|
||||
libnotify,
|
||||
libpulseaudio,
|
||||
libuuid,
|
||||
libX11,
|
||||
libXScrnSaver,
|
||||
libXcomposite,
|
||||
libXcursor,
|
||||
libXdamage,
|
||||
libXext,
|
||||
libXfixes,
|
||||
libXi,
|
||||
libXrandr,
|
||||
libXrender,
|
||||
libXtst,
|
||||
libxcb,
|
||||
mesa,
|
||||
nspr,
|
||||
nss,
|
||||
pango,
|
||||
systemd,
|
||||
libappindicator-gtk3,
|
||||
libdbusmenu,
|
||||
nodePackages,
|
||||
vulkan-loader,
|
||||
vulkan-extension-layer,
|
||||
libGL,
|
||||
pipewire,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation
|
||||
rec {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodePackages.asar
|
||||
alsaLib
|
||||
@ -94,10 +102,10 @@ final: prev: rec {
|
||||
nss
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
libPath = lib.makeLibraryPath [
|
||||
libPath =
|
||||
lib.makeLibraryPath
|
||||
[
|
||||
libcxx
|
||||
systemd
|
||||
libpulseaudio
|
||||
@ -140,16 +148,23 @@ final: prev: rec {
|
||||
libGL
|
||||
pipewire
|
||||
];
|
||||
|
||||
flags = (lib.optionals isWayland [
|
||||
flags =
|
||||
(
|
||||
lib.optionals
|
||||
isWayland
|
||||
[
|
||||
"--flag-switches-begin"
|
||||
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer${lib.optionalString enableVulkan ",Vulkan"}"
|
||||
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer${
|
||||
lib.optionalString enableVulkan ",Vulkan"
|
||||
}"
|
||||
"--flag-switches-end"
|
||||
"--ozone-platform=wayland"
|
||||
"--enable-webrtc-pipewire-capturer"
|
||||
]) ++ extraOptions;
|
||||
|
||||
installPhase = ''
|
||||
]
|
||||
)
|
||||
++ extraOptions;
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/{bin,usr/lib/${pname},share/pixmaps}
|
||||
ln -s discord.png $out/share/pixmaps/${pname}.png
|
||||
ln -s "${desktopItem}/share/applications" $out/share/
|
||||
@ -175,8 +190,9 @@ final: prev: rec {
|
||||
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
|
||||
--prefix LD_LIBRARY_PATH : ${libPath}
|
||||
'';
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
desktopItem =
|
||||
makeDesktopItem
|
||||
{
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
@ -185,8 +201,8 @@ final: prev: rec {
|
||||
categories = "Network;InstantMessaging;";
|
||||
mimeType = "x-scheme-handler/discord";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta =
|
||||
with lib; {
|
||||
description = "All-in-one cross-platform voice and text chat for gamers";
|
||||
homepage = "https://discordapp.com/";
|
||||
downloadPage = "https://discordapp.com/download";
|
||||
|
@ -1,13 +1,19 @@
|
||||
final: prev: {
|
||||
discord-canary = prev.discord-canary.overrideAttrs (old:
|
||||
let binaryName = "DiscordCanary"; in
|
||||
rec {
|
||||
discord-canary =
|
||||
prev.discord-canary.overrideAttrs
|
||||
(
|
||||
old: let
|
||||
binaryName = "DiscordCanary";
|
||||
in rec {
|
||||
version = "0.0.123";
|
||||
src = prev.fetchurl {
|
||||
src =
|
||||
prev.fetchurl
|
||||
{
|
||||
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
||||
sha256 = "0bijwfsd9s4awqkgxd9c2cxh7y5r06vix98qjp0dkv63r6jig8ch";
|
||||
};
|
||||
installPhase = ''
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps}
|
||||
mv * $out/opt/${binaryName}
|
||||
chmod +x $out/opt/${binaryName}/${binaryName}
|
||||
@ -21,5 +27,6 @@ final: prev: {
|
||||
ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${old.pname}.png
|
||||
ln -s "${old.desktopItem}/share/applications" $out/share/
|
||||
'';
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -1,5 +1 @@
|
||||
final: prev: {
|
||||
manix = prev.manix.overrideAttrs (o: rec{
|
||||
inherit (prev.sources.manix) pname version src;
|
||||
});
|
||||
}
|
||||
final: prev: { manix = prev.manix.overrideAttrs (o: rec { inherit (prev.sources.manix) pname version src; }); }
|
||||
|
@ -1,3 +1,4 @@
|
||||
channels: final: prev: {
|
||||
__dontExport = true; # overrides clutter up actual creations
|
||||
__dontExport = true;
|
||||
# overrides clutter up actual creations
|
||||
}
|
||||
|
@ -1,23 +1,24 @@
|
||||
final: prev: {
|
||||
phantomstyle = prev.stdenv.mkDerivation {
|
||||
phantomstyle =
|
||||
prev.stdenv.mkDerivation
|
||||
{
|
||||
pname = "phantomstyle";
|
||||
version = "6e9580b";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
src =
|
||||
builtins.fetchGit
|
||||
{
|
||||
url = "https://github.com/randrew/phantomstyle.git";
|
||||
rev = "6e9580b72e372b5acecd616434eaf441bf73bcf4";
|
||||
};
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
buildInputs = [prev.libsForQt5.qt5.qtbase];
|
||||
|
||||
buildPhase = ''
|
||||
buildPhase =
|
||||
''
|
||||
cd src/styleplugin
|
||||
qmake && make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/$qtPluginPrefix/styles
|
||||
mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles
|
||||
'';
|
||||
|
@ -2,10 +2,6 @@ final: prev: {
|
||||
# Since: https://github.com/NixOS/nixpkgs/pull/126137
|
||||
nix-direnv =
|
||||
if builtins.hasAttr "enableFlakes" prev.nix-direnv.override.__functionArgs
|
||||
then
|
||||
prev.nix-direnv.override
|
||||
{
|
||||
enableFlakes = true;
|
||||
}
|
||||
then prev.nix-direnv.override { enableFlakes = true; }
|
||||
else prev.nix-direnv;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
_: prev:
|
||||
let
|
||||
_: prev: let
|
||||
pkgs = prev;
|
||||
lib = pkgs.lib;
|
||||
vscodeWayland =
|
||||
@ -16,36 +15,50 @@ let
|
||||
"--disable-gpu-driver-bug-workarounds"
|
||||
];
|
||||
in
|
||||
pkgs.writeScriptBin "vscode-wayland" ''
|
||||
pkgs.writeScriptBin
|
||||
"vscode-wayland"
|
||||
''
|
||||
#!${pkgs.stdenv.shell}
|
||||
${pkgs.vscode}/bin/code ${lib.concatStringsSep " " flags}
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
vscodeWayland =
|
||||
let
|
||||
pname = "vscode";
|
||||
desktop = pkgs.makeDesktopItem {
|
||||
desktop =
|
||||
pkgs.makeDesktopItem
|
||||
{
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = "vscode";
|
||||
desktopName = "VSCode Wayland";
|
||||
};
|
||||
in
|
||||
lib.hiPrio (pkgs.stdenv.mkDerivation {
|
||||
lib.hiPrio
|
||||
(
|
||||
pkgs.stdenv.mkDerivation
|
||||
{
|
||||
inherit pname;
|
||||
version = pkgs.vscode.version;
|
||||
|
||||
nativeBuildInputs = [pkgs.makeWrapper];
|
||||
phases = [ "installPhase" /*"fixupPhase"*/ ];
|
||||
installPhase = ''
|
||||
phases = [
|
||||
"installPhase"
|
||||
/*
|
||||
"fixupPhase"
|
||||
*/
|
||||
];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname}
|
||||
cp -r ${desktop}/share $out/share
|
||||
'';
|
||||
/*fixupPhase = ''
|
||||
/*
|
||||
fixupPhase = ''
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-extension-layer libGL ])}
|
||||
'';*/
|
||||
});
|
||||
'';
|
||||
*/
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
# This file was generated by nvfetcher, please do not modify it manually.
|
||||
{ fetchgit, fetchurl }:
|
||||
{
|
||||
fetchgit,
|
||||
fetchurl,
|
||||
}:
|
||||
{
|
||||
manix = {
|
||||
pname = "manix";
|
||||
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
|
||||
src = fetchgit {
|
||||
src =
|
||||
fetchgit
|
||||
{
|
||||
url = "https://github.com/mlvzk/manix";
|
||||
rev = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
|
||||
fetchSubmodules = false;
|
||||
|
@ -1,11 +1,14 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
folder = ./.;
|
||||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
|
||||
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||
in
|
||||
{
|
||||
in {
|
||||
#inherit imports;
|
||||
nix.binaryCaches = [ "https://cache.nixos.org/" ];
|
||||
nix.settings.substituters = ["https://cache.nixos.org/"];
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://harmony.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"harmony.cachix.org-1:yv78QZHgS0UHkrMW56rccNghWHRz18fFRl8mWQ63M6E="
|
||||
];
|
||||
settings.substituters = ["https://harmony.cachix.org"];
|
||||
binaryCachePublicKeys = ["harmony.cachix.org-1:yv78QZHgS0UHkrMW56rccNghWHRz18fFRl8mWQ63M6E="];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://nix-cargo-integration.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"nix-cargo-integration.cachix.org-1:wphySON/RyTC2DCzwKPBQGLEZv5mj0s1I1lsfQObaLs="
|
||||
];
|
||||
settings.substituters = ["https://nix-cargo-integration.cachix.org"];
|
||||
binaryCachePublicKeys = ["nix-cargo-integration.cachix.org-1:wphySON/RyTC2DCzwKPBQGLEZv5mj0s1I1lsfQObaLs="];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
settings.substituters = ["https://nix-community.cachix.org"];
|
||||
binaryCachePublicKeys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
];
|
||||
settings.substituters = ["https://nixpkgs-wayland.cachix.org"];
|
||||
binaryCachePublicKeys = ["nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://nrdxp.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4="
|
||||
];
|
||||
settings.substituters = ["https://nrdxp.cachix.org"];
|
||||
binaryCachePublicKeys = ["nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4="];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://veloren-nix.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"veloren-nix.cachix.org-1:zokfKJqVsNV6kI/oJdLF6TYBdNPYGSb+diMVQPn/5Rc="
|
||||
];
|
||||
settings.substituters = ["https://veloren-nix.cachix.org"];
|
||||
binaryCachePublicKeys = ["veloren-nix.cachix.org-1:zokfKJqVsNV6kI/oJdLF6TYBdNPYGSb+diMVQPn/5Rc="];
|
||||
};
|
||||
}
|
||||
|
@ -1,23 +1,26 @@
|
||||
{ self, inputs, config, pkgs, lib, ... }:
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) fileContents mkIf;
|
||||
pkgBin = lib.our.pkgBinNoDep pkgs;
|
||||
|
||||
coreBin = v: "${pkgs.coreutils}/bin/${v}";
|
||||
nixBin = "${config.nix.package}/bin/nix";
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [../cachix ../../locale];
|
||||
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
loader.systemd-boot.configurationLimit = 10;
|
||||
};
|
||||
|
||||
console.font = "7x14";
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
systemPackages =
|
||||
with pkgs; [
|
||||
binutils
|
||||
coreutils
|
||||
curl
|
||||
@ -58,41 +61,41 @@ in
|
||||
du-dust
|
||||
mosh
|
||||
(
|
||||
pkgs.runCommand "0x0.sh" { } ''
|
||||
pkgs.runCommand
|
||||
"0x0.sh"
|
||||
{}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
cp ${pkgs.fetchurl {
|
||||
cp ${
|
||||
pkgs.fetchurl
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/Calinou/0x0/master/bin/0x0";
|
||||
sha256 = "sha256-Fad+AKBuA49qtRQfnroqjaNWeuRaCekXZG9sS9JVeaM=";
|
||||
}} $out/bin/0x0
|
||||
}
|
||||
} $out/bin/0x0
|
||||
chmod +x $out/bin/0x0
|
||||
''
|
||||
)
|
||||
];
|
||||
|
||||
shellAliases =
|
||||
let ifSudo = string: mkIf config.security.sudo.enable string;
|
||||
in
|
||||
{
|
||||
let
|
||||
ifSudo = string: mkIf config.security.sudo.enable string;
|
||||
in {
|
||||
gtw = "${pkgBin "grit"} tree wnv";
|
||||
gtwa = "${pkgBin "grit"} add -p wnv";
|
||||
gt = pkgBin "grit";
|
||||
|
||||
g = pkgBin "git";
|
||||
git-optimize = "${pkgBin "git"} gc --aggressive --prune=now";
|
||||
|
||||
cat = "${pkgBin "bat"} -pp --theme=base16";
|
||||
c = "cat";
|
||||
|
||||
du = "${pkgs.du-dust}/bin/dust";
|
||||
df = "${coreBin "df"} -h";
|
||||
free = "${pkgs.procps}/bin/free -h";
|
||||
|
||||
ls = pkgBin "exa";
|
||||
l = "${pkgBin "exa"} -lhg --git";
|
||||
la = "${pkgBin "exa"} -lhg --git -a";
|
||||
t = "${pkgBin "exa"} -lhg --git -T";
|
||||
ta = "${pkgBin "exa"} -lhg --git -a -T";
|
||||
|
||||
n = nixBin;
|
||||
nf = "${nixBin} flake";
|
||||
nfc = "${nixBin} flake check";
|
||||
@ -109,34 +112,25 @@ in
|
||||
nsrp = "${nixBin} search nixpkgs";
|
||||
ndev = "${nixBin} develop";
|
||||
nrun = "${nixBin} run";
|
||||
|
||||
nrefs = "nix-store -qR";
|
||||
|
||||
noscd = "cd /etc/nixos";
|
||||
nosrs = ifSudo "sudo nixos-rebuild --fast switch";
|
||||
nosrb = ifSudo "sudo nixos-rebuild --fast boot";
|
||||
nosrt = ifSudo "sudo nixos-rebuild --fast test";
|
||||
ngc = ifSudo "sudo nix-collect-garbage";
|
||||
ngcdo = ifSudo "sudo nix-collect-garbage --delete-old";
|
||||
|
||||
top = "${pkgs.bottom}/bin/btm";
|
||||
|
||||
myip =
|
||||
"${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||
|
||||
myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||
mn =
|
||||
let manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"; in
|
||||
''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
|
||||
|
||||
|
||||
let
|
||||
manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain";
|
||||
in ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
|
||||
# fix nixos-option
|
||||
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
||||
|
||||
# sudo
|
||||
s = ifSudo "sudo -E";
|
||||
si = ifSudo "sudo -i";
|
||||
se = ifSudo "sudoedit";
|
||||
|
||||
# systemd
|
||||
ctl = "systemctl";
|
||||
stl = ifSudo "s systemctl";
|
||||
@ -148,49 +142,46 @@ in
|
||||
jtl = "journalctl";
|
||||
};
|
||||
};
|
||||
|
||||
system.activationScripts.diff = ''
|
||||
system.activationScripts.diff =
|
||||
''
|
||||
${pkgs.nixUnstable}/bin/nix store \
|
||||
--experimental-features 'nix-command' \
|
||||
diff-closures /run/current-system "$systemConfig"
|
||||
'';
|
||||
|
||||
nix =
|
||||
let
|
||||
registry =
|
||||
builtins.removeAttrs
|
||||
(builtins.mapAttrs
|
||||
(_: v: { flake = v; })
|
||||
(lib.filterAttrs (_: v: v ? outputs) inputs))
|
||||
(builtins.mapAttrs (_: v: { flake = v; }) (lib.filterAttrs (_: v: v ? outputs) inputs))
|
||||
["bud"];
|
||||
in
|
||||
{
|
||||
in {
|
||||
package = pkgs.nixUnstable;
|
||||
autoOptimiseStore = true;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
useSandbox = true;
|
||||
allowedUsers = [ "@wheel" ];
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
extraOptions = ''
|
||||
extraOptions =
|
||||
''
|
||||
min-free = 536870912
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
fallback = true
|
||||
'';
|
||||
inherit registry;
|
||||
settings = {
|
||||
sandbox = true;
|
||||
allowed-users = ["@wheel"];
|
||||
trusted-users = ["root" "@wheel"];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = false;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
users.mutableUsers = false;
|
||||
|
||||
# For rage encryption, all hosts need a ssh key pair
|
||||
/*services.openssh = {
|
||||
/*
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = lib.mkDefault false;
|
||||
};*/
|
||||
|
||||
};
|
||||
*/
|
||||
services.earlyoom.enable = true;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [./editor];
|
||||
|
||||
environment.systemPackages = with pkgs; [git tokei];
|
||||
|
||||
documentation.dev.enable = true;
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [./helix.nix];
|
||||
|
||||
environment.systemPackages = with pkgs; [ nixpkgs-fmt ];
|
||||
environment.shellAliases = { nixf-all = "nixpkgs-fmt **/**.nix"; };
|
||||
environment.systemPackages = with pkgs; [alejandra];
|
||||
environment.shellAliases = { nixf-all = "alejandra **/**.nix"; };
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkg = pkgs.helix;
|
||||
bin = "${pkg}/bin/hx";
|
||||
in
|
||||
{
|
||||
in {
|
||||
environment.systemPackages = [pkg];
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = bin;
|
||||
VISUAL = bin;
|
||||
};
|
||||
|
||||
environment.shellAliases = { e = bin; };
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkg = pkgs.kakoune-unwrapped;
|
||||
in
|
||||
{
|
||||
in {
|
||||
environment.systemPackages = [pkg];
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "${pkg}/bin/kak";
|
||||
VISUAL = "${pkg}/bin/kak";
|
||||
};
|
||||
|
||||
environment.shellAliases = { k = "${pkg}/bin/kak"; };
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
godot-bin
|
||||
godot-headless-bin
|
||||
godot-server-bin
|
||||
];
|
||||
}
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ environment.systemPackages = with pkgs; [godot-bin godot-headless-bin godot-server-bin]; }
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
imports = [./dns];
|
||||
|
||||
networking.dhcpcd.enable = false;
|
||||
networking.useDHCP = false;
|
||||
networking.dhcpcd.extraConfig = ''
|
||||
networking.dhcpcd.extraConfig =
|
||||
''
|
||||
noarp
|
||||
nodelay
|
||||
'';
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
imports = [./nextdns.nix];
|
||||
|
||||
networking.resolvconf.useLocalResolver = true;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
services.nextdns = {
|
||||
enable = true;
|
||||
arguments = ["-config" "75e43d"];
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
imports = [./nextdns.nix];
|
||||
|
||||
networking.networkmanager.dns = "none";
|
||||
services.stubby.enable = true;
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
services.stubby = {
|
||||
roundRobinUpstreams = false;
|
||||
upstreamServers =
|
||||
let nextDnsId = "75e43d";
|
||||
in
|
||||
''
|
||||
let
|
||||
nextDnsId = "75e43d";
|
||||
in ''
|
||||
- address_data: 45.90.28.0
|
||||
tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
|
||||
- address_data: 2a07:a8c0::0
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
imports = [./dns];
|
||||
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.networkmanager.wifi.backend = "iwd";
|
||||
services.connman.wifi.backend = "iwd";
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
imports = [../dns];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
imports = [./dns];
|
||||
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
|
Binary file not shown.
@ -1,10 +1,12 @@
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
modules = with inputs; [
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules =
|
||||
with inputs; [
|
||||
#bud.devshellModules.bud
|
||||
];
|
||||
exportedModules = [
|
||||
./devos.nix
|
||||
];
|
||||
exportedModules = [./devos.nix];
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,24 @@
|
||||
{ pkgs, extraModulesPath, ... }:
|
||||
{
|
||||
pkgs,
|
||||
extraModulesPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
hooks = import ./hooks;
|
||||
|
||||
pkgWithCategory = category: package: { inherit package category; };
|
||||
linter = pkgWithCategory "linter";
|
||||
docs = pkgWithCategory "docs";
|
||||
devos = pkgWithCategory "devos";
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
_file = toString ./.;
|
||||
|
||||
imports = ["${extraModulesPath}/git/hooks.nix"];
|
||||
git = { inherit hooks; };
|
||||
|
||||
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
|
||||
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
|
||||
devshell.startup.load_profiles =
|
||||
pkgs.lib.mkForce
|
||||
(
|
||||
pkgs.lib.noDepEntry
|
||||
''
|
||||
# PATH is devshell's exorbitant privilige:
|
||||
# fence against its pollution
|
||||
_PATH=''${PATH}
|
||||
@ -28,34 +30,27 @@ in
|
||||
# Exert exorbitant privilige and leave no trace
|
||||
export PATH=''${_PATH}
|
||||
unset _PATH
|
||||
'');
|
||||
|
||||
packages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
|
||||
commands = with pkgs; [
|
||||
''
|
||||
);
|
||||
packages = with pkgs; [git-crypt];
|
||||
commands =
|
||||
with pkgs;
|
||||
[
|
||||
(devos nixUnstable)
|
||||
#(devos agenix)
|
||||
/*{
|
||||
/*
|
||||
{
|
||||
category = "devos";
|
||||
name = pkgs.nvfetcher-bin.pname;
|
||||
help = pkgs.nvfetcher-bin.meta.description;
|
||||
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
||||
}*/
|
||||
(linter nixpkgs-fmt)
|
||||
(linter editorconfig-checker)
|
||||
}
|
||||
*/
|
||||
#(linter nixpkgs-fmt)
|
||||
#(linter editorconfig-checker)
|
||||
# (docs python3Packages.grip) too many deps
|
||||
# (docs mdbook)
|
||||
]
|
||||
|
||||
++ lib.optional
|
||||
(pkgs ? deploy-rs)
|
||||
(devos deploy-rs.deploy-rs)
|
||||
|
||||
++ lib.optional
|
||||
(system != "i686-linux")
|
||||
(devos cachix)
|
||||
|
||||
;
|
||||
++ lib.optional (pkgs ? deploy-rs) (devos deploy-rs.deploy-rs)
|
||||
++ lib.optional (system != "i686-linux") (devos cachix);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
enable = true;
|
||||
enable = false;
|
||||
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
||||
}
|
||||
|
@ -1,36 +1,40 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mapAttrs' nameValuePair;
|
||||
inherit (builtins) readDir fetchGit;
|
||||
pkgBin = lib.our.pkgBinNoDep pkgs;
|
||||
|
||||
nixosConfig = config;
|
||||
in
|
||||
{
|
||||
in {
|
||||
users.users.patriot = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
home = "/home/patriot";
|
||||
extraGroups = [ "wheel" "adbusers" "dialout" /* "wireshark" */ ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"adbusers"
|
||||
"dialout"
|
||||
/*
|
||||
"wireshark"
|
||||
*/
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword =
|
||||
"$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [pkgs.qt5.qtwayland];
|
||||
shells = with pkgs; [bashInteractive zsh];
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
extraPortals = with pkgs; [xdg-desktop-portal xdg-desktop-portal-wlr];
|
||||
};
|
||||
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
steam.enable = true;
|
||||
@ -40,7 +44,6 @@ in
|
||||
};
|
||||
wireshark.enable = false;
|
||||
};
|
||||
|
||||
security = {
|
||||
pam.services.patriot = {
|
||||
enableGnomeKeyring = true;
|
||||
@ -49,10 +52,12 @@ in
|
||||
sudo.extraRules = [
|
||||
{
|
||||
users = ["patriot"];
|
||||
commands = [{
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.profile-sync-daemon}/bin/psd-overlay-helper";
|
||||
options = ["SETENV" "NOPASSWD"];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -86,32 +91,29 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.gnome-session-restart-dbus.serviceConfig = {
|
||||
Slice = "-.slice";
|
||||
};
|
||||
systemd.user.services.gnome-session-restart-dbus.serviceConfig = { Slice = "-.slice"; };
|
||||
systemd = {
|
||||
targets = {
|
||||
network-online.enable = false;
|
||||
};
|
||||
targets = { network-online.enable = false; };
|
||||
services = {
|
||||
systemd-networkd-wait-online.enable = false;
|
||||
NetworkManager-wait-online.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.patriot =
|
||||
{ config, pkgs, suites, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
suites,
|
||||
...
|
||||
}:
|
||||
let
|
||||
personal = import ../../personal.nix;
|
||||
name = personal.name;
|
||||
email = personal.emails.primary;
|
||||
|
||||
font = "Iosevka Term";
|
||||
fontSize = 12;
|
||||
font = "Monoid";
|
||||
fontSize = 10;
|
||||
fontComb = "${font} ${toString fontSize}";
|
||||
fontPackage = pkgs.iosevka;
|
||||
|
||||
fontPackage = pkgs.monoid;
|
||||
colorSchemeLight = {
|
||||
primary = {
|
||||
normal = {
|
||||
@ -146,7 +148,6 @@ in
|
||||
white = "3a4d53";
|
||||
};
|
||||
};
|
||||
|
||||
colorSchemeDark =
|
||||
let
|
||||
normal = {
|
||||
@ -171,10 +172,8 @@ in
|
||||
cyan = "56d8c9";
|
||||
white = "dedede";
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit normal bright;
|
||||
|
||||
primary = {
|
||||
normal = {
|
||||
background = "181818";
|
||||
@ -186,16 +185,13 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
colorScheme =
|
||||
# if builtins.pathExists ./light then colorSchemeLight else colorSchemeDark;
|
||||
colorSchemeDark;
|
||||
|
||||
bgColor = colorScheme.primary.normal.background;
|
||||
fgColor = colorScheme.primary.bright.foreground;
|
||||
acColor = colorScheme.normal.yellow;
|
||||
acColor2 = colorScheme.normal.magenta;
|
||||
|
||||
alacrittyColors = {
|
||||
primary = {
|
||||
background = "0x${bgColor}";
|
||||
@ -204,7 +200,6 @@ in
|
||||
normal = lib.mapAttrs (_: v: "0x${v}") colorScheme.normal;
|
||||
bright = lib.mapAttrs (_: v: "0x${v}") colorScheme.bright;
|
||||
};
|
||||
|
||||
# sway attrs reused
|
||||
focusedWorkspace = {
|
||||
background = "#${bgColor}";
|
||||
@ -226,16 +221,18 @@ in
|
||||
border = "#${acColor2}";
|
||||
text = "#${acColor2}";
|
||||
};
|
||||
addIndSway = x: {
|
||||
addIndSway =
|
||||
x: {
|
||||
background = x.background;
|
||||
border = x.border;
|
||||
childBorder = x.border;
|
||||
text = x.text;
|
||||
indicator = "#111111"; # don't care
|
||||
indicator = "#111111";
|
||||
# don't care
|
||||
};
|
||||
fonts = [fontComb];
|
||||
|
||||
extraEnv = ''
|
||||
extraEnv =
|
||||
''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
@ -246,12 +243,11 @@ in
|
||||
#export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
#export QT_PLATFORM_PLUGIN=qt5ct
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = suites.base;
|
||||
|
||||
# needs to be fixed to use nix profile???
|
||||
/*gtk = {
|
||||
/*
|
||||
gtk = {
|
||||
enable = false;
|
||||
font = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
@ -273,31 +269,25 @@ in
|
||||
package = pkgs.adwaita-qt;
|
||||
name = "adwaita-dark";
|
||||
};
|
||||
};*/
|
||||
|
||||
};
|
||||
*/
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
homeDirectory = nixosConfig.users.users.patriot.home;
|
||||
packages = with pkgs;
|
||||
[
|
||||
packages =
|
||||
with pkgs; [
|
||||
# Font stuff
|
||||
fontPackage
|
||||
noto-fonts-cjk
|
||||
font-awesome
|
||||
dejavu_fonts
|
||||
(nerdfonts.override { fonts = [ "Iosevka" ]; })
|
||||
(nerdfonts.override { fonts = ["Monoid"]; })
|
||||
# Programs
|
||||
#discord-canary-system
|
||||
vulkan-tools
|
||||
audacity
|
||||
krita
|
||||
gimp
|
||||
kdenlive
|
||||
gnome3.seahorse
|
||||
gnome3.gnome-boxes
|
||||
cachix
|
||||
appimage-run
|
||||
bitwarden
|
||||
pfetch
|
||||
gnupg
|
||||
imv
|
||||
@ -306,37 +296,55 @@ in
|
||||
ffmpeg
|
||||
mupdf
|
||||
transmission-qt
|
||||
(lib.hiPrio (lutris.overrideAttrs (old: {
|
||||
profile = ''
|
||||
(
|
||||
lib.hiPrio
|
||||
(
|
||||
lutris.overrideAttrs
|
||||
(
|
||||
old: {
|
||||
profile =
|
||||
''
|
||||
${old.profile or ""}
|
||||
unset VK_ICD_FILENAMES
|
||||
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
|
||||
})))
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
xdg_utils
|
||||
tagref
|
||||
libreoffice-fresh
|
||||
hydrus
|
||||
papirus-icon-theme
|
||||
wl-clipboard
|
||||
rust-analyzer
|
||||
(lib.hiPrio (steam.override {
|
||||
(
|
||||
lib.hiPrio
|
||||
(
|
||||
steam.override
|
||||
{
|
||||
extraLibraries = pkgs: [pkgs.pipewire];
|
||||
extraProfile = ''
|
||||
extraProfile =
|
||||
''
|
||||
unset VK_ICD_FILENAMES
|
||||
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
|
||||
}))
|
||||
/*(multimc.overrideAttrs (old: {
|
||||
}
|
||||
)
|
||||
)
|
||||
/*
|
||||
(multimc.overrideAttrs (old: {
|
||||
src = builtins.fetchGit { url = "https://github.com/AfoninZ/MultiMC5-Cracked.git"; ref = "develop"; rev = "9069e9c9d0b7951c310fdcc8bdc70ebc422a7634"; submodules = true; };
|
||||
}))*/
|
||||
}))
|
||||
*/
|
||||
standardnotes
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager = {
|
||||
sway = {
|
||||
enable = false;
|
||||
extraSessionCommands = extraEnv;
|
||||
wrapperFeatures.gtk = true;
|
||||
extraConfig = ''
|
||||
extraConfig =
|
||||
''
|
||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
'';
|
||||
config = {
|
||||
@ -344,9 +352,7 @@ in
|
||||
names = [font];
|
||||
size = fontSize + 0.0;
|
||||
};
|
||||
bars = [{
|
||||
command = "${pkgBin "waybar"}";
|
||||
}];
|
||||
bars = [{ command = "${pkgBin "waybar"}"; }];
|
||||
colors = {
|
||||
background = "#${bgColor}";
|
||||
focused = addIndSway focusedWorkspace;
|
||||
@ -369,26 +375,27 @@ in
|
||||
wf-recorder = pkgBin "wf-recorder";
|
||||
wl-copy = pkgs.wl-clipboard + "/bin/wl-copy";
|
||||
wl-paste = pkgs.wl-clipboard + "/bin/wl-paste";
|
||||
shotFile = config.home.homeDirectory
|
||||
+ "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
|
||||
shotFile = config.home.homeDirectory + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
lib.mkOptionDefault
|
||||
{
|
||||
"${mod}+q" = "kill";
|
||||
"${mod}+Shift+e" = "exit";
|
||||
"${mod}+Shift+r" = "reload";
|
||||
# Screenshot and copy it to clipboard
|
||||
"Mod1+s" = ''
|
||||
"Mod1+s" =
|
||||
''
|
||||
exec export SFILE="${shotFile}.png" && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
|
||||
'';
|
||||
# Save selected area as a picture and copy it to clipboard
|
||||
"Mod1+Shift+s" = ''
|
||||
"Mod1+Shift+s" =
|
||||
''
|
||||
exec export SFILE="${shotFile}.png" && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
|
||||
'';
|
||||
# Record screen
|
||||
"Mod1+r" = ''exec ${wf-recorder} -f "${shotFile}.mp4"'';
|
||||
# Record an area
|
||||
"Mod1+Shift+r" =
|
||||
''exec ${wf-recorder} -g "$(${slurp})" -f "${shotFile}.mp4"'';
|
||||
"Mod1+Shift+r" = ''exec ${wf-recorder} -g "$(${slurp})" -f "${shotFile}.mp4"'';
|
||||
# Stop recording
|
||||
"Mod1+c" = "exec pkill -INT wf-recorder";
|
||||
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%";
|
||||
@ -405,15 +412,10 @@ in
|
||||
accel_profile = "flat";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
"*" = {
|
||||
bg = config.home.homeDirectory + "/wallpaper.png" + " fill";
|
||||
output = { "*" = { bg = config.home.homeDirectory + "/wallpaper.png" + " fill"; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
alacritty = {
|
||||
enable = true;
|
||||
@ -437,7 +439,8 @@ in
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
shortcut = "a";
|
||||
extraConfig = ''
|
||||
extraConfig =
|
||||
''
|
||||
set -g default-terminal "alacritty"
|
||||
set -ga terminal-overrides ",alacritty:Tc"
|
||||
set -g status off
|
||||
@ -447,14 +450,22 @@ in
|
||||
enable = true;
|
||||
package = pkgs.chromium;
|
||||
extensions = [
|
||||
"gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock
|
||||
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
|
||||
"ldpochfccmkkmhdbclfhpagapcfdljkj" # decentraleyes
|
||||
"annfbnbieaamhaimclajlajpijgkdblo" # dark theme
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
|
||||
"hlepfoohegkhhmjieoechaddaejaokhf" # github refined
|
||||
"pmcmeagblkinmogikoikkdjiligflglb" # privacy redirect
|
||||
"gcbommkclmclpchllfjekcdonpmejbdp"
|
||||
# https everywhere
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm"
|
||||
# ublock
|
||||
"nngceckbapebfimnlniiiahkandclblb"
|
||||
# bitwarden
|
||||
"ldpochfccmkkmhdbclfhpagapcfdljkj"
|
||||
# decentraleyes
|
||||
"annfbnbieaamhaimclajlajpijgkdblo"
|
||||
# dark theme
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh"
|
||||
# dark reader
|
||||
"hlepfoohegkhhmjieoechaddaejaokhf"
|
||||
# github refined
|
||||
"pmcmeagblkinmogikoikkdjiligflglb"
|
||||
# privacy redirect
|
||||
];
|
||||
};
|
||||
qutebrowser = {
|
||||
@ -480,11 +491,11 @@ in
|
||||
"youtube.com"
|
||||
"docker.com"
|
||||
];
|
||||
enableJsForDomain = d: ''
|
||||
enableJsForDomain =
|
||||
d: ''
|
||||
config.set('content.javascript.enabled', True, 'https://*.${d}')
|
||||
'';
|
||||
in
|
||||
''
|
||||
in ''
|
||||
${lib.concatStrings (map enableJsForDomain domains)}
|
||||
'';
|
||||
};
|
||||
@ -520,33 +531,38 @@ in
|
||||
plugins =
|
||||
let
|
||||
fast-syntax-highlighting =
|
||||
let name = "fast-syntax-highlighting"; in
|
||||
{
|
||||
let
|
||||
name = "fast-syntax-highlighting";
|
||||
in {
|
||||
inherit name;
|
||||
src = pkgs."zsh-${name}".out;
|
||||
};
|
||||
per-directory-history = {
|
||||
name = "per-directory-history";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
src =
|
||||
pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "jimhester";
|
||||
repo = "per-directory-history";
|
||||
rev = "d2e291dd6434e340d9be0e15e1f5b94f32771c06";
|
||||
hash = "sha256-VHRgrVCqzILqOes8VXGjSgLek38BFs9eijmp0JHtD5Q=";
|
||||
};
|
||||
};
|
||||
in
|
||||
[ fast-syntax-highlighting per-directory-history ];
|
||||
in [fast-syntax-highlighting per-directory-history];
|
||||
# xdg compliant
|
||||
dotDir = ".config/zsh";
|
||||
history.path = ".local/share/zsh/history";
|
||||
envExtra = extraEnv;
|
||||
/*loginExtra =
|
||||
/*
|
||||
loginExtra =
|
||||
''
|
||||
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
'';*/
|
||||
initExtra = ''
|
||||
'';
|
||||
*/
|
||||
initExtra =
|
||||
''
|
||||
export TERM=alacritty
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
@ -564,8 +580,11 @@ in
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
shellAliases = nixosConfig.environment.shellAliases // {
|
||||
harmony-ssh = ''
|
||||
shellAliases =
|
||||
nixosConfig.environment.shellAliases
|
||||
// {
|
||||
harmony-ssh =
|
||||
''
|
||||
${pkgs.mosh}/bin/mosh root@chat.harmonyapp.io
|
||||
'';
|
||||
};
|
||||
@ -576,8 +595,7 @@ in
|
||||
bgc = "#${bgColor}";
|
||||
fgc = "#${fgColor}";
|
||||
acc = "#${acColor}";
|
||||
in
|
||||
{
|
||||
in {
|
||||
enable = false;
|
||||
cycle = true;
|
||||
font = fontComb;
|
||||
@ -588,15 +606,25 @@ in
|
||||
package = pkgs.vscodeWayland;
|
||||
extensions =
|
||||
let
|
||||
mkExt = n: v: p: s: { name = n; version = v; publisher = p; sha256 = s; };
|
||||
mkExt =
|
||||
n: v: p: s: {
|
||||
name = n;
|
||||
version = v;
|
||||
publisher = p;
|
||||
sha256 = s;
|
||||
};
|
||||
in
|
||||
(pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
(
|
||||
pkgs.vscode-utils.extensionsFromVscodeMarketplace
|
||||
[
|
||||
# Rust
|
||||
(mkExt "rust-analyzer" "0.2.760" "matklad" "sha256-M+eFqIFwiKkiwqFRwkX5h6mc/W+NBqkXcNUdTewwkCI=")
|
||||
(mkExt "even-better-toml" "0.14.2" "tamasfe" "sha256-lE2t+KUfClD/xjpvexTJlEr7Kufo+22DUM9Ju4Tisp0=")
|
||||
(mkExt "crates" "0.5.9" "serayuzgur" "sha256-YHIbnl2R7lqwJHi8qUQImClx9MWm+5Pc12vYw7e/RlA=")
|
||||
# Nix
|
||||
(mkExt "nix-env-selector" "1.0.7" "arrterian" "sha256-DnaIXJ27bcpOrIp1hm7DcrlIzGSjo4RTJ9fD72ukKlc=")
|
||||
(
|
||||
mkExt "nix-env-selector" "1.0.7" "arrterian" "sha256-DnaIXJ27bcpOrIp1hm7DcrlIzGSjo4RTJ9fD72ukKlc="
|
||||
)
|
||||
# Go
|
||||
(mkExt "Go" "0.25.1" "golang" "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw=")
|
||||
# Flutter and dart
|
||||
@ -607,20 +635,39 @@ in
|
||||
(mkExt "vscode-buf" "0.3.1" "bufbuild" "sha256-KjU6WlDxYPPJjh45mCq6Kczi6odYwnLaGj4RHe3fc2w=")
|
||||
# git
|
||||
(mkExt "gitlens" "11.6.0" "eamodio" "sha256-JxCNE/IL/v94xWmhebsRZo1Gw+nSSpDgZ41ZGongGVI=")
|
||||
(mkExt "vscode-commitizen" "0.14.1" "KnisterPeter" "sha256-yw8XKGL7Ul9wV+C0yL1LFJCE3+E8u/sR9s3TjkGJPZM=")
|
||||
(
|
||||
mkExt
|
||||
"vscode-commitizen"
|
||||
"0.14.1"
|
||||
"KnisterPeter"
|
||||
"sha256-yw8XKGL7Ul9wV+C0yL1LFJCE3+E8u/sR9s3TjkGJPZM="
|
||||
)
|
||||
# Customization
|
||||
# (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=")
|
||||
(mkExt "material-icon-theme" "4.6.0" "PKief" "sha256-i+3lrw3mDqK2vTMDhJYTACW5JleA+lN1XAC2imgQLUo=")
|
||||
(mkExt "github-vscode-theme" "4.1.1" "GitHub" "sha256-yLySHOx6pe7w2cyi95pQlKkn/o4VMCTkrTYHu8ASn5M=")
|
||||
(
|
||||
mkExt "github-vscode-theme" "4.1.1" "GitHub" "sha256-yLySHOx6pe7w2cyi95pQlKkn/o4VMCTkrTYHu8ASn5M="
|
||||
)
|
||||
(mkExt "koka" "0.0.1" "maelvalais" "sha256-ty8Mql19HgUWForggeZuHQpzTbmmB/eBFHqof5ZMKr0=")
|
||||
(mkExt "vscode-rhai" "0.6.3" "rhaiscript" "sha256-gEdpM/TkkiZ50bG9qDU6BH04AJLRDcHLquniRs6m0mg=")
|
||||
(mkExt "copilot" "1.2.1991" "GitHub" "sha256-pGb5xfjuy+g646doZEuKhQalkOte5dH+I+1op+vZY48=")
|
||||
]) ++ (with pkgs.vscode-extensions; [ a5huynh.vscode-ron /* vadimcn.vscode-lldb */ jnoortheen.nix-ide ]);
|
||||
]
|
||||
)
|
||||
++ (
|
||||
with pkgs.vscode-extensions; [
|
||||
a5huynh.vscode-ron
|
||||
/*
|
||||
vadimcn.vscode-lldb
|
||||
*/
|
||||
jnoortheen.nix-ide
|
||||
]
|
||||
);
|
||||
userSettings = {
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"workbench.colorTheme" = "GitHub Dark";
|
||||
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
|
||||
"rust-analyzer.procMacro.enable" = true;
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"rust-analyzer.updates.channel" = "nightly";
|
||||
"editor.fontFamily" = "'${font}'";
|
||||
"debug.console.fontFamily" = "${font}";
|
||||
@ -634,16 +681,13 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
gpg-agent =
|
||||
let
|
||||
defaultCacheTtl = 3600 * 6;
|
||||
maxCacheTtl = 3600 * 24;
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit defaultCacheTtl maxCacheTtl;
|
||||
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
sshKeys = ["8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965"];
|
||||
@ -653,11 +697,11 @@ in
|
||||
pinentryFlavor = "qt";
|
||||
};
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"helix/themes/mytheme.toml".text = ''
|
||||
"helix/themes/mytheme.toml".text =
|
||||
''
|
||||
"attribute" = { fg = "#${colorScheme.bright.yellow}]" }
|
||||
"comment" = { fg = "#${colorScheme.normal.gray}", modifiers = ['italic'] }
|
||||
"constant" = { fg = "#${colorScheme.normal.blue}" }
|
||||
@ -700,27 +744,37 @@ in
|
||||
"warning" = { fg = "#${colorScheme.normal.yellow}", modifiers = ['bold'] }
|
||||
"error" = { fg = "#${colorScheme.bright.red}", modifiers = ['bold'] }
|
||||
'';
|
||||
"helix/config.toml".text = ''
|
||||
"helix/config.toml".text =
|
||||
''
|
||||
theme = "mytheme"
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
[lsp]
|
||||
display-messages = true
|
||||
'';
|
||||
"helix/languages.toml".text = ''
|
||||
"helix/languages.toml".text =
|
||||
''
|
||||
[[language]]
|
||||
name = "nix"
|
||||
language-server = { command = "${pkgBin "rnix-lsp"}" }
|
||||
'';
|
||||
"waybar/config".text =
|
||||
let swayEnabled = config.wayland.windowManager.sway.enable; in
|
||||
builtins.toJSON {
|
||||
let
|
||||
swayEnabled = config.wayland.windowManager.sway.enable;
|
||||
in
|
||||
builtins.toJSON
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-left = if swayEnabled then [ "sway/workspaces" ] else [ ];
|
||||
modules-center = if swayEnabled then [ "sway/window" ] else [ ];
|
||||
modules-right =
|
||||
[ "pulseaudio" "cpu" "memory" "temperature" "clock" "tray" ];
|
||||
modules-left =
|
||||
if swayEnabled
|
||||
then ["sway/workspaces"]
|
||||
else [];
|
||||
modules-center =
|
||||
if swayEnabled
|
||||
then ["sway/window"]
|
||||
else [];
|
||||
modules-right = ["pulseaudio" "cpu" "memory" "temperature" "clock" "tray"];
|
||||
tray = { spacing = 8; };
|
||||
cpu = { format = "/cpu {usage}/"; };
|
||||
memory = { format = "/mem {}/"; };
|
||||
@ -740,11 +794,11 @@ in
|
||||
"waybar/style.css".text =
|
||||
let
|
||||
makeBorder = color: "border-bottom: 3px solid #${color};";
|
||||
makeInfo = color: ''
|
||||
makeInfo =
|
||||
color: ''
|
||||
color: #${color};
|
||||
${makeBorder color}
|
||||
'';
|
||||
|
||||
clockColor = colorScheme.bright.magenta;
|
||||
cpuColor = colorScheme.bright.green;
|
||||
memColor = colorScheme.bright.blue;
|
||||
@ -756,8 +810,7 @@ in
|
||||
normal = colorScheme.bright.yellow;
|
||||
critical = colorScheme.bright.red;
|
||||
};
|
||||
in
|
||||
''
|
||||
in ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
@ -25,22 +25,17 @@
|
||||
ssp = "stash pop";
|
||||
ssl = "stash list";
|
||||
ssd = "stash drop";
|
||||
|
||||
# reset
|
||||
rsoft = "reset --soft";
|
||||
rhard = "reset --hard";
|
||||
rs1ft = "soft HEAD~1";
|
||||
rh1rd = "hard HEAD~1";
|
||||
|
||||
# logging
|
||||
l =
|
||||
"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
plog =
|
||||
"log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog =
|
||||
"log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
rank = "shortlog -sn --no-merges";
|
||||
|
||||
# delete merged branches
|
||||
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
|
||||
};
|
||||
|
@ -1,11 +1,16 @@
|
||||
{ fontComb ? "Iosevka 10", config, pkgs, ... }:
|
||||
{
|
||||
fontComb ? "Iosevka 10",
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [hikari xwayland];
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"hikari/hikari.conf".text = ''
|
||||
"hikari/hikari.conf".text =
|
||||
''
|
||||
ui {
|
||||
border = 1
|
||||
gap = 0
|
||||
@ -190,8 +195,11 @@
|
||||
}
|
||||
}
|
||||
'';
|
||||
"hikari/autostart".source = "${
|
||||
pkgs.writeScriptBin "hikari-autostart" ''
|
||||
"hikari/autostart".source =
|
||||
"${
|
||||
pkgs.writeScriptBin
|
||||
"hikari-autostart"
|
||||
''
|
||||
#!${pkgs.stdenv.shell}
|
||||
${pkgs.waybar}/bin/waybar &
|
||||
''
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -1,3 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = [ pkgs.wtf ];
|
||||
}
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ home.packages = [pkgs.wtf]; }
|
||||
|
Loading…
Reference in New Issue
Block a user