Compare commits

..

21 commits

Author SHA1 Message Date
e8b83724ca Update rust treesitter grammar for helix 2024-04-27 12:13:43 +02:00
0b1c7bce55 disable firewall for strawberry 2024-04-27 11:11:45 +02:00
1d5a7e0804 Fix strawberry issues (add steam, update pins, switch to pulse) 2023-12-23 18:01:36 +01:00
ca5ee9ed20 Fix swaylock on work machine 2023-12-22 12:26:06 +01:00
78abfc12eb Merge branch 'mistress' of im.badat.dev:riley/os into mistress 2023-12-22 12:25:00 +01:00
504df67a2c Enable steam and bluetooth on lime 2023-11-10 18:45:01 +01:00
3107449982 Change waybar styles 2023-09-21 20:38:50 +02:00
f6a3d89a8a Update nixpkgs 2023-09-21 17:38:37 +02:00
616d74641b Change wallpaper 2023-09-21 18:07:31 +02:00
a61c8fc8fb Clean /tmp on boot 2023-09-03 13:11:37 +02:00
4fd6205b88 Add deemix + config 2023-09-02 23:26:09 +02:00
2858ec8363 Add user packages 2023-08-29 15:32:56 +02:00
721ab25e11 Add yeet script 2023-08-23 10:03:13 +02:00
95431378af Override nixpkgs version for security-critical applications 2023-08-13 10:22:51 +02:00
f7455b059e Revert "Update pins"
This reverts commit dcac16d9c9.
2023-08-13 09:55:11 +02:00
dcac16d9c9 Update pins 2023-08-12 20:31:01 +02:00
978fc8186d Add utils dev shell 2023-07-06 11:57:44 +02:00
666a75f844 Add keybinds for volume and fix eval on dev-lt-63 2023-06-28 13:29:23 +02:00
8e7233cc43 Enable Docker 2023-06-24 10:08:48 +02:00
c69e5c07be Add rust toolchain 2023-06-19 22:14:22 +02:00
2083556fad Allow aarch64 emulation on lime 2023-06-19 21:46:55 +02:00
35 changed files with 459 additions and 209 deletions

View file

@ -7,11 +7,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1684153753, "lastModified": 1703260116,
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=", "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3", "rev": "d0d4ad5be611da43da04321f49684ad72d705c7e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,6 +20,27 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"inputs": {
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709610799,
"narHash": "sha256-5jfLQx0U9hXbi2skYMGodDJkIgffrjIOgMRjZqms2QE=",
"owner": "ipetkov",
"repo": "crane",
"rev": "81c393c776d5379c030607866afef6406ca1be57",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -43,6 +64,42 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
@ -57,6 +114,27 @@
"type": "github" "type": "github"
} }
}, },
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1714168229,
"narHash": "sha256-EzNJ7L1XgqSIo3myFl/dFVqm6BXa8oV9qzSJpMBGYWU=",
"owner": "helix-editor",
"repo": "helix",
"rev": "5ee7411450021df3854b62f61b8722451e40277c",
"type": "github"
},
"original": {
"owner": "helix-editor",
"repo": "helix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -80,14 +158,14 @@
}, },
"home-manager_2": { "home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1686922395, "lastModified": 1703265279,
"narHash": "sha256-ysevinohPxdKp0RXyhDRsz1/vh1eXazg4AWp0n5X/U4=", "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9ba7b3990eb1f4782ea3f5fe7ac4f3c88dd7a32c", "rev": "07c322a7cff03267fd881adae1afe63367c5d608",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -114,11 +192,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1686838567, "lastModified": 1702453208,
"narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=", "narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89", "rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -143,13 +221,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-latest": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1686501370, "lastModified": 1709479366,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -161,11 +255,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1686869522, "lastModified": 1702312524,
"narHash": "sha256-tbJ9B8WLCTnVP/LwESRlg0dII6Zyg2LmUU/mB9Lu98E=", "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7c67f006ea0e7d0265f16d7df07cc076fdffd91f", "rev": "a9bf124c46ef298113270b1f84a164865987a91c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -175,9 +269,60 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"oxalica": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1703297543,
"narHash": "sha256-d4QlzcoSNzb/iZheWtjOyRxoBSaLETSpViENGEkxv9g=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fc77c8b416b1537522d30c710baaaaebf769f816",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"pwnix": { "pwnix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils_3",
"jwt-tool": "jwt-tool", "jwt-tool": "jwt-tool",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -217,11 +362,69 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"helix": "helix",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"nixpkgs-latest": "nixpkgs-latest",
"oxalica": "oxalica",
"pwnix": "pwnix" "pwnix": "pwnix"
} }
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"helix",
"flake-utils"
],
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709604635,
"narHash": "sha256-le4fwmWmjGRYWwkho0Gr7mnnZndOOe4XGbLw68OvF40=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e86c0fb5d3a22a5f30d7f64ecad88643fe26449d",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,7 +1,8 @@
{ {
inputs = { inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-latest.url = github:NixOS/nixpkgs/nixos-unstable;
home-manager.url = github:nix-community/home-manager; home-manager.url = github:nix-community/home-manager;
pwnix = { pwnix = {
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -9,16 +10,20 @@
}; };
agenix.url = github:ryantm/agenix; agenix.url = github:ryantm/agenix;
nixos-hardware.url = github:NixOS/nixos-hardware; nixos-hardware.url = github:NixOS/nixos-hardware;
oxalica.url = github:oxalica/rust-overlay;
helix.url = "github:helix-editor/helix";
}; };
outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, ... }: with nixpkgs; { outputs = args@{ home-manager, nixpkgs, agenix, nixos-hardware, oxalica, ... }: with nixpkgs; rec {
# Configurations for NixOS machines. # Configurations for NixOS machines.
nixosConfigurations = nixosConfigurations =
let mkUserConfig = path: { let mkUserConfig = path: { config, ... }: {
imports = [ home-manager.nixosModules.home-manager ]; imports = [ home-manager.nixosModules.home-manager ];
config = { config = {
home-manager.users."riley" = (import "${path}/home.nix"); home-manager.users."riley" = (import "${path}/home.nix");
home-manager.extraSpecialArgs = args // { age = config.age; };
home-manager.useGlobalPkgs = true;
}; };
}; };
in { in {
@ -42,8 +47,6 @@
modules = [ modules = [
(mkUserConfig ./system/lime) (mkUserConfig ./system/lime)
agenix.nixosModules.default agenix.nixosModules.default
nixos-hardware.nixosModules.lenovo-thinkpad-x390
nixos-hardware.nixosModules.common-gpu-nvidia-disable
./system/lime/core.nix ./system/lime/core.nix
./shared/core ./shared/core
./shared/secrets.nix ./shared/secrets.nix
@ -64,8 +67,10 @@
# Configurations for non-NixOS machines. # Configurations for non-NixOS machines.
homeConfigurations = with home-manager.lib; { homeConfigurations = with home-manager.lib; {
"dev-lt-63" = homeManagerConfiguration { "dev-lt-63" = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux"; extraSpecialArgs = args;
pkgs = import nixpkgs { system = "x86_64-linux"; };
modules = [ modules = [
agenix.homeManagerModules.default
./system/dev-lt-63/home.nix ./system/dev-lt-63/home.nix
./shared/home ./shared/home
]; ];
@ -73,7 +78,13 @@
}; };
overlays = { overlays = {
default = (import ./shared/overlay.nix); default = (import ./shared/overlay.nix args.helix);
};
devShells."x86_64-linux"."utils" = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.mkShell {
buildInputs = import ./shared/env.nix pkgs;
}; };
}; };

1
script/yeet Normal file
View file

@ -0,0 +1 @@
curl https://ttm.sh -F "file=@$1" | c

BIN
secret/arl.age Normal file

Binary file not shown.

View file

@ -1,16 +1,16 @@
age-encryption.org/v1 age-encryption.org/v1
-> ssh-ed25519 WzdOcw h94kBby65Xk01HiJqlJm7GgLBfY3wZtGQ54HQ2ZQjg0 -> ssh-ed25519 WzdOcw 1lsnOUTrzbSNctIZqVInhFEjzRTo7IKdK7GjT0JxIj0
BwYbWD+Se7HN5aNjIlNciOOu3ri0yqQ5faZDnkpOXcw vt3/nk8N7QSKs4J0Kk/XCLLK5Jhnr3brIFNelkEUnfk
-> ssh-ed25519 qlXMTg x8lrVzgk1H3ehJlhYjr1BF2I3TbZdLw3BLMqvbJpuEo -> ssh-ed25519 qlXMTg PX8FAAlZJGtWlatXTzx9ZKniBy+5mciMapnHokWZrn0
tj/OOMQInK2Dk/Asx+DmGThW6W+G7Y1XG/rj+QK+CCw gHWSf8OhWHR1ymt+A7d4oTvyPpmAAeI2pr8D8l8+HEQ
-> ssh-ed25519 3g+qkA rY3q0RYYGne+L5WEXaOEtSGSMmTM9KbTACdGKO4tMz0 -> ssh-ed25519 3g+qkA frFN6lUt7p2tU1vRdQeXqozkDez9akjj5CM5k1olClE
lZoBD+5JKsk8hIjXR82F32XRmJNzc2eBX3Xc1f68deQ dVWx6Rd7gudoEIWkpNv4U3nyp1v4CbERARlFvT/ahiQ
-> ssh-ed25519 Up9k4Q O6t2IUuMkHFbG54CJxJXj46JyOrNUbAyJajTVaGPU0I -> ssh-ed25519 Up9k4Q ru7olvt6Y8wP/QPNQJxe3uX+FqheizozKT83rid/rXA
ln5It/O7iPcbkBUpY1QBKOEoJ9c/ldgGvmwnncqXx/A fG9dqeAMCN8tNw5eaB19gSvhdbX/b/MuBWFq9UAUA5Q
-> ssh-ed25519 tvCYbQ IrQ4s4+X9z6wETfmICBVlHrIqSF8Op4chRn4AnQVPgc -> ssh-ed25519 tvCYbQ HAeTgsQ59/Ln+ZrXKUukimR/jaizOvoHhxBMBXtKnCg
6LC8YVDdjMXmPIQD73XpnQ8bCTKLqsHaqGNxCbu4u44 cW9bsrq26nHW1l1oixAtQg/O+7i4zbpY4JpYq5PxeD8
-> 6Sn0PI,f-grease -> /cqd7&-grease
WTAnoitw9SAP6mtmy2FJvvK3CS7XHHpBWH9O/d4fCmLrhWSy/k0TLuqgNRxhjUbV 5LOEArVREAJ9esiITB7o3bt3g+ZUVBQd5dCzcvHzbrBiuRKrnVH8/WhSkptIG/dz
vQ LTEAT6Kalmuks7rRzJIAsQfEYNtDtqB7Wkvdtr5RDko0
--- rDtvnW7Ha58EIh9rr95oPWFqcipsNoHWHSqAap8i22o --- tDCGuo0X6VahQvht1FwSNxTmWTjE5l1kXds3R1q+Pic
h QzöØ3Á\¡Üën€ÝF§ŽHÉ£³$y<>ÑŠü'!žmvl<76>¨vrŒw,\ £<>n\C­<43>*‰¼ 8š€0 îåa<1B>Ü…i=ºè'“úòlí#–Ã<03>…äÒô‡P•éf<C3A9>¾¾êx™F ÃkäìtZÏǸZ%*#ÚP¹€Lo²Ù4ó„]Œ8 nϬI> ¾=ö(ÆD ÏïXž{™òCz3eš¨ F³8®š.eÍøÙa5m§<6D>aVÅØä ßÛj0%êY©¾QC ý œbž^4ÉÐF† Ú¯1e†§* ~ê|$"&|e&ŽÊGÕìþÿA°«ŸÅÕ©D«#¶ßVlAÓP<%Qqnç §Š¬§e¢>I=P*±îô  ó

View file

@ -1,10 +1,10 @@
let strawberry = [ let strawberry = [
(builtins.readFile ./system/strawberry/keys/riley.pub) (builtins.readFile ./system/strawberry/keys/riley.pub)
(builtins.readFile ./system/strawberry/keys/host.pub) (builtins.readFile ./system/strawberry/keys/root.pub)
]; ];
lime = [ lime = [
(builtins.readFile ./system/lime/keys/riley.pub) (builtins.readFile ./system/lime/keys/riley.pub)
(builtins.readFile ./system/lime/keys/host.pub) (builtins.readFile ./system/lime/keys/root.pub)
]; ];
dev-lt-63 = [ dev-lt-63 = [
(builtins.readFile ./system/dev-lt-63/keys/riley.pub) (builtins.readFile ./system/dev-lt-63/keys/riley.pub)
@ -13,4 +13,6 @@ let strawberry = [
in { in {
# Secrets for backup cloud storage provider # Secrets for backup cloud storage provider
"secret/backblaze.age".publicKeys = all; "secret/backblaze.age".publicKeys = all;
# The ARL for my deezer account
"secret/arl.age".publicKeys = all;
} }

View file

@ -5,6 +5,7 @@
imports = [ imports = [
./services.nix ./services.nix
./backups.nix ./backups.nix
./docker.nix
./users.nix ./users.nix
./gui.nix ./gui.nix
./nix.nix ./nix.nix
@ -12,6 +13,7 @@
config = { config = {
time.timeZone = "Europe/Amsterdam"; time.timeZone = "Europe/Amsterdam";
boot.tmp.cleanOnBoot = true;
environment.systemPackages = (import ../env.nix pkgs) ++ (with pkgs; [ environment.systemPackages = (import ../env.nix pkgs) ++ (with pkgs; [
# For Mae # For Mae
neovim neovim

11
shared/core/docker.nix Normal file
View file

@ -0,0 +1,11 @@
{ ... }: {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
}

View file

@ -23,11 +23,13 @@ in {
}; };
services.pipewire = { services.pipewire = {
enable = true; enable = false;
pulse.enable = true; pulse.enable = true;
wireplumber.enable = true; wireplumber.enable = true;
}; };
hardware.pulseaudio.enable = true;
services.dbus.enable = true; services.dbus.enable = true;
programs.sway = { programs.sway = {

View file

@ -1,50 +1,25 @@
{ pkgs, lib, config, nixpkgs, pwnix, ... }: { pkgs, lib, config, nixpkgs, pwnix, helix, ... }:
let cfg = config.custom.nix; let cfg = config.custom.nix;
in with lib; { in with lib; {
options.custom.nix = { options.custom.nix = {};
distributedBuilds.enable =
(mkEnableOption "distributed builds on strawberry") // { default = true; };
};
# TODO: Add strawberry as a build machine here # TODO: Add strawberry as a build machine here
config = mkMerge [ config = {
{ nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfree = true; nixpkgs.overlays = [ (import ../overlay.nix helix) ];
nix = { nix.extraOptions = ''
extraOptions = '' experimental-features = nix-command flakes
experimental-features = nix-command flakes '';
''; nix.registry.nixpkgs.flake = nixpkgs;
registry.nixpkgs.flake = nixpkgs; nix.registry.helix.flake = helix;
registry.pwnix.flake = pwnix; nix.registry.pwnix.flake = pwnix;
settings.trusted-users = [ nix.settings.trusted-users = [
"@wheel" "@wheel"
"root" "root"
]; ];
}; };
}
(mkIf cfg.distributedBuilds.enable {
nix.distributedBuilds = true;
nix.buildMachines = [{
hostName = "strawberry";
sshUser = "nix-build";
sshKey = "/etc/ssh/ssh_host_ed25519_key";
systems = [
"x86_64-linux"
"aarch64-linux"
];
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
}];
})
];
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

View file

Before

Width:  |  Height:  |  Size: 598 KiB

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

BIN
shared/data/time-warp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -5,7 +5,7 @@ pkgs: with pkgs; [
bottom bottom
coreutils coreutils
curl curl
exa eza
fd fd
file file
git git

View file

@ -25,6 +25,7 @@ in with lib; {
"reboot" "reboot"
"exit" "exit"
"exa" "exa"
"eza"
"fg" "fg"
"cd" "cd"
"ls" "ls"
@ -38,7 +39,8 @@ in with lib; {
shellAliases = { shellAliases = {
# General aliases # General aliases
":q" = "exit"; ":q" = "exit";
"t" = "${exa}/bin/exa -T"; "t" = "${eza}/bin/eza -T";
"l" = "${eza}/bin/eza";
".." = "cd .."; ".." = "cd ..";
# Git command aliases # Git command aliases

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./bash.nix ./bash.nix
./rust.nix
./git.nix ./git.nix
./mpd.nix ./mpd.nix
./xdg.nix ./xdg.nix

View file

@ -5,9 +5,8 @@
global = { global = {
font = "Fira Code 9"; font = "Fira Code 9";
origin = "bottom-right"; origin = "bottom-right";
offset = "10x10"; offset = "3x50";
frame_width = "2"; frame_width = "2";
frame_color = "#ffffff";
corner_radius = "4"; corner_radius = "4";
width = "400"; width = "400";
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }: { pkgs, nixpkgs-latest, lib, config, ... }:
let mod = "Mod4"; let mod = "Mod4";
cfg = config.custom.gui; cfg = config.custom.gui;
@ -57,11 +57,14 @@ in with lib; {
extraConfig = '' extraConfig = ''
bindsym --release ${mod}+d exec ${sc}/bin/sc bindsym --release ${mod}+d exec ${sc}/bin/sc
''; '' + (if !config.isNixos then ''
exec "${(import nixpkgs-latest {}).google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --app=https://calendar.google.com"
'' else "");
config = rec { config = rec {
output."*".bg = "${../../data/wallpaper.jpg} fill"; output."*".bg = "${../../data/time-warp.jpg} fill";
input."type:keyboard".xkb_options = "caps:escape"; output."eDP-1".bg = "${../../data/temporal-cleansing.png} fill";
input."type:keyboard".xkb_options = "caps:super";
terminal = "kitty --single-instance"; terminal = "kitty --single-instance";
bars = []; bars = [];
@ -113,12 +116,13 @@ in with lib; {
"${mod}+Alt+a" = "layout toggle stacking splitv"; "${mod}+Alt+a" = "layout toggle stacking splitv";
"${mod}+Alt+s" = "layout toggle tabbed splith"; "${mod}+Alt+s" = "layout toggle tabbed splith";
"${mod}+Escape" = "exec swaylock"; "${mod}+Escape" = if config.isNixos then "exec ${pkgs.swaylock}/bin/swaylock" else "exec swaylock";
"${mod}+Space" = "exec pkill -SIGUSR1 waybar";
"${mod}+Return" = "exec ${terminal}"; "${mod}+Return" = "exec ${terminal}";
"${mod}+Alt+Return" = "exec ${pkgs.foot}/bin/foot"; "${mod}+Alt+Return" = "exec ${pkgs.foot}/bin/foot";
"${mod}+Tab" = "exec ${pkgs.firefox-wayland}/bin/firefox"; "${mod}+Tab" = "exec ${pkgs.firefox-wayland}/bin/firefox";
"${mod}+Alt+Tab" = "exec ${pkgs.google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder"; "${mod}+Alt+Tab" = "exec ${(import nixpkgs-latest {}).google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder";
"${mod}+Backspace" = "mode kill"; "${mod}+Backspace" = "mode kill";
@ -127,6 +131,9 @@ in with lib; {
"XF86AudioMute" = "exec ${vol} toggle"; "XF86AudioMute" = "exec ${vol} toggle";
"XF86AudioPlay" = "exec ${mpc} toggle"; "XF86AudioPlay" = "exec ${mpc} toggle";
"${mod}+z" = "exec ${vol} lower";
"${mod}+x" = "exec ${vol} raise";
"${mod}+comma" = "exec ${mpc} prev"; "${mod}+comma" = "exec ${mpc} prev";
"${mod}+period" = "exec ${mpc} next"; "${mod}+period" = "exec ${mpc} next";
"${mod}+slash" = "exec ${mpc} toggle"; "${mod}+slash" = "exec ${mpc} toggle";

View file

@ -36,20 +36,15 @@ in {
target = "sway-session.target"; target = "sway-session.target";
}; };
settings = [{ settings = [{
margin = "3";
position = "bottom";
exclusive = false;
layer = "top"; layer = "top";
modules-left = [ modules-right = with lib; flatten [
"sway/workspaces" "sway/workspaces"
"sway/mode" "sway/mode"
"mpd"
];
modules-right = with lib; flatten [
"cpu"
"disk"
(optional (cfg.battery.name != "") "battery") (optional (cfg.battery.name != "") "battery")
(optional (cfg.bluetooth.enable) "bluetooth") "network"
(optional (cfg.network.wifi != "") "network#wifi")
(optional (cfg.network.eth != "") "network#eth")
(optional (cfg.network.vpn != "") "network#vpn")
(if cfg.audio.wireplumber (if cfg.audio.wireplumber
then "wireplumber" then "wireplumber"
else "pulseaudio") else "pulseaudio")
@ -62,35 +57,28 @@ in {
"format-disconnected" = ""; "format-disconnected" = "";
}; };
"clock#time" = { "clock#time" = {
"format" = "{:%H:%M:%S}"; "format" = "{:%H:%M}";
"interval" = 1; "interval" = 1;
}; };
"clock#date" = { "clock#date" = {
"format" = "{:%Y-%m-%d}"; "format" = "{:%Y-%m-%d}";
"interval" = 60; "interval" = 60;
}; };
"network#wifi" = { "network" = {
"interface" = cfg.network.wifi; "format-wifi" = "{essid}";
"format" = "wifi"; "format-ethernet" = "eth";
}; "format-disconnected" = "";
"network#eth" = {
"interface" = cfg.network.eth;
"format" = "eth";
};
"network#vpn" = {
"interface" = cfg.network.vpn;
"format" = "vpn";
}; };
"pulseaudio" = { "pulseaudio" = {
"format" = "{desc}: {volume}%"; "format" = "{desc} | {volume}%";
}; };
"wireplumber" = { "wireplumber" = {
"format" = "{node_name}: {volume}%"; "format" = "{node_name} | {volume}%";
}; };
"battery" = { "battery" = {
"bat" = cfg.battery.name; "bat" = cfg.battery.name;
"format-discharging" = "{capacity}% (battery)"; "format-discharging" = "{capacity}%";
"format-charging" = "{capacity}% (charging)"; "format-charging" = "{capacity}%";
"format-full" = ""; "format-full" = "";
"states" = { "states" = {
"critical" = 20; "critical" = 20;
@ -101,29 +89,10 @@ in {
"format-on" = ""; "format-on" = "";
"format-connected" = "{device_alias}"; "format-connected" = "{device_alias}";
}; };
"disk" = {
"format" = "{used} :: {free}";
};
"sway/workspaces" = {
"all-outputs" = true;
};
}]; }];
style = let # TODO: make this fancy scss
green = "#27e67a"; style = ''
yellow = "#edd340";
pink = "#ff4787";
teal = "#1bcf9c";
blue = "#3988e3";
violet = "#9063e6";
lime = "#bfed5a";
red = "#eb3b5b";
disabled = ''
color: #ffffff;
background-color: rgba(207, 207, 207, 0.4);
'';
in ''
/* General/shared styles */ /* General/shared styles */
* { * {
@ -133,7 +102,13 @@ in {
} }
window#waybar { window#waybar {
background-color: rgba(0, 0, 0, 0.45); background-color: transparent;
}
.modules-right {
background-color: #424242;
border-radius: 40px;
padding-left: 2px;
} }
#battery, #battery,
@ -147,12 +122,9 @@ in {
#pulseaudio, #pulseaudio,
#wireplumber #wireplumber
{ {
padding: 2px 10px; padding: 5px 10px;
margin: 5px; margin: 5px 2px;
border-radius: 100px; border-radius: 100px;
}
#cpu, #disk, #bluetooth, #mpd {
color: #ffffff; color: #ffffff;
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
@ -161,32 +133,34 @@ in {
/* Sway chips */ /* Sway chips */
#workspaces { #workspaces {
margin-left: 5px;
padding: 0; padding: 0;
margin: 5px; margin: 5px 2px 5px 5px;
border-radius: 200px; border-radius: 200px;
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
#workspaces button { #workspaces button {
margin: 0; border: 2px solid;
padding: 0 5px; border-color: transparent;
border-radius: 100px; border-radius: 100px;
color: #ffffff; color: #ffffff;
background-color: rgba(0, 0, 0, 0.4); font-size: 9px;
margin: 0;
padding: 0 5px;
} }
#workspaces button.visible.focused { #workspaces button.visible.focused {
color: #212121; color: #ffffff;
background-color: ${green}; border-color: #2bdafc;
} }
#workspaces button.visible { #workspaces button.visible {
color: ${green}; color: #2bdafc;
} }
#mode { #mode {
background-color: ${teal}; color: #212121;
background-color: #2bdafc;
} }
@ -194,69 +168,63 @@ in {
#clock { #clock {
color: #ffffff; color: #ffffff;
background-color: transparent; padding: 5px 10px;
background-color: rgba(0, 0, 0, 0.4);
} }
#clock.date { padding-right: 0; } #clock.date {
#clock.time { padding-left: 0; } padding-right: 5px;
margin-right: 0;
border-radius: 14px 0 0 14px;
}
#clock.time {
padding-left: 5px;
margin-left: 0;
border-radius: 0 14px 14px 0;
margin-right: 5px;
}
/* Radio chips */ /* Radio chips */
#network {
background-color: ${green};
}
#network.disconnected { #network.disconnected {
${disabled} color: #ffffff;
background-color: transparent;
} }
#bluetooth.connected { #bluetooth.connected {
background-color: ${blue}; background-color: #3988e3;
} }
/* Audio chip */ /* Audio chip */
#pulseaudio,
#wireplumber
{
background-color: ${yellow};
}
#pulseaudio.muted, #pulseaudio.muted,
#wireplumber.muted #wireplumber.muted
{ {
${disabled} color: rgba(207, 207, 207, 0.9);
} }
/* Battery chip */ /* Battery chip */
#battery.discharging { #battery {
border: 2px solid;
border-color: transparent;
border-radius: 200px;
padding: 5px 8px;
color: #ffffff; color: #ffffff;
background-color: ${violet}; background-color: rgba(0, 0, 0, 0.4);
} }
#battery.charging { #battery.charging {
background-color: ${lime}; border-color: #2bdafc;
} }
#battery.critical { #battery.critical {
background-color: ${red}; border-color: #eb3b5b;
} }
/* MPD chip */
#mpd.playing {
color: #ffffff;
}
#mpd.paused {
${disabled}
}
''; '';
}; };
}; };

View file

@ -1,4 +1,4 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, helix, ... }:
(lib.mkIf (!config.isNixos) { (lib.mkIf (!config.isNixos) {
@ -12,7 +12,7 @@
nixpkgs.config = import ./nix-config.nix; nixpkgs.config = import ./nix-config.nix;
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ../../overlay.nix) (import ../../overlay.nix helix)
]; ];
xdg.configFile."nixpkgs/config.nix".source = ./nix-config.nix; xdg.configFile."nixpkgs/config.nix".source = ./nix-config.nix;

View file

@ -9,6 +9,8 @@
eva eva
hyperfine hyperfine
du-dust du-dust
pijul
python311Packages.deemix
]) ++ (import ../env.nix pkgs); ]) ++ (import ../env.nix pkgs);
# CLI for accessing my passwords # CLI for accessing my passwords
@ -24,7 +26,7 @@
# It's like `top` but cooler # It's like `top` but cooler
programs.bottom.enable = true; programs.bottom.enable = true;
programs.exa = { programs.eza = {
enable = true; enable = true;
extraOptions = [ extraOptions = [
"--group-directories-first" "--group-directories-first"

14
shared/home/rust.nix Normal file
View file

@ -0,0 +1,14 @@
{ oxalica, nixpkgs, ... }: {
home.packages = let
pkgs = import nixpkgs { overlays = [ oxalica.overlays.default ]; };
# We want an up-to-date nightly but also we need there to be stdlib and stuff
rust = pkgs.rust-bin.selectLatestNightlyWith (tc: tc.default.override {
extensions = [ "rust-src" ];
});
in [
rust
pkgs.rust-analyzer
];
}

View file

@ -1,4 +1,4 @@
final: prev: helix: final: prev:
with (import ./lib.nix final); { with (import ./lib.nix final); {
element-web = webApp "element" "https://riot.badat.dev"; element-web = webApp "element" "https://riot.badat.dev";
@ -10,4 +10,15 @@ with (import ./lib.nix final); {
prev.tor-browser-bundle-bin.override { prev.tor-browser-bundle-bin.override {
useHardenedMalloc = false; useHardenedMalloc = false;
}; };
# We can't just patch it because grammars are fetched at build time.
helix = helix.packages.${prev.stdenv.system}.default.override {
grammarOverlays = [(f: p: {
"rust" = p.rust.overrideAttrs (o: {
rev = "04352146022062c101b8ddd853adf17eadd8cf56";
});
})];
};
# python311Packages.deemix = prev.python311Packages.deemix.overrideAttrs (old: {
# patches = [./patch/dont_write_arl.patch];
# });
} }

View file

@ -0,0 +1,18 @@
diff --git a/deemix/__main__.py b/deemix/__main__.py
index 39a878a..74acf8d 100644
--- a/deemix/__main__.py
+++ b/deemix/__main__.py
@@ -47,9 +47,10 @@ def download(url, bitrate, portable, path):
with open(configFolder / '.arl', 'r', encoding="utf-8") as f:
arl = f.readline().rstrip("\n").strip()
if not dz.login_via_arl(arl): arl = requestValidArl()
- else: arl = requestValidArl()
- with open(configFolder / '.arl', 'w', encoding="utf-8") as f:
- f.write(arl)
+ else:
+ arl = requestValidArl()
+ with open(configFolder / '.arl', 'w', encoding="utf-8") as f:
+ f.write(arl)
plugins = {}
if Spotify:

View file

@ -1,5 +1,10 @@
{ {
age.secrets = { age.secrets = {
"backblaze".file = ../secret/backblaze.age; "backblaze".file = ../secret/backblaze.age;
"arl" = {
file = ../secret/arl.age;
owner = "riley";
mode = "777"; # Fuck it we ball
};
}; };
} }

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIl8jkTO9K2FdYP8tXqVLWrsAVoDVwjF/YgucuShBjav root@cherry

View file

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsGiEEbpxulLKsgzyTUHxO4qMetFBVetSuIHdcDMnh1 root@cherry ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIl8jkTO9K2FdYP8tXqVLWrsAVoDVwjF/YgucuShBjav root@cherry

View file

@ -5,6 +5,7 @@
username = "riley"; username = "riley";
homeDirectory = "/home/riley"; homeDirectory = "/home/riley";
stateVersion = "22.05"; stateVersion = "22.05";
packages = [ pkgs.tty-share ];
}; };
programs = { programs = {

View file

@ -1,12 +1,21 @@
{ lib, modulesPath, ... }: { { pkgs, lib, nixos-hardware, ... }: {
imports = [./hardware-configuration.nix]; imports = [
nixos-hardware.nixosModules.lenovo-thinkpad-x390
nixos-hardware.nixosModules.common-gpu-nvidia-disable
./hardware-configuration.nix
];
custom = { custom = {
gui.enable = true; gui.enable = true;
backups.enable = true; backups.enable = true;
}; };
boot = {
kernelModules = [ "kvm-intel" ];
binfmt.emulatedSystems = [ "aarch64-linux" ];
};
services.fprintd.enable = true; services.fprintd.enable = true;
networking.hostName = "lime"; networking.hostName = "lime";
@ -17,5 +26,16 @@
home-manager.users."riley".home.stateVersion = "22.11"; home-manager.users."riley".home.stateVersion = "22.11";
programs.adb.enable = true;
users.users."riley".extraGroups = ["adbusers"];
programs.steam.enable = true;
users.users."riley".packages = [ pkgs.bluez ];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
} }

View file

@ -1,4 +1,4 @@
{ ... }: { pkgs, ... }:
{ {
custom.gui = { custom.gui = {
@ -9,4 +9,8 @@
}; };
}; };
programs.iamb.enable = true; programs.iamb.enable = true;
home.packages = with pkgs; [
qbittorrent
vlc
];
} }

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOF9N5hsJEdm/jBxAGjQdQg7s/EFheZJK3KHyNkt5uFc root@lime

View file

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPycsXjXLc3yzqSxG0sAHgQsGZ3KqOgprW2dPmAErAQ root@lime ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOF9N5hsJEdm/jBxAGjQdQg7s/EFheZJK3KHyNkt5uFc root@lime

View file

@ -11,6 +11,7 @@
networking = { networking = {
hostName = "strawberry"; hostName = "strawberry";
interfaces."enp9s0".useDHCP = true; interfaces."enp9s0".useDHCP = true;
firewall.enable = false;
}; };
nix = { nix = {
@ -43,16 +44,6 @@
initrd.luks.devices.nixos.device = "/dev/disk/by-uuid/6bd51990-1584-422c-94bb-32ea952e5cd2"; initrd.luks.devices.nixos.device = "/dev/disk/by-uuid/6bd51990-1584-422c-94bb-32ea952e5cd2";
}; };
# Make a user called "nix-build" which
users.users."nix-build" = {
isSystemUser = true;
group = "nix-build";
openssh.authorizedKeys.keyFiles =
let userKey = sys: ../../system/${sys}/keys/root.pub;
in map userKey [ "lime" ];
};
nix.settings.trusted-users = [ "nix-build" ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/f3cdd2ab-62ba-4d72-8a28-b3adc0ec3997"; device = "/dev/disk/by-uuid/f3cdd2ab-62ba-4d72-8a28-b3adc0ec3997";
fsType = "ext4"; fsType = "ext4";
@ -67,6 +58,8 @@
{ device = "/dev/nixos/swap"; } { device = "/dev/nixos/swap"; }
]; ];
programs.steam.enable = true;
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;