Compare commits
7 Commits
0a6e024b78
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
db3ceb7eac
|
|||
|
5b19dec3c3
|
|||
|
97b7348c2b
|
|||
|
b6ae96cb84
|
|||
|
25735d5bd1
|
|||
|
3aff25b448
|
|||
|
e6cad243de
|
@@ -1,2 +1,3 @@
|
|||||||
# nix fmt
|
# nix fmt & statix
|
||||||
f011c8d71ba09bd94ab04b8d771858b90a03fbf9
|
f011c8d71ba09bd94ab04b8d771858b90a03fbf9
|
||||||
|
3aff25b4486a143cd6282f8845c16216598e1c7e
|
||||||
|
|||||||
@@ -4,3 +4,11 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: nixfmt-nix
|
- id: nixfmt-nix
|
||||||
args: [--, --check]
|
args: [--, --check]
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: statix
|
||||||
|
name: statix
|
||||||
|
entry: statix check
|
||||||
|
language: system
|
||||||
|
files: \.nix$
|
||||||
|
pass_filenames: false
|
||||||
|
|||||||
48
flake.lock
generated
48
flake.lock
generated
@@ -255,11 +255,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770260404,
|
"lastModified": 1771744638,
|
||||||
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
|
"narHash": "sha256-EDLi+YAsEEAmMeZe1v6GccuGRbCkpSZp/+A6g+pivR8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
|
"rev": "cb6c151f5c9db4df0b69d06894dc8484de1f16a0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -300,11 +300,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771545891,
|
"lastModified": 1771891493,
|
||||||
"narHash": "sha256-aaVUfc/9q2pCsELZmYhf+uvYRMCUlBvccgL1VS27R+o=",
|
"narHash": "sha256-L0OCnG8rsWJYZ3mzHSz0iENtlBXQjjcGgvMgsBqN14U=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "917b72d5e27bc217440655b81f701d7062bdd198",
|
"rev": "7db85d094c68697fc36801bccdf015b4c2bdb274",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -316,11 +316,11 @@
|
|||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771541613,
|
"lastModified": 1771885993,
|
||||||
"narHash": "sha256-1Rpt5B4pNW/MNkWoEamqwCa5I4/9G84dSqp4eHS5zsA=",
|
"narHash": "sha256-2c4H+5f0qhsp13Vx8pbsGiSRTHBJIfQaRAAUSHGEpgo=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "e3d46a63375c84b7bd409f1f07ef56eb985eae50",
|
"rev": "d9d8c660fd5559d928c8870a21970a375674e310",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -331,11 +331,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771207753,
|
"lastModified": 1771423170,
|
||||||
"narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=",
|
"narHash": "sha256-K7Dg9TQ0mOcAtWTO/FX/FaprtWQ8BmEXTpLIaNRhEwU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d1c15b7d5806069da59e819999d70e1cec0760bf",
|
"rev": "bcc4a9d9533c033d806a46b37dc444f9b0da49dd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -347,11 +347,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771612900,
|
"lastModified": 1771932323,
|
||||||
"narHash": "sha256-ToJ0wYbphG1ZN7bgGpCJxu69Tt3ij0+T6W4YljLCHak=",
|
"narHash": "sha256-3PadsTzuMJT/x0KmiD/Me1GG6rW8kaHoWVduSs0ue7o=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f65d4c996f96838b8f50253859cf7b17e956a792",
|
"rev": "89bb5c5da7a857869cc88ef9b856bffdff8af264",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -363,11 +363,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771207753,
|
"lastModified": 1771482645,
|
||||||
"narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=",
|
"narHash": "sha256-MpAKyXfJRDTgRU33Hja+G+3h9ywLAJJNRq4Pjbb4dQs=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d1c15b7d5806069da59e819999d70e1cec0760bf",
|
"rev": "724cf38d99ba81fbb4a347081db93e2e3a9bc2ae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -379,11 +379,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771419570,
|
"lastModified": 1771714954,
|
||||||
"narHash": "sha256-bxAlQgre3pcQcaRUm/8A0v/X8d2nhfraWSFqVmMcBcU=",
|
"narHash": "sha256-nhZJPnBavtu40/L2aqpljrfUNb2rxmWTmSjK2c9UKds=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6d41bc27aaf7b6a3ba6b169db3bd5d6159cfaa47",
|
"rev": "afbbf774e2087c3d734266c22f96fca2e78d3620",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -496,11 +496,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771429540,
|
"lastModified": 1771788390,
|
||||||
"narHash": "sha256-YKytDx8LOPOvE+dip1ja+1nbIpDVdqTaFbP4MaXwveM=",
|
"narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "1a5c9d8be82127aeccc929f60b952e8a3df6b63c",
|
"rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
32
flake.nix
32
flake.nix
@@ -50,15 +50,19 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
my-lib = import ./lib { lib = nixpkgs.lib; };
|
my-lib = import ./lib { inherit (nixpkgs) lib; };
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
(_: prev: {
|
(_: prev: {
|
||||||
claude-code =
|
inherit
|
||||||
|
(
|
||||||
(import inputs.nixpkgs-unstable {
|
(import inputs.nixpkgs-unstable {
|
||||||
system = prev.stdenv.hostPlatform.system;
|
inherit (prev.stdenv.hostPlatform) system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}).claude-code;
|
})
|
||||||
|
)
|
||||||
|
claude-code
|
||||||
|
;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -94,7 +98,7 @@
|
|||||||
|
|
||||||
nixosModules = import ./modules/nixos {
|
nixosModules = import ./modules/nixos {
|
||||||
inherit my-lib;
|
inherit my-lib;
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
} { };
|
} { };
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
// flake-utils.lib.eachDefaultSystem (
|
||||||
@@ -103,15 +107,25 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = import ./packages {
|
packages =
|
||||||
|
import ./packages
|
||||||
|
{
|
||||||
inherit my-lib;
|
inherit my-lib;
|
||||||
lib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
} (inputs // { inherit system; });
|
}
|
||||||
|
{
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
|
||||||
|
pkgs-master = inputs.nixpkgs-master.legacyPackages.${system};
|
||||||
|
};
|
||||||
|
|
||||||
formatter = pkgs.nixfmt-tree;
|
formatter = pkgs.nixfmt-tree;
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = [ pkgs.pre-commit ];
|
packages = [
|
||||||
|
pkgs.pre-commit
|
||||||
|
pkgs.statix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ let
|
|||||||
# TODO:(@janezicmatej) restructure keys import
|
# TODO:(@janezicmatej) restructure keys import
|
||||||
keys = import ../../users/matej/keys.nix;
|
keys = import ../../users/matej/keys.nix;
|
||||||
|
|
||||||
cfg = config.initrd-ssh;
|
|
||||||
|
|
||||||
# generate host keys for new machines: ./scripts/initrd-ssh-keygen.sh
|
# generate host keys for new machines: ./scripts/initrd-ssh-keygen.sh
|
||||||
keyDir = "/etc/secrets/initrd";
|
keyDir = "/etc/secrets/initrd";
|
||||||
|
|
||||||
@@ -63,10 +61,10 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.initrd-ssh.enable {
|
||||||
boot.initrd.kernelModules = [ cfg.networkModule ];
|
boot.initrd.kernelModules = [ config.initrd-ssh.networkModule ];
|
||||||
boot.kernelParams = lib.mkIf cfg.ip.enable [
|
boot.kernelParams = lib.mkIf config.initrd-ssh.ip.enable [
|
||||||
"ip=${mkIpString cfg.ip}"
|
"ip=${mkIpString config.initrd-ssh.ip}"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.network = {
|
boot.initrd.network = {
|
||||||
@@ -78,7 +76,7 @@ in
|
|||||||
"${keyDir}/ssh_host_rsa_key"
|
"${keyDir}/ssh_host_rsa_key"
|
||||||
"${keyDir}/ssh_host_ed25519_key"
|
"${keyDir}/ssh_host_ed25519_key"
|
||||||
];
|
];
|
||||||
authorizedKeys = cfg.authorizedKeys;
|
inherit (config.initrd-ssh) authorizedKeys;
|
||||||
};
|
};
|
||||||
postCommands = ''
|
postCommands = ''
|
||||||
echo 'cryptsetup-askpass' >> /root/.profile
|
echo 'cryptsetup-askpass' >> /root/.profile
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
cfg = config.tuigreet;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
tuigreet = {
|
tuigreet = {
|
||||||
@@ -18,18 +15,16 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.tuigreet.enable {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useTextGreeter = true;
|
useTextGreeter = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = builtins.toString (
|
command = pkgs.writeShellScript "tuigreet-session" ''
|
||||||
pkgs.writeShellScript "tuigreet-session" ''
|
|
||||||
${pkgs.util-linux}/bin/setterm --blank 1 --powersave powerdown --powerdown 1
|
${pkgs.util-linux}/bin/setterm --blank 1 --powersave powerdown --powerdown 1
|
||||||
exec ${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd ${cfg.command}
|
exec ${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd ${config.tuigreet.command}
|
||||||
''
|
'';
|
||||||
);
|
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
cfg = config.workstation;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
workstation = {
|
workstation = {
|
||||||
@@ -14,7 +11,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.workstation.enable {
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
logDriver = "json-file";
|
logDriver = "json-file";
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{ nixpkgs, system, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
version = "v0.3.2";
|
version = "v0.3.2";
|
||||||
in
|
in
|
||||||
pkgs.rustPlatform.buildRustPackage {
|
pkgs.rustPlatform.buildRustPackage {
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
{ nixpkgs, system, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
version = "C6r62em";
|
version = "C6r62em";
|
||||||
in
|
in
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
pname = "ca-matheo-si";
|
pname = "ca-matheo-si";
|
||||||
version = version;
|
inherit version;
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "http://ipa2.matheo.si/ipa/config/ca.crt";
|
url = "http://ipa2.matheo.si/ipa/config/ca.crt";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
{ nixpkgs-master, system, ... }:
|
{ pkgs-master, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
nixpkgs = nixpkgs-master;
|
pkgs = pkgs-master;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
version = "e24855c";
|
version = "e24855c";
|
||||||
in
|
in
|
||||||
pkgs.buildGoModule.override
|
pkgs.buildGoModule.override
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{ nixpkgs, system, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
version = "main";
|
version = "main";
|
||||||
in
|
in
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
|
|||||||
1
statix.toml
Normal file
1
statix.toml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
disabled = ["repeated_keys"]
|
||||||
Reference in New Issue
Block a user