Looooots of changes..
This commit is contained in:
parent
07a07ab45e
commit
7fd8e6c7c4
11 changed files with 90 additions and 73 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702676849,
|
||||
"narHash": "sha256-XqcREaTS38/QOsN8fk8PP325/UXHyF9enbP5ZPw5aiA=",
|
||||
"lastModified": 1706981411,
|
||||
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "aa99c2f4e9847cbb7e46fac0844ea1eb164b3b3a",
|
||||
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -23,11 +23,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701952659,
|
||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||
"lastModified": 1709309926,
|
||||
"narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
|
||||
"rev": "79baff8812a0d68e24a836df0a364c678089e2c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -38,11 +38,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1702206697,
|
||||
"narHash": "sha256-vE9oEx3Y8TO5MnWwFlmopjHd1JoEBno+EhsfUCq5iR8=",
|
||||
"lastModified": 1709356872,
|
||||
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "29d6c96900b9b576c2fb89491452f283aa979819",
|
||||
"rev": "458b097d81f90275b3fdf03796f0563844926708",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
59
flake.nix
59
flake.nix
|
@ -15,53 +15,46 @@
|
|||
, home-manager
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
mkHost = { hostname, user ? "sammy" }: {
|
||||
|
||||
imports = [
|
||||
./hosts/${hostname}/configuration.nix
|
||||
./modules
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
deployment = {
|
||||
targetUser = user;
|
||||
allowLocalDeployment = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
colmena = {
|
||||
meta = {
|
||||
description = "All my NixoS machines";
|
||||
specialArgs = {
|
||||
flake = self;
|
||||
};
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
bengal =
|
||||
{ name
|
||||
, nodes
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
./hosts/${name}/configuration.nix
|
||||
./modules/common
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
bengal = mkHost { hostname = "bengal"; };
|
||||
|
||||
deployment = {
|
||||
targetUser = "sammy";
|
||||
allowLocalDeployment = true;
|
||||
};
|
||||
};
|
||||
|
||||
maine-coon =
|
||||
{ name
|
||||
, nodes
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
./hosts/${name}/configuration.nix
|
||||
./modules/common
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
deployment = {
|
||||
targetHost = "maine-coon";
|
||||
allowLocalDeployment = true;
|
||||
};
|
||||
};
|
||||
maine-coon = mkHost { hostname = "maine-coon"; };
|
||||
};
|
||||
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
flake = self;
|
||||
};
|
||||
modules = [
|
||||
./modules
|
||||
./hosts/test-vm/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
|
|
@ -4,13 +4,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../modules/common
|
||||
../../modules/graphical
|
||||
];
|
||||
|
||||
cherrykitten.graphical.enable = false;
|
||||
|
||||
users.users.admin = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
|
|
|
@ -6,13 +6,6 @@
|
|||
}: let
|
||||
cfg = config.cherrykitten.common;
|
||||
in {
|
||||
imports = [
|
||||
./users.nix
|
||||
./security.nix
|
||||
./yubikey.nix
|
||||
../graphical
|
||||
];
|
||||
|
||||
options.cherrykitten.common = {
|
||||
test = lib.mkOption {
|
||||
type = lib.types.str;
|
24
modules/default.nix
Normal file
24
modules/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.cherrykitten;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
./graphical.nix
|
||||
./security.nix
|
||||
./users.nix
|
||||
./yubikey.nix
|
||||
./nvim
|
||||
./shell/fish.nix
|
||||
|
||||
];
|
||||
options.cherrykitten = { };
|
||||
|
||||
config = {
|
||||
|
||||
cherrykitten.fish.enable = mkDefault true;
|
||||
cherrykitten.graphical.enable = mkDefault false;
|
||||
};
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.neovim = let
|
||||
home-manager.users.sammy.programs.neovim = let
|
||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||
in {
|
||||
|
|
30
modules/shell/fish.nix
Normal file
30
modules/shell/fish.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, config, lib, flake, ... }:
|
||||
let
|
||||
cfg = config.cherrykitten.fish;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
|
||||
options.cherrykitten.fish.enable = mkEnableOption "Fish-Shell";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.sammy = {
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
fish_prompt = {
|
||||
source = flake + files/config/fish/functions/fish_prompt.fish;
|
||||
target = ".config/fish/functions/fish_prompt.fish";
|
||||
};
|
||||
fish_right_prompt = {
|
||||
source = flake + files/config/fish/functions/fish_right_prompt.fish;
|
||||
target = ".config/fish/functions/fish_right_prompt.fish";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -22,7 +22,6 @@ in
|
|||
};
|
||||
|
||||
home-manager.users.sammy = {
|
||||
imports = [ ../nvim ];
|
||||
home.username = "sammy";
|
||||
home.homeDirectory = "/home/sammy";
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
@ -50,21 +49,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
fish = {
|
||||
enable = true;
|
||||
functions = { };
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
fish_prompt = {
|
||||
source = ../../files/config/fish/functions/fish_prompt.fish;
|
||||
target = ".config/fish/functions/fish_prompt.fish";
|
||||
};
|
||||
fish_right_prompt = {
|
||||
source = ../../files/config/fish/functions/fish_right_prompt.fish;
|
||||
target = ".config/fish/functions/fish_right_prompt.fish";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
Loading…
Add table
Reference in a new issue