Compare commits
2 commits
mistress
...
refactor-f
Author | SHA1 | Date | |
---|---|---|---|
c2aa01557a | |||
05d9dd9808 |
32 changed files with 183 additions and 545 deletions
239
flake.lock
239
flake.lock
|
@ -7,11 +7,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703260116,
|
||||
"narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=",
|
||||
"lastModified": 1684153753,
|
||||
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "d0d4ad5be611da43da04321f49684ad72d705c7e",
|
||||
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -20,27 +20,6 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -64,42 +43,6 @@
|
|||
}
|
||||
},
|
||||
"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": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
|
@ -114,27 +57,6 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -158,14 +80,14 @@
|
|||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703265279,
|
||||
"narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=",
|
||||
"lastModified": 1686922395,
|
||||
"narHash": "sha256-ysevinohPxdKp0RXyhDRsz1/vh1eXazg4AWp0n5X/U4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07c322a7cff03267fd881adae1afe63367c5d608",
|
||||
"rev": "9ba7b3990eb1f4782ea3f5fe7ac4f3c88dd7a32c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -192,11 +114,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1702453208,
|
||||
"narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
|
||||
"lastModified": 1686838567,
|
||||
"narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
|
||||
"rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -221,29 +143,13 @@
|
|||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1709479366,
|
||||
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
|
||||
"lastModified": 1686501370,
|
||||
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
|
||||
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -255,11 +161,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1702312524,
|
||||
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||
"lastModified": 1686869522,
|
||||
"narHash": "sha256-tbJ9B8WLCTnVP/LwESRlg0dII6Zyg2LmUU/mB9Lu98E=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||
"rev": "7c67f006ea0e7d0265f16d7df07cc076fdffd91f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -269,60 +175,9 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils",
|
||||
"jwt-tool": "jwt-tool",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
|
@ -362,69 +217,11 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"helix": "helix",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-latest": "nixpkgs-latest",
|
||||
"oxalica": "oxalica",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"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",
|
||||
|
|
75
flake.nix
75
flake.nix
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-latest.url = github:NixOS/nixpkgs/nixos-unstable;
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
||||
home-manager.url = github:nix-community/home-manager;
|
||||
pwnix = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -10,81 +9,63 @@
|
|||
};
|
||||
agenix.url = github:ryantm/agenix;
|
||||
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, oxalica, ... }: with nixpkgs; rec {
|
||||
outputs = args@{ self, home-manager, nixpkgs, agenix, nixos-hardware, ... }: with nixpkgs; {
|
||||
|
||||
# Configurations for NixOS machines.
|
||||
nixosConfigurations =
|
||||
let mkUserConfig = path: { config, ... }: {
|
||||
imports = [ home-manager.nixosModules.home-manager ];
|
||||
config = {
|
||||
home-manager.users."riley" = (import "${path}/home.nix");
|
||||
home-manager.extraSpecialArgs = args // { age = config.age; };
|
||||
home-manager.useGlobalPkgs = true;
|
||||
};
|
||||
nixosConfigurations = let
|
||||
# Generate a user configuration for the given user, based on the given home manager
|
||||
# configuration.
|
||||
userConfig = user: home: [
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ... }: {
|
||||
home-manager.users."${user}" = (home // {
|
||||
config.home = {
|
||||
inherit (config.system) stateVersion;
|
||||
username = user;
|
||||
};
|
||||
}).config;
|
||||
})
|
||||
];
|
||||
in {
|
||||
|
||||
# Desktop system
|
||||
"strawberry" = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
(mkUserConfig ./system/strawberry)
|
||||
agenix.nixosModules.default
|
||||
./system/strawberry/core.nix
|
||||
./shared/core
|
||||
./shared/secrets.nix
|
||||
];
|
||||
] ++ (userConfig "riley" self.homeConfigurations."strawberry");
|
||||
specialArgs = args;
|
||||
};
|
||||
|
||||
# Thinkpad
|
||||
"lime" = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
(mkUserConfig ./system/lime)
|
||||
agenix.nixosModules.default
|
||||
./system/lime/core.nix
|
||||
./shared/core
|
||||
./shared/secrets.nix
|
||||
];
|
||||
] ++ (userConfig "riley" self.homeConfigurations."lime");
|
||||
specialArgs = args;
|
||||
};
|
||||
|
||||
# Raspberry Pi hosting my website
|
||||
"cherry" = lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./system/cherry/core.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Configurations for home-manager.
|
||||
homeConfigurations = with home-manager.lib; let
|
||||
forEachHost = lib.genAttrs [ "dev-lt-63" "strawberry" "lime" ];
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
|
||||
# Configurations for non-NixOS machines.
|
||||
homeConfigurations = with home-manager.lib; {
|
||||
"dev-lt-63" = homeManagerConfiguration {
|
||||
extraSpecialArgs = args;
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in forEachHost (host: homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
agenix.homeManagerModules.default
|
||||
./system/dev-lt-63/home.nix
|
||||
./system/${host}/home.nix
|
||||
./shared/home
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
overlays = {
|
||||
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;
|
||||
default = (import ./shared/overlay.nix);
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
curl https://ttm.sh -F "file=@$1" | c
|
BIN
secret/arl.age
BIN
secret/arl.age
Binary file not shown.
Binary file not shown.
|
@ -13,6 +13,4 @@ let strawberry = [
|
|||
in {
|
||||
# Secrets for backup cloud storage provider
|
||||
"secret/backblaze.age".publicKeys = all;
|
||||
# The ARL for my deezer account
|
||||
"secret/arl.age".publicKeys = all;
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, agenix, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
agenix.nixosModules.default
|
||||
../secrets.nix
|
||||
./services.nix
|
||||
./backups.nix
|
||||
./docker.nix
|
||||
./users.nix
|
||||
./gui.nix
|
||||
./nix.nix
|
||||
|
@ -13,7 +14,6 @@
|
|||
|
||||
config = {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
environment.systemPackages = (import ../env.nix pkgs) ++ (with pkgs; [
|
||||
# For Mae
|
||||
neovim
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }: {
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -23,13 +23,11 @@ in {
|
|||
};
|
||||
|
||||
services.pipewire = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
programs.sway = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, config, nixpkgs, pwnix, helix, ... }:
|
||||
{ pkgs, lib, config, nixpkgs, pwnix, ... }:
|
||||
|
||||
let cfg = config.custom.nix;
|
||||
|
||||
|
@ -6,15 +6,12 @@ in with lib; {
|
|||
|
||||
options.custom.nix = {};
|
||||
|
||||
# TODO: Add strawberry as a build machine here
|
||||
config = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ (import ../overlay.nix helix) ];
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.registry.helix.flake = helix;
|
||||
nix.registry.pwnix.flake = pwnix;
|
||||
nix.settings.trusted-users = [
|
||||
"@wheel"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 436 KiB |
Binary file not shown.
Before Width: | Height: | Size: 325 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 598 KiB After Width: | Height: | Size: 598 KiB |
|
@ -5,7 +5,7 @@ pkgs: with pkgs; [
|
|||
bottom
|
||||
coreutils
|
||||
curl
|
||||
eza
|
||||
exa
|
||||
fd
|
||||
file
|
||||
git
|
||||
|
|
|
@ -25,7 +25,6 @@ in with lib; {
|
|||
"reboot"
|
||||
"exit"
|
||||
"exa"
|
||||
"eza"
|
||||
"fg"
|
||||
"cd"
|
||||
"ls"
|
||||
|
@ -39,8 +38,7 @@ in with lib; {
|
|||
shellAliases = {
|
||||
# General aliases
|
||||
":q" = "exit";
|
||||
"t" = "${eza}/bin/eza -T";
|
||||
"l" = "${eza}/bin/eza";
|
||||
"t" = "${exa}/bin/exa -T";
|
||||
".." = "cd ..";
|
||||
|
||||
# Git command aliases
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
imports = [
|
||||
./bash.nix
|
||||
./rust.nix
|
||||
./git.nix
|
||||
./mpd.nix
|
||||
./xdg.nix
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
global = {
|
||||
font = "Fira Code 9";
|
||||
origin = "bottom-right";
|
||||
offset = "3x50";
|
||||
offset = "10x10";
|
||||
frame_width = "2";
|
||||
frame_color = "#ffffff";
|
||||
corner_radius = "4";
|
||||
width = "400";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, nixpkgs-latest, lib, config, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let mod = "Mod4";
|
||||
cfg = config.custom.gui;
|
||||
|
@ -57,14 +57,11 @@ in with lib; {
|
|||
|
||||
extraConfig = ''
|
||||
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 {
|
||||
output."*".bg = "${../../data/time-warp.jpg} fill";
|
||||
output."eDP-1".bg = "${../../data/temporal-cleansing.png} fill";
|
||||
input."type:keyboard".xkb_options = "caps:super";
|
||||
output."*".bg = "${../../data/wallpaper.jpg} fill";
|
||||
input."type:keyboard".xkb_options = "caps:escape";
|
||||
|
||||
terminal = "kitty --single-instance";
|
||||
bars = [];
|
||||
|
@ -116,13 +113,12 @@ in with lib; {
|
|||
"${mod}+Alt+a" = "layout toggle stacking splitv";
|
||||
"${mod}+Alt+s" = "layout toggle tabbed splith";
|
||||
|
||||
"${mod}+Escape" = if config.isNixos then "exec ${pkgs.swaylock}/bin/swaylock" else "exec swaylock";
|
||||
"${mod}+Space" = "exec pkill -SIGUSR1 waybar";
|
||||
"${mod}+Escape" = "exec swaylock";
|
||||
|
||||
"${mod}+Return" = "exec ${terminal}";
|
||||
"${mod}+Alt+Return" = "exec ${pkgs.foot}/bin/foot";
|
||||
"${mod}+Tab" = "exec ${pkgs.firefox-wayland}/bin/firefox";
|
||||
"${mod}+Alt+Tab" = "exec ${(import nixpkgs-latest {}).google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder";
|
||||
"${mod}+Alt+Tab" = "exec ${pkgs.google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder";
|
||||
|
||||
"${mod}+Backspace" = "mode kill";
|
||||
|
||||
|
@ -131,9 +127,6 @@ in with lib; {
|
|||
"XF86AudioMute" = "exec ${vol} toggle";
|
||||
"XF86AudioPlay" = "exec ${mpc} toggle";
|
||||
|
||||
"${mod}+z" = "exec ${vol} lower";
|
||||
"${mod}+x" = "exec ${vol} raise";
|
||||
|
||||
"${mod}+comma" = "exec ${mpc} prev";
|
||||
"${mod}+period" = "exec ${mpc} next";
|
||||
"${mod}+slash" = "exec ${mpc} toggle";
|
||||
|
|
|
@ -36,15 +36,20 @@ in {
|
|||
target = "sway-session.target";
|
||||
};
|
||||
settings = [{
|
||||
margin = "3";
|
||||
position = "bottom";
|
||||
exclusive = false;
|
||||
layer = "top";
|
||||
modules-right = with lib; flatten [
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
"mpd"
|
||||
];
|
||||
modules-right = with lib; flatten [
|
||||
"cpu"
|
||||
"disk"
|
||||
(optional (cfg.battery.name != "") "battery")
|
||||
"network"
|
||||
(optional (cfg.bluetooth.enable) "bluetooth")
|
||||
(optional (cfg.network.wifi != "") "network#wifi")
|
||||
(optional (cfg.network.eth != "") "network#eth")
|
||||
(optional (cfg.network.vpn != "") "network#vpn")
|
||||
(if cfg.audio.wireplumber
|
||||
then "wireplumber"
|
||||
else "pulseaudio")
|
||||
|
@ -57,28 +62,35 @@ in {
|
|||
"format-disconnected" = "";
|
||||
};
|
||||
"clock#time" = {
|
||||
"format" = "{:%H:%M}";
|
||||
"format" = "{:%H:%M:%S}";
|
||||
"interval" = 1;
|
||||
};
|
||||
"clock#date" = {
|
||||
"format" = "{:%Y-%m-%d}";
|
||||
"interval" = 60;
|
||||
};
|
||||
"network" = {
|
||||
"format-wifi" = "{essid}";
|
||||
"format-ethernet" = "eth";
|
||||
"format-disconnected" = "";
|
||||
"network#wifi" = {
|
||||
"interface" = cfg.network.wifi;
|
||||
"format" = "wifi";
|
||||
};
|
||||
"network#eth" = {
|
||||
"interface" = cfg.network.eth;
|
||||
"format" = "eth";
|
||||
};
|
||||
"network#vpn" = {
|
||||
"interface" = cfg.network.vpn;
|
||||
"format" = "vpn";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"format" = "{desc} | {volume}%";
|
||||
"format" = "{desc}: {volume}%";
|
||||
};
|
||||
"wireplumber" = {
|
||||
"format" = "{node_name} | {volume}%";
|
||||
"format" = "{node_name}: {volume}%";
|
||||
};
|
||||
"battery" = {
|
||||
"bat" = cfg.battery.name;
|
||||
"format-discharging" = "{capacity}%";
|
||||
"format-charging" = "{capacity}%";
|
||||
"format-discharging" = "{capacity}% (battery)";
|
||||
"format-charging" = "{capacity}% (charging)";
|
||||
"format-full" = "";
|
||||
"states" = {
|
||||
"critical" = 20;
|
||||
|
@ -89,10 +101,29 @@ in {
|
|||
"format-on" = "";
|
||||
"format-connected" = "{device_alias}";
|
||||
};
|
||||
"disk" = {
|
||||
"format" = "{used} :: {free}";
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
"all-outputs" = true;
|
||||
};
|
||||
}];
|
||||
|
||||
# TODO: make this fancy scss
|
||||
style = ''
|
||||
style = let
|
||||
green = "#27e67a";
|
||||
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 */
|
||||
|
||||
* {
|
||||
|
@ -102,13 +133,7 @@ in {
|
|||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
background-color: #424242;
|
||||
border-radius: 40px;
|
||||
padding-left: 2px;
|
||||
background-color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
#battery,
|
||||
|
@ -122,9 +147,12 @@ in {
|
|||
#pulseaudio,
|
||||
#wireplumber
|
||||
{
|
||||
padding: 5px 10px;
|
||||
margin: 5px 2px;
|
||||
padding: 2px 10px;
|
||||
margin: 5px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
#cpu, #disk, #bluetooth, #mpd {
|
||||
color: #ffffff;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
@ -133,34 +161,32 @@ in {
|
|||
/* Sway chips */
|
||||
|
||||
#workspaces {
|
||||
margin-left: 5px;
|
||||
padding: 0;
|
||||
margin: 5px 2px 5px 5px;
|
||||
margin: 5px;
|
||||
border-radius: 200px;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
border: 2px solid;
|
||||
border-color: transparent;
|
||||
border-radius: 100px;
|
||||
color: #ffffff;
|
||||
font-size: 9px;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
border-radius: 100px;
|
||||
color: #ffffff;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#workspaces button.visible.focused {
|
||||
color: #ffffff;
|
||||
border-color: #2bdafc;
|
||||
color: #212121;
|
||||
background-color: ${green};
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: #2bdafc;
|
||||
color: ${green};
|
||||
}
|
||||
|
||||
#mode {
|
||||
color: #212121;
|
||||
background-color: #2bdafc;
|
||||
background-color: ${teal};
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,63 +194,69 @@ in {
|
|||
|
||||
#clock {
|
||||
color: #ffffff;
|
||||
padding: 5px 10px;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#clock.date {
|
||||
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;
|
||||
}
|
||||
#clock.date { padding-right: 0; }
|
||||
#clock.time { padding-left: 0; }
|
||||
|
||||
|
||||
/* Radio chips */
|
||||
|
||||
#network {
|
||||
background-color: ${green};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #ffffff;
|
||||
background-color: transparent;
|
||||
${disabled}
|
||||
}
|
||||
|
||||
#bluetooth.connected {
|
||||
background-color: #3988e3;
|
||||
background-color: ${blue};
|
||||
}
|
||||
|
||||
|
||||
/* Audio chip */
|
||||
|
||||
#pulseaudio,
|
||||
#wireplumber
|
||||
{
|
||||
background-color: ${yellow};
|
||||
}
|
||||
|
||||
#pulseaudio.muted,
|
||||
#wireplumber.muted
|
||||
{
|
||||
color: rgba(207, 207, 207, 0.9);
|
||||
|
||||
${disabled}
|
||||
}
|
||||
|
||||
|
||||
/* Battery chip */
|
||||
|
||||
#battery {
|
||||
border: 2px solid;
|
||||
border-color: transparent;
|
||||
border-radius: 200px;
|
||||
padding: 5px 8px;
|
||||
#battery.discharging {
|
||||
color: #ffffff;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
background-color: ${violet};
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
border-color: #2bdafc;
|
||||
background-color: ${lime};
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
border-color: #eb3b5b;
|
||||
background-color: ${red};
|
||||
}
|
||||
|
||||
|
||||
/* MPD chip */
|
||||
|
||||
#mpd.playing {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
${disabled}
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, config, helix, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
(lib.mkIf (!config.isNixos) {
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
nixpkgs.config = import ./nix-config.nix;
|
||||
nixpkgs.overlays = [
|
||||
(import ../../overlay.nix helix)
|
||||
(import ../../overlay.nix)
|
||||
];
|
||||
|
||||
xdg.configFile."nixpkgs/config.nix".source = ./nix-config.nix;
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
eva
|
||||
hyperfine
|
||||
du-dust
|
||||
pijul
|
||||
python311Packages.deemix
|
||||
]) ++ (import ../env.nix pkgs);
|
||||
|
||||
# CLI for accessing my passwords
|
||||
|
@ -26,7 +24,7 @@
|
|||
# It's like `top` but cooler
|
||||
programs.bottom.enable = true;
|
||||
|
||||
programs.eza = {
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
helix: final: prev:
|
||||
final: prev:
|
||||
|
||||
with (import ./lib.nix final); {
|
||||
element-web = webApp "element" "https://riot.badat.dev";
|
||||
|
@ -10,15 +10,4 @@ with (import ./lib.nix final); {
|
|||
prev.tor-browser-bundle-bin.override {
|
||||
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];
|
||||
# });
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
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:
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
age.secrets = {
|
||||
"backblaze".file = ../secret/backblaze.age;
|
||||
"arl" = {
|
||||
file = ../secret/arl.age;
|
||||
owner = "riley";
|
||||
mode = "777"; # Fuck it we ball
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
boot.loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "cherry";
|
||||
interfaces.eth0.useDHCP = true;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
|
||||
nix = {
|
||||
# TODO: Set up strawberry as a substituter
|
||||
# TODO: Set up nixbuild.net
|
||||
# TODO: Figure out how to make it safe to use other machines as remote
|
||||
# builders.
|
||||
distributedBuilds = false;
|
||||
buildMachines = [];
|
||||
};
|
||||
|
||||
documentation.enable = false;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# User for running the website service
|
||||
users.users."website" = {
|
||||
isSystemUser = true;
|
||||
group = "website";
|
||||
};
|
||||
users.groups."website" = {};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
] ++ (import ../../shared/env.nix pkgs);
|
||||
|
||||
users.users."root" = {
|
||||
# Allow access to this server from all the machines
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../dev-lt-63/keys/riley.pub
|
||||
../strawberry/keys/riley.pub
|
||||
../lime/keys/riley.pub
|
||||
];
|
||||
};
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIl8jkTO9K2FdYP8tXqVLWrsAVoDVwjF/YgucuShBjav root@cherry
|
|
@ -5,7 +5,6 @@
|
|||
username = "riley";
|
||||
homeDirectory = "/home/riley";
|
||||
stateVersion = "22.05";
|
||||
packages = [ pkgs.tty-share ];
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ pkgs, lib, nixos-hardware, ... }: {
|
||||
{ lib, modulesPath, nixos-hardware, ... }: {
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-x390
|
||||
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
custom = {
|
||||
|
@ -11,11 +11,6 @@
|
|||
backups.enable = true;
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
};
|
||||
|
||||
services.fprintd.enable = true;
|
||||
|
||||
networking.hostName = "lime";
|
||||
|
@ -24,18 +19,5 @@
|
|||
system.stateVersion = "22.11";
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
custom.gui = {
|
||||
|
@ -9,8 +9,5 @@
|
|||
};
|
||||
};
|
||||
programs.iamb.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
qbittorrent
|
||||
vlc
|
||||
];
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -11,16 +11,6 @@
|
|||
networking = {
|
||||
hostName = "strawberry";
|
||||
interfaces."enp9s0".useDHCP = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
nix = {
|
||||
sshServe.enable = true;
|
||||
sshServe.keys = [
|
||||
(builtins.readFile ../cherry/keys/root.pub)
|
||||
# (builtins.readFile ../dev-lt-63/keys/riley.pub)
|
||||
# (builtins.readFile ../lime/keys/riley.pub)
|
||||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
@ -58,8 +48,6 @@
|
|||
{ device = "/dev/nixos/swap"; }
|
||||
];
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue